Running Odoo in production with Docker and Docker Compose: what it involves
This section explains what a team takes on when it runs self-hosted Odoo in containers: the official odoo image paired with a PostgreSQL container, the named volumes that hold the filestore and the database, and the Compose file that ties them together. A container setup moves packaging out of the operating system, but it does not remove the work of planning the database, the configuration file, the addons path and the upgrade cycle. Docker Compose fits a team that wants the whole stack defined in one versioned file and rebuilt the same way on each host. A systemd install on Ubuntu or Debian fits better when the team wants Odoo packaged directly on the host and managed by the distribution's tools.
Licensing shapes the decision before any container is built. The Community edition is open source under the LGPL-3.0 license and can be run without a subscription. The Enterprise edition needs a subscription, and its source code is not publicly available, so Enterprise addons have to be obtained through a subscription or partner access. Odoo's pricing page states that only the Custom plan can be hosted on-premise or on Odoo.sh, and that the Custom plan is the one that includes custom modules and external API access. Confirm the plan and the edition before choosing an image, because the answer determines whether the team builds on the Community image alone or adds Enterprise code to it.
The team should confirm two things early: which Odoo major version it will run, and how it will move to the next one. Image tags follow major versions, and the standard support window for each version sets the deadline for an upgrade. Odoo's standard and extended support documentation lists the dates for each release, and security patches are only provided during standard support, so a container pinned to an expired version carries unpatched risk. Ask for the support end date of the chosen version, plan a test restore before each upgrade, and confirm who owns image rebuilds when Odoo releases a fix.
How the Odoo, PostgreSQL and volume containers fit together
The diagram starts at the reverse proxy on the trust boundary, which forwards browser traffic to the odoo container on port 8069 for regular pages and port 8072 for websocket and longpolling traffic. The odoo container reads its mounted odoo.conf from /etc/odoo and loads any extra addons from a mounted directory. It talks to the PostgreSQL container over the Compose network, and the database and filestore each sit on a named volume. Check that the proxy is the only published entry point, that the database port is not exposed to the host, and that both volumes survive a container rebuild.
Request path and storage for a self-hosted Odoo stack in Docker Compose.
Which Compose configuration options fit which situation
This table compares the main Compose choices for an Odoo container and PostgreSQL pair, with the situations each one suits and the trade-off it carries. Read each row as a decision: find the situation closest to yours, then check the trade-off before you commit to it.
| Configuration option | When it fits | Trade-off to weigh |
|---|---|---|
| Named volumes for the filestore and database | Single-host installs where Docker manages storage and you back up through volume-aware tooling | Data sits in Docker-managed locations, so backup and restore steps must be written and tested for your host, not assumed |
| Bind mounts for the filestore and database | Teams that want files at a known host path for direct backup, snapshotting or inspection | Host permissions and paths become your responsibility, and ownership mismatches between host and container are a common failure point |
| odoo.conf mounted read-only at /etc/odoo | Production installs where configuration changes go through review and the container should not rewrite its own settings | Any change needs a file edit and container restart, so keep the file under version control and confirm which values the image expects to set |
| Extra addons mounted as a volume | Custom or third-party modules that must be updated without rebuilding the image | Module versions must match the Odoo major version exactly, and the addons path must be listed in the configuration |
| Image tag pinned to one major version | Production systems where upgrades are planned, tested and scheduled rather than applied automatically | You must schedule and test each major upgrade yourself, and the pinned line will eventually leave standard support |
| Floating tag for the major version | Development or test environments that should pick up minor and patch builds without manual edits | Unplanned behavior changes can reach a running database, so avoid floating tags on production without a staging test |
| Multi-threaded server (default in the container) | Small installs, development or evaluation where one process is enough for the user count | Long requests can block other users, and the container does not give you the worker tuning that a production load needs |
| Multi-processing workers configured in odoo.conf | Production load with several concurrent users, where requests and scheduled jobs must not compete | Worker counts, memory limits and cron workers must be sized for your hardware, and the right values should be confirmed in your environment |
Why the container defaults to the multi-threaded server and when to change it
The official image starts Odoo with the multi-threaded server by default, which handles requests as threads inside a single process. That is a reasonable starting point for a pilot, a test environment or a small team, where few users are active at the same time. The trade-off is that threads share one process, so a long report, a large import or a heavy request from one user can slow down everyone else. Before you assume the container behaves a certain way, check what it actually runs: read the container command, confirm which odoo.conf it loads, and look for the server mode in the startup log.
When concurrent users grow, or when one slow operation must not block the rest of the company, you switch to the multi-processing server by setting the workers key in odoo.conf. Odoo also needs separate capacity for cron jobs and long polling, so the worker count affects more than request throughput. A value copied from a sample file can starve one of those roles or push the host into memory pressure, and a container memory limit can end worker processes without a clear error. Confirm the sizing rules for your Odoo version in Odoo's documentation, and plan the memory limit of the container with the worker count in mind. Sizing for a specific user count is covered on the server sizing page.
Changing the setting also changes the load on PostgreSQL, because each worker holds its own database connections. Check the PostgreSQL connection limit against the worker count before you raise the value, and set the db_maxconn key deliberately if your version supports it. Mount the edited odoo.conf at /etc/odoo, keep it in the same version control repository as the Compose file, and test under realistic load before go-live. The Odoo on-premise documentation is the reference for the options that apply to your version.
How to set up Odoo and PostgreSQL in Docker Compose
This sequence builds a Compose stack with a PostgreSQL container and an Odoo container, each with persistent storage and configuration kept outside the image. Each step ends with a check, so you know the stack is ready for a first database and sign-in.
Prepare the host and generate secrets
The administrator installs Docker Engine and the Compose plugin on the host, then creates a project directory. They generate a random database password and a master password, store both in a
.envfile, and restrict the file to the owner. Keep the master password out of version control, because it controls the Database Manager. Check:docker compose versionreturns a version, andls -l .envshows permissions limited to the owner.Write the Compose file with PostgreSQL
Create a
docker-compose.ymlfile with adbservice for PostgreSQL and anodooservice for the Odoo image. Attach a named volume to the database data directory and a second named volume to the Odoo filestore, so attachments survive container replacement. Do not publish the PostgreSQL port to the host, and make the Odoo service depend on the database. Check:docker compose configprints the merged file without errors, and both volumes appear under the top-level volumes key.Create odoo.conf with database and master password
Create an
odoo.conffile on the host and mount it at /etc/odoo in the container. Setdb_hostto the database service name, add the database user and password from.env, and setadmin_passwdto the master password. Point the data directory at the filestore volume and list the addons path that the next step will use. Check: the Odoo container starts and its logs show the server listening on port 8069 without configuration errors.Mount extra addons into the container
Place custom or third-party modules in a host directory and mount it into the Odoo container at the addons location your image documentation specifies. Mount it read-only where possible, and add the same path to
addons_pathinodoo.conf. Enterprise addons need a subscription, so keep them in a separate directory that is only mounted for licensed installations. Check:docker compose exec odoo lson the addons path lists each module folder, and each contains a__manifest__.pyfile.Pin the image tag for your major version
Replace any floating
latesttag with a tag that matches the major version you plan to run, and confirm that the tag exists on the image's registry page. Choose the version against Odoo's support windows, because standard support for 18.0 runs until September 2027 and for 19.0 until September 2028. Record the tag and image digest in your change log. Check:docker compose imagesshows the exact tag, and the image tag matches the version recorded in your plan.Start the stack and create the first database
Run
docker compose up -d, then open the Database Manager on port 8069 in a browser and enter the master password. Create the first database, choosing a language, country and admin password that your team has agreed. The database is created inside the PostgreSQL container and its data goes to the named volume. Check:docker compose psshows both services running, and the new database appears in the database selector.Verify login, filestore writes and PDF output
Sign in as the admin user, then upload a small attachment to a record and confirm it is saved. Use
docker compose exec odooto list the filestore directory and find the new file. Print a standard document such as a quotation to PDF to test the report engine. Restart the stack and sign in again to confirm the data persisted. Check: login works, the attachment exists in the filestore, and the PDF renders with its header and footer. If the PDF is missing content, review the report engine settings before go-live.
Limits to confirm in your environment
Can I add Enterprise modules to the community Odoo image?
Possibly, but confirm it with Odoo before you plan around it. Enterprise source code is not publicly available and requires a subscription or partner access, so it is not in the public community image. Mounting Enterprise addons into the community image or building your own image is covered on the sibling Enterprise Docker page, and it only works if your subscription gives you the code. Activation is a separate step: Enterprise databases are activated by entering the subscription code in the database. Ask Odoo how your subscription delivers Enterprise code, which builds you may keep in an internal registry, and how often you must rebuild when Odoo publishes new builds. Read the Odoo on-premise documentation for the activation steps.
Which wkhtmltopdf version does the image ship for PDF reports?
Check it inside the exact image you run, because Odoo's PDF reports depend on a specific wkhtmltopdf build. Run wkhtmltopdf --version in the container for the tag you pinned, then compare the result with the version Odoo documents for your release. A mismatch usually shows up as invoices without headers or footers, or as reports that fail to render. If the bundled build does not match, you have two options: a derived image that installs the correct package, or a different base image that you test end to end. Also confirm the report base URL and web base URL settings behind your reverse proxy, since PDF rendering fetches assets through those addresses. Test one invoice and one statement on staging before every image upgrade.
Is there an arm64 build for my Odoo version?
Confirm availability for the specific tag you intend to pin, not for the product in general. Check which platforms that tag publishes, then run a test install on the target architecture. Cover PDF generation, Python dependency installs, any Enterprise addons and your custom modules, because native packages are where ARM differences show up. Ask whether the arm64 variant follows the same release and patch timing as the amd64 image, since a lagging build can leave you on an unpatched version. If the arm64 build is missing for your version, decide early whether to change architecture, wait for a build or run a source install on that hardware. Record the result in your change log so the next upgrade repeats the same checks.
What outbound network access does a Docker Odoo install need?
Start from the endpoints Odoo documents and the services your apps use, then confirm each one with your firewall team. Typical outbound needs are:
- the upgrade service script, which Odoo's upgrade documentation ties to an Enterprise subscription
- in-app purchase services such as SMS, OCR and other paid services your apps call
- bank synchronization, payment and shipping APIs that your configuration uses
- package repositories and image registries used when you build or pull images
A default-deny egress policy blocks these silently, so features fail in ways that look like Odoo bugs. Test each integration on staging after the firewall is locked down. Document the destination, port, owner and business reason for every rule. The sibling page on restricted or air-gapped networks covers what stops working without each service.
How long will my Odoo version receive security patches?
Standard support covers the first three years after a major release, including security updates and bug fixes, on Odoo Online, Odoo.sh and on-premise. The dates Odoo lists are 18.0 until September 2027, 19.0 until September 2028 and 20.0 until September 2029. Standard support for 17.0 ended in September 2026. Paid extended support exists after that, but it is limited to Odoo.sh for select versions and to on-premise, and security patches are only provided during standard support. Confirm with Odoo whether extended support covers your version and whether it includes security patches. Because a pinned image tag does not change by itself, schedule your move to a supported major version before your window closes.
Will one Docker host support my number of Odoo users?
The container image alone cannot answer this. Worker count, memory limits and request timeouts are set in odoo.conf and in the host or container resources, and they must be sized together. Odoo documents a worker formula based on CPU count, and you should confirm the result with a load test on a staging copy that matches your production data volume and concurrency. Ask for three things before go-live: the number of workers and cron workers in use, where PostgreSQL runs and whether it shares host resources with Odoo, and the measured response times at peak. Cron jobs, report generation and imports compete for the same capacity, so test them during the load run, not separately.
Can DeployOpen run this Docker setup for us, and what would it cost?
DeployOpen implements, customizes, hardens, backs up, upgrades and supports self-hosted Odoo inside your own infrastructure, and most engagements are fixed-scope with the scope, deliverables and timelines agreed in writing before work starts. DeployOpen does not publish a price list, and a quote follows from that written scope. The main cost drivers are the apps and editions you license from Odoo, which you pay for directly; the number of custom modules and integrations; data migration; and whether you want a retainer for upgrades and continuous testing. Ask any partner to split the quote into one-time build work and recurring support, and to list which items depend on your Enterprise subscription.
Official Odoo documentation for self-hosted installs
Before you finalize a Docker-based Odoo design, read Odoo's own documentation for self-hosted installs. The on-premise documentation covers activating an Enterprise subscription with the subscription code, the packaged installers, database duplication with neutralization for test copies, and the other deployment paths Odoo supports. Compare those steps with your container plan, especially where the image, the database and the test copy process differ from what Odoo describes for its packaged installs. Ask your team to confirm which Odoo version tag the image uses and that the documented on-premise steps still apply to it.
The source installation guide is the reference for the dependencies and layout that a container hides from you. Use it to check the Python and system packages your custom addons may need, and to understand which parts of the stack your image build must reproduce if you add modules or change the base image. Treat it as a checklist for your Dockerfile review, not as a replacement for the container build, since the image already handles many of these steps for you.
Finally, read the standard and extended support page before you pick an image tag to run in production. It sets out how long each major version receives security updates and bug fixes, and it states that security patches come only during standard support. Confirm the support end date for the version you plan to run, and build your image update schedule around it. Decide who will rebuild and redeploy the image when a supported release or security fix arrives.

