Setting Up Staging Instance
Learn how to set up a staging instance for testing changes before deploying to production.Why Use Staging?
Staging instances provide a pre-production environment where you can:- Test changes safely - Verify new features and customizations before production
- QA and client demos - Show stakeholders changes without affecting production, and let them test it themselves
- Test with production data - Restore production backups to test with real data in a safe, neutralized environment - (no emails sent)
- Catch issues early - Identify problems before they reach your live environment
Prerequisites
Before creating a staging instance, ensure you have:- Active subscription - Staging deployments require a Pro or Starter plan subscription
- Server ready - A server must be available and fully provisioned (check status in Servers)
- Git branch - Your staging code should be committed to a Git branch (typically
stagingordevelop)
Important Considerations
Multiple Staging InstancesUnlike production (which allows only one instance), you can create multiple staging instances at no additional cost. Server Separation
For optimal performance and to minimize risk to production, deploy staging on a server separate from the production instance. No Automatic Backups
You can manually create backups of your staging database or restore from production backups as needed.
Step 1: Create Staging Instance
Navigate to your project’s Deployments page and click the ”+” button next to Staging.Select Server
Choose which server to host your staging instance. For best practices:- Use a separate server from production when possible
- Consider using the same server as production only for small projects or testing
- Ensure adequate resources for your staging workload
Select Branch
Select the Git branch with your staging Odoo modules and customizations. This is typically yourstaging or develop branch.
You can also create a new branch by clicking the “Branch” button, which lets you base it on an existing branch.
Configure Domain
Choose how users will access your staging instance: Free doploy subdomainUse a
{your-name}.doploy.site domain. This is automatically available and requires no DNS configuration.
Custom domainIf using your own domain, doploy will display the server IP address and DNS setup instructions. Create an A record pointing your domain to this IP address before deployment. doploy will handle the SSL certificate for your custom domain automatically.
Database Name
A database name is auto-generated based on your branch name and a random suffix, ensuring uniqueness. You can modify this if needed, but it must be a valid PostgreSQL identifier (letters, numbers, underscores only).Admin Password
A secure random password is automatically generated for the Odoo admin user. Important: Save this password immediately—it won’t be shown again. You can change it later from within Odoo or reset it via doploy.Step 2: Deploy
Review your configuration and click “Deploy Instance” to start the deployment process. The instance will be built and deployed, typically completing within a few minutes. You can monitor progress in the deployment history tab.Step 3: Configure Domain DNS (Custom Domains Only)
If you’re using a custom domain, configure your DNS records before the deployment completes:- Create an A record for your domain
- Point it to the server IP address shown in the deployment modal
- Wait for DNS propagation (usually 5-60 minutes)
Using Production Data in Staging
After your staging instance is deployed, you can restore a production backup to test with real data:- Go to the Backups tab in your staging instance
- Click Restore from Backup
- Select a backup from your production instance
- The data will be automatically neutralized (emails disabled) to prevent accidental actions
Staging Workflow
Testing Changes- Make changes in your staging branch
- The staging instance will automatically rebuild with your changes
- Test thoroughly in staging before merging to production
- Once changes are tested and validated in staging
- Merge your staging branch into your production branch
- Your production instance will automatically rebuild with the changes
Best Practices
Keep Staging Close to ProductionRegularly sync staging data from production backups to ensure your staging environment closely mirrors production. Test Before Production
Always test changes in staging before deploying to production. This helps catch issues early. Use Separate Servers
When possible, run staging on a separate server from production to avoid resource contention.
Next Steps
- Set up production instance for your live environment
- Set up developer instance for automated testing
- Configure automatic backups for production
- Set up DNS for your custom domain

