Use case · ERP

Odoo self-hosted on a dedicated NVMe server

Self-hosted Odoo is sized with Odoo's own rule of thumb: (CPU cores x 2) + 1 workers at most, one worker for roughly six concurrent users, and about 150 MB of RAM per light worker and 1 GB per heavy one, weighted 80/20. PostgreSQL runs on the same host by default, so storage latency shows up in every form, report and search.

See NVMe servers

Sizing from Odoo's deployment guide

The on-premise deployment guide gives the arithmetic. Start from concurrent users, not named accounts, and check the result against the core count.

StepRuleWorked example
Workers neededconcurrent users / 660 users / 6 = 10
Worker ceiling(CPU x 2) + 14 CPUs, 8 threads: (4 x 2) + 1 = 9
ChosenHTTP workers + 1 cron8 workers + 1 cron
Odoo RAMworkers x (0.8 x 150 MB + 0.2 x 1 GB)9 x (120 + 205) MB = about 3 GB

That 3 GB is Odoo alone. PostgreSQL wants its own memory for shared buffers and cache on the same machine, and the operating system needs room for the page cache that keeps hot tables off disk. The guide's sample also sets limit_memory_soft, limit_memory_hard, limit_time_cpu and limit_time_real so a runaway request is recycled instead of starving the rest.

Installing Odoo 20 on Ubuntu

  1. Install PostgreSQL first; the deb package expects it on the same host.
  2. Add Odoo S.A.'s nightly repository for 20.0 and install odoo. The Odoo 20 deb supports Ubuntu Noble (24.04 LTS).
  3. Install wkhtmltopdf 0.12.6 by hand for PDF reports with headers and footers; it is not pulled in by pip.
  4. Edit the package's odoo.conf: workers, limits, proxy_mode, admin_passwd, list_db, dbfilter.
sudo apt install postgresql -y
wget -q -O - https://nightly.odoo.com/odoo.key | sudo gpg --dearmor -o /usr/share/keyrings/odoo-archive-keyring.gpg
echo 'deb [signed-by=/usr/share/keyrings/odoo-archive-keyring.gpg] https://nightly.odoo.com/20.0/nightly/deb/ ./' | sudo tee /etc/apt/sources.list.d/odoo.list
sudo apt-get update && sudo apt-get install odoo

The repository is the Community edition. Odoo publishes no nightly repository for Enterprise; its packages come from the Odoo download page.

Proxy, HTTPS and the websocket worker

Odoo sends authentication data in cleartext, so the guide says a secure deployment must use HTTPS. Put nginx in front, terminate TLS there, and set proxy_mode = True so Odoo trusts the forwarded host, scheme and client IP.

In multi-process mode Odoo starts a separate LiveChat worker on the gevent port. The guide's nginx sample sends /websocket to 127.0.0.1:8072 and everything else to 127.0.0.1:8069. Without that route, the guide notes, those requests keep going to the normal HTTP workers instead of the LiveChat one.

Locking down the database manager

  • Set admin_passwd to a randomly generated value. The guide warns that a new on-premise installation is accessible to anyone on the internet until this master password is set, and strongly recommends disabling the database manager on any internet-facing system.
  • Set dbfilter so each hostname matches exactly one database, then list_db = False to hide the list and block the management screens.
  • Run Odoo with a PostgreSQL user that is not a superuser, and keep the databases owned by a different user.
  • Keep PostgreSQL on its default local-only connections; nothing outside the host needs port 5432.

Why NVMe under an ERP

Odoo is a PostgreSQL application: list views, reports, stock moves and accounting entries are queries and writes. When the working set outgrows memory, storage latency becomes request latency. The NVMe dedicated servers put the database on NVMe SSDs, quoted at up to six times the read and write speed of conventional SSDs, on HPE enterprise hardware with root access.

Blade and rack lines add hardware RAID and out-of-band console access; the port is yours alone at the access switch and unmetered. A racked machine is live about 30 minutes after the order is approved, a build to order in 4-24 hours. For database-first builds, see SQL servers.

Backups and upgrades

Back up the PostgreSQL database and the filestore as one set; one without the other does not restore a working Odoo. Ship both to another machine, preferably in a second data centre. Bugfix builds arrive through the repository with apt-get upgrade. A major version upgrade is a database migration, so test it on a copy first.

When Odoo Online is the better choice

A small team that needs no custom modules and has no one to patch a server is better served by Odoo's hosted offering. Self-hosting pays off with custom or community modules, data that must stay on hardware you control, integrations that need direct database access, or a user count large enough to justify a machine of its own.

Questions

How many workers should Odoo have?

Odoo's guide caps it at (CPU cores x 2) + 1 and estimates one worker per six concurrent users. Its example: 4 CPUs and 60 users give 8 HTTP workers plus 1 cron worker.

How much RAM does self-hosted Odoo need?

By Odoo's estimate, about 150 MB per light worker and 1 GB per heavy one, with 80% of requests light. Nine workers come to roughly 3 GB for Odoo, before PostgreSQL and the OS.

Which Ubuntu does Odoo 20 support?

The Odoo 20 deb package supports Ubuntu Noble, 24.04 LTS. Install that release on the server.

Can I install Odoo Enterprise from the repository?

No. The nightly repository carries the Community edition only. Enterprise packages come from the Odoo download page.

Why are PDF reports missing headers and footers?

Odoo needs wkhtmltopdf 0.12.6 installed manually for headers and footers. It is not installed through pip.

Is the database manager safe to leave open?

No. Set a random admin_passwd, a dbfilter that matches one database per host, and list_db = False to block the management screens.

Run Odoo on NVMe

HPE enterprise hardware, NVMe storage and root, on an unmetered port, billed monthly.

See NVMe servers

Related on Server Room

Other use cases