Multiple Environment Deployment on Same Server
Deploy development, staging, and production environments on a single server.
Why Multiple Environments?
- ✅ Test changes safely before going live
- ✅ Show clients work-in-progress on staging
- ✅ Keep costs low by sharing one server
- ✅ Maintain separate configs per environment
How It Works
OEC.sh runs each environment in isolated Docker containers on the same server. Each gets its own:
- Database (PostgreSQL container)
- Odoo application container
- Subdomain (e.g.,
project-dev.apps.oec.sh,project-staging.apps.oec.sh)
They share the server's CPU, RAM, and disk — you control how much each environment gets.
Step 1: Set Up Your Project
If you haven't already, create a project with your Git repository.
Step 2: Create Multiple Environments
- Open your project
- Go to Environments tab
- Click Add Environment for each:
| Environment | Type | Suggested Resources |
|---|---|---|
| Development | Development | 1 CPU, 2 GB RAM, 10 GB disk |
| Staging | Staging | 2 CPU, 4 GB RAM, 20 GB disk |
| Production | Production | 2-4 CPU, 4-8 GB RAM, 30+ GB disk |
- Select the same server for all environments
- Deploy each environment
Step 3: Configure Per Environment
Each environment can have different:
- Git branch —
dev,staging,main - Odoo config — debug mode, workers, log level
- Custom domain — staging.yoursite.com, app.yoursite.com
- Addons — test modules on dev without affecting production
Resource Planning
For a single server, plan your total resources:
| Server Size | Recommended Environments |
|---|---|
| 4 CPU / 8 GB | 2-3 environments |
| 8 CPU / 16 GB | 4-6 environments |
| 16 CPU / 32 GB | 8-10 environments |
Tip: Development environments can share resources more aggressively since they're not always active.
Best Practices
- Use branches — Map each environment to a Git branch (dev → development, staging → staging, main → production)
- Clone for fresh data — Periodically clone production to staging for realistic testing
- Set up backups — At minimum, back up production daily
- Monitor resources — Check server monitoring to ensure environments aren't competing for resources
- Clean up — Delete temporary environments when done to free resources
Next Steps
- Clone an Environment — Copy production data to staging
- Add Custom Domain — Give each environment a proper URL
- Scale Resources — Adjust CPU/RAM per environment