Skip to content
SecureKeys

Learn

Securing self-hosted Odoo and Odoo.sh: server settings that matter

The Odoo configuration options that protect a production server, from dbfilter and the database manager to proxy mode and PostgreSQL, plus what to check on Odoo.sh.

SecureKeys Engineering ·

Sign-in security only helps if the server around it is sound. These are the settings Odoo’s own deployment guide calls out, with notes on why each matters.

Self-hosted Odoo (Community or Enterprise on your server)

1. Set dbfilter. Odoo can serve several databases. dbfilter decides which database a hostname may use, for example ^%d$ to match the first part of the domain. Odoo describes a correct filter as an important part of securing a deployment.

2. Hide and block the database manager. Once each hostname maps to one database, Odoo strongly recommends starting with --no-database-list (or list_db = False) and blocking the database management screens at the proxy. Those screens can back up, restore, duplicate and drop databases.

3. Use a strong, unique admin_passwd. This master password protects the database management screens. Treat it as a secret, store it in a password manager, and change it if anyone who knew it leaves.

4. Run behind a TLS proxy with proxy_mode. Put Nginx (or similar) in front of Odoo to terminate HTTPS and redirect plain HTTP. Then set proxy_mode = True so Odoo uses the real client address and scheme. Only enable proxy mode when a proxy is actually in front, or clients can spoof their address.

5. Lock down PostgreSQL. The Odoo database user must not be a PostgreSQL superuser. Keep PostgreSQL on localhost or a private network. If it is on another machine, use SSL (db_sslmode, for example verify-full) or an SSH tunnel.

6. Keep Odoo updated. Apply Odoo and operating-system security updates on a schedule, and test upgrades on a copy first.

7. Back up, and test restores. Keep encrypted, off-server backups of the database and filestore, and restore one regularly.

8. Restrict server access. SSH with keys only (ideally hardware security keys), no direct root login, and a firewall that exposes only the proxy.

Odoo.sh

Odoo.sh manages the server, proxy, backups and updates, so most of the list above is handled for you. What remains is yours:

  • Who can reach the project. Odoo.sh projects are built from a GitHub repository, so review project collaborators and protect the production branch. Put security keys on those GitHub accounts.
  • Users inside the database: 2FA, admin count, finance rights and API keys. See the access rights review.
  • Custom modules: review third-party code before deploying it, because it runs with full database access.

Then the application layer

Enforce two-factor authentication, move admins to passkeys or security keys, and work through the Odoo admin hardening checklist.

References

  1. Odoo 18.0 documentation: System configuration (deploy)
  2. Odoo 20.0 documentation: System configuration (deploy)

Odoo is a trademark of Odoo S.A. SecureKeys, SecureKey 2FA and Action Approvals are independent products by Novator Technologies. They are not official Odoo products and are not endorsed or supported by Odoo S.A. Trademark notice.

Plan your move beyond passwords

Talk to our engineers about phishing-resistant authentication for your organisation. We reply within one business day.