Odoo Staging Environments: Test Before You Break Production

Running changes directly in production is playing Russian roulette with your business. Here's how to set up a proper Odoo staging environment.

Quick scan button on a blue background
Photo by Zulfugar Karimov on Unsplash

We've seen it dozens of times: a partner installs a new module directly in production, it conflicts with an existing customization, and the instance goes down during business hours. A proper staging environment would have caught the issue in 5 minutes instead of creating a 4-hour production outage.

Why Staging Matters for Odoo

Odoo's module system makes it especially risky to test in production:

  • Module installation modifies the database schema — there's no easy rollback
  • Data migrations in module upgrades can corrupt records if they fail midway
  • JavaScript and CSS assets are compiled on module update — a broken asset bundle takes down the entire web client
  • Cron jobs in new modules start running immediately upon installation

Setting Up Staging

  1. Clone your production database — Use pg_dump and pg_restore to create an exact copy
  2. Copy the filestore — Attachments, report templates, and uploaded documents
  3. Neutralize the staging copy:
    • Disable all outgoing email servers
    • Disable cron jobs that interact with external services
    • Change webhook URLs to dev/null endpoints
    • Update the web.base.url system parameter
  4. Apply your changes in staging first
  5. Run NonaGuard scan on staging to catch new issues before production

Continuous Staging with Docker

Docker Compose makes it easy to spin up a staging instance on demand. Use a separate Compose file that clones the production database, runs the staging instance on a different port, and tears it down after testing.

🔍 Planning an upgrade? NonaGuard's upgrade risk assessment maps your deprecated modules and estimates migration effort — before you write a single line of code.

Scan your staging environment before applying changes to production.

🚀 Check Your Upgrade Readiness

NonaGuard identifies deprecated modules, incompatible custom code, and upgrade blockers — so you know exactly what needs fixing before you start migrating.

Scan Your Instance Free →