Hi community.
How to deploy Odoo 19 enterprise on a cloud server with multiple application servers and multiple database severs ?
Appreciate your help.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hi community.
How to deploy Odoo 19 enterprise on a cloud server with multiple application servers and multiple database severs ?
Appreciate your help.
Honestly, what you're describing is basically a Kubernetes-style Odoo deployment, even if you don’t say “Kubernetes” out loud. Multiple app servers, multiple DB servers, HA, load balancers… that is the architecture.
Odoo is stateless, so you can run as many replicas as you want. The only real requirement: every single instance needs the exact same database config. Like: db_host, db_port, db_user, db_password, db_name.
More here: https://www.odoo.com/documentation/19.0/administration/on_premise/deploy.html#id4
You said you want multiple database servers - not just a backup. As I understood it:
- one write node
- several read replicas
- automatic failover
- maybe even a virtual IP / HA endpoint
Typical ways people do this:
- Patroni (the classic Postgres HA solution in Kubernetes)
- CrunchyData operator (also very popular)
- Google Cloud SQL (if you want HA without babysitting your cluster)
Google Cloud SQL is the simplest: you get a primary, read replicas, backups, and failover without touching replication configs. Odoo doesn’t care about replicas vs primary. It just connects to the primary endpoint. Your Google Cloud Postgres setup handles the magic.
Enterprise license? Super easy.
The license has nothing to do with how many Odoo applications servers you run.
It’s tied to the database and the number of active users inside that database. As long as all your app servers point to the same DB (same db_name), everything is fine. Want 2 app servers? 10? 50? Doesn’t matter. Odoo only checks the user count and license key in the DB. If your write node + replicas stay in sync, you’ll never have license issues.
Not pushing it - just genuinely asking. Have you already ruled out using odoo.sh?
Not suggesting it as “the solution”, but simply because it already provides HA PostgreSQL, backups, worker scaling, and redundancy. Sometimes it covers exactly the requirements you described - unless you have specific constraints (region, compliance, private network, very custom modules, etc.).
P.S.:
Odoo supports only a single db_replica_host - you can’t define multiple replicas directly in odoo.conf.
So in your configuration file (odoo.conf), you сan specify:
- db_host = IPv4 of the primary database
- db_replica_host = IPv4 of the load-balanced replicas
Your load balancer will handle the 3–4 replica nodes.
Good luck with your implementation! For testing, you may find this link helpful:
https://www.odoo.com/documentation/19.0/developer/reference/cli.html#database
สร้างบัญชีวันนี้เพื่อเพลิดเพลินไปกับฟีเจอร์พิเศษและมีส่วนร่วมกับคอมมูนิตี้ที่ยอดเยี่ยมของเรา!
ลงชื่อ
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.
Hi,
I might be able to help, but could you clarify what setup you actually mean? When you mention “multiple application servers and multiple database servers”, are you referring to one of these scenarios:
A. Multiple independent Odoo instances? For example: 3–4 separate Odoo deployments on the same cloud server provider:
1. company1.example.com → uses company1_db
2. company2.example.com → uses company2_db
3. etc.
or
B. A single Odoo 19 Enterprise instance with high availability / load balancing? For example: one Odoo service for one company, but scaled horizontally:
1. several Odoo application servers behind a load balancer
2. a PostgreSQL cluster with replication/failover
These two architectures are very different, so understanding which one you need will determine the correct deployment strategy.
Could you specify which one matches your expectations?
Hello Mark.
Thank you for your response.
I mean B: a single Odoo instance for a single company with high availability.
The idea here is that I want to deploy Odoo enterprise on a cloud server, Google Cloud for example, and I need the system to be highly available in case of any disaster happening. Yes, I was thinking of having multiple application servers behind a load balancer.
I need the application and the database servers to be highly available.
Is it possible to separate postgres from the application in Odoo, having an "application" server that has the modules, the logic, the custom code, etc, and a "database" server that only has postgres ?
In the case of postgres, is it applicable to have a managed postgres service from the cloud provider, or I will strictly have to manage postgres manually ?
Also, the question of license is critical. How does the enterprise license play with multiple application servers ?
Thank you in advance. I appreciate it.
Yes, it is possible to run PostgreSQL as a separate database server. I’ve implemented this using AWS RDS, which works very well for separating the application and database layers.
You can also set up disaster recovery using a Master–Slave (Primary–Replica) PostgreSQL configuration. In this setup, if the primary instance fails, the secondary (replica) instance is automatically promoted, ensuring high availability and minimal downtime.
I don’t have much experience with managing enterprise licenses across multiple servers, and for the application server I used VPC Peering in AWS. Currently, the blog I wrote is not accessible due to a server issue. I will provide here blog link once it is available.
Hi Lakhan,
Please tell us more details about the application server. Did you deploy two of them ?
How did you manage the enterprise license between multiple servers ?
Thank you so much Mark.
The customer is sensitive about the odoo sh backup replicas being hosted outside of the production branch's location.
For the database, yes, we will deploy one write node, and multiple read nodes.
In that case and as I understand, we can have 2 Odoo app servers, 1 write DB node, 3-4 read only nodes, and shared NFS storage for files.
I greatly appreciate your help and time.
Well, in that case it’s actually very straightforward. Odoo supports only a single db_replica_host - you can’t define multiple replicas directly in odoo.conf.
So in your configuration file (odoo.conf), you сan specify:
- db_host = IPv4 of the primary database
- db_replica_host = IPv4 of the load-balanced replicas
Your load balancer will handle the 3–4 replica nodes.
Good luck with your implementation! For testing, you may find this link helpful:
https://www.odoo.com/documentation/19.0/developer/reference/cli.html#database