Skip to Content

Odoo.sh Changing or Renaming the Production Branch

June 14, 2026 by
Odoo.sh Changing or Renaming the Production Branch
Dynamic Enterprise Technologies Inc, David Nelson


With Odoo.sh, you can't rename the production branch, but you can change which branch is in production.

Plan and Test Carefully

  • PRODUCTION WILL BE DOWN during this process
  • YOUR CUSTOM DOMAIN will not work during this process
  • The production database is deleted during this process

    • MAKE SURE YOU HAVE A BACKUP TO RESTORE FROM
  • If the production build fails, the “Backups” menu disappears,

    • don’t freak out, your backups are still there
    • after a successful production build and after you exit and re-enter the project, the “Backups” menu will show up again
  • Your custom domain stays with the branch,

    • The custom domain must be removed from the old production branch and added to the new production branch as part of this process
    • The SSL/TLS certificate needs to be regenerated after you add the custom domain to the new production branch, this takes time
  • This change may result in a new server IP address, which can cause a brief disruption if DNS caches haven't yet expired.

    • If DNS caching (TTL) has cached the old IP, users might hit the wrong server for a short window after Odoo changed the production IP.  This resolves itself automatically once the cache expires.
    • Flushing your local computer’s DNS cache can help you to see the changes faster
  • Schedule this work during your lowest-traffic window.
  • Before you start: determine which option applies to you:

    • OPTION 1:

      • Verify that your custom modules install cleanly against an empty Odoo database. If they do, create your new production branch as a duplicate of your production source code.

      • You must test this by creating a new development branch without applying the Odoo demo data and applying your custom modules, and make sure the build is green or yellow (not red)

    • OPTION 2:

      • If Option 1 fails, start your new production branch without custom source code — or modify it — so that it builds successfully against an empty database. Restore the production backup first, then apply your final custom modules on top.
      • You must test this using a combination of an empty development database and staging database to make sure you have a procedure that works

      • You need three verified states: 

        • the repo builds against an empty database.

        • that same repo works after the production backup is restored.

        • that you can safely apply the missing source code after the production database has been restored

    • OPTION 3:

      • If you can't get option 1 or 2 to work safely, DO NOT EXECUTE THIS PROCEDURE

Procedure

  1. Screenshot the production branch settings and save them somewhere accessible. (You'll need these to recreate settings on the new branch.)
  2. Note any branch settings that may need to be adjusted as part of this process
  3. Add to odoo.sh development the new branch that will become production

    1. Create this new development branch based on the production branch so the source code matches exactly (if using OPTION 1 above, if using OPTION 2 you may need to do something different to prepare this branch)
    2. As noted above, this branch must work against both an empty Odoo database (for when the production database gets created fresh, and then after the production database has been restored)
  4. Turn off the global project setting "Block access to the .odoo.com domain" — if this is left on, the production build will fail.
  5. Back up any staging environments you want to keep
  6. Backup production
  7. Drag all odoo.sh staging branches to odoo.sh development (do not merge into an existing development branch)

    1. Staging branches cannot exist without a production branch, so they must be moved before you remove production.
  8. Drag the odoo.sh production branch to odoo.sh development (do not merge into an existing development branch)

    1. When you do this, you will get a warning that your production database will be deleted, it sounds scary and it is, but that is why you made a backup earlier in the procedure
  9. Drag what will become the new production branch from odoo.sh development to odoo.sh production

    1. This will create a new empty production database and apply your customizations to it
    2. This is a critical step. If the build fails, you cannot restore the production database until a successful build completes. This is why testing the procedure in advance (per the options above) is essential.
  10. Restore you production backup

  11. If using OPTION 2 from above, push some/all of your custom modules

  12. If you have a custom domain

    1. Remove the custom domain from the old production branch, then add it to the new production branch settings.
    2. Flush your computers local DNS cache to reduce propagation time for yourself, in Windows command line: ipconfig /flushdns
    3. Browse to the custom domain
    4. If you see an SSL/TLS certificate error, wait — DNS propagation typically resolves within minutes, though it can take up to 24–48 hours. If the certificate hasn't appeared after an hour or two, remove and re-add the domain to trigger a fresh attempt.
    5. Test to make sure the bare and the www custom domain is working
    6. If previously turned on, turn back on the global setting “Block access to the .odoo.com domain”
  13. Drag your staging branches back from odoo.sh development to odoo.sh staging
  14. Restore your staging backups (optional)