Deploy Odoo with Dokploy: Docker Compose Setup Guide
Step-by-step guide to deploying Odoo ERP on your VPS using Dokploy and Docker Compose. Includes PostgreSQL database, persistent storage, and SSL configuration.
Deploy Odoo with Dokploy
Dokploy is an open-source server management platform that simplifies deploying Docker Compose applications on your VPS. It handles reverse proxy configuration, SSL certificates, and deployment management — making it practical to run Odoo as a full-featured ERP and business management suite.
This guide walks you through deploying Odoo with a PostgreSQL database backend, persistent storage for custom modules and filestore, and automatic HTTPS.
Prerequisites
- A VPS with at least 2 vCPUs, 4 GB RAM, and 30 GB storage
- Dokploy installed and running on your server (installation docs)
- A domain name (e.g.,
erp.yourdomain.com) with DNS A record pointing to your server's IP
Docker Compose Configuration
Create a new Compose project in Dokploy and paste the following configuration:
version: "3.8"
services:
odoo:
image: odoo:17
restart: unless-stopped
ports:
- "8069:8069"
- "8072:8072"
environment:
- HOST=odoo-db
- PORT=5432
- USER=odoo
- PASSWORD=${ODOO_DB_PASSWORD}
volumes:
- ../files/odoo-web-data:/var/lib/odoo
- ../files/odoo-addons:/mnt/extra-addons
- ../files/odoo-config:/etc/odoo
depends_on:
odoo-db:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8069/web/health || exit 1"]
interval: 30s
timeout: 10s
retries: 5
odoo-db:
image: postgres:16-alpine
restart: unless-stopped
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=odoo
- POSTGRES_PASSWORD=${ODOO_DB_PASSWORD}
- PGDATA=/var/lib/postgresql/data/pgdata
volumes:
- ../files/odoo-db-data:/var/lib/postgresql/data/pgdata
healthcheck:
test: ["CMD-SHELL", "pg_isready -U odoo"]
interval: 10s
timeout: 5s
retries: 5
Note: Port 8069 is the main Odoo web interface, and port 8072 is for the live chat/longpolling service. Odoo creates databases dynamically through its database manager — the PostgreSQL
POSTGRES_DBis set topostgres(the default) and Odoo creates application databases as needed.
Environment Variables
Set these in Dokploy's Environment tab for your compose project:
| Variable | Purpose | Example |
|---|---|---|
ODOO_DB_PASSWORD |
PostgreSQL password for Odoo | a-strong-random-password |
In Dokploy, environment variables are set via the Environment editor in the project settings. Do not create a .env file manually — Dokploy manages this for you. Additional Odoo configuration can be set in /etc/odoo/odoo.conf within the config volume.
Volumes & Data Persistence
This setup uses Dokploy's ../files convention for bind-mounted volumes:
../files/odoo-web-data— Odoo filestore (uploaded documents, session data, generated reports)../files/odoo-addons— Custom and third-party Odoo modules../files/odoo-config— Odoo configuration files (odoo.conf)../files/odoo-db-data— PostgreSQL database files
The ../files path is relative to the compose file inside Dokploy's project directory. This ensures your data persists across redeployments. Avoid using absolute paths (e.g., /opt/odoo) because Dokploy may clean them during redeployment.
To install custom modules, place them in the ../files/odoo-addons directory and update the Odoo Apps list from the web interface.
Domain & SSL Setup
- In your Dokploy project, navigate to the Domains tab
- Click Add Domain and enter your domain (e.g.,
erp.yourdomain.com) - Set the container port to
8069 - Enable HTTPS — Dokploy automatically provisions a Let's Encrypt SSL certificate
- Save and wait for the certificate to be issued (usually under a minute)
Dokploy's built-in Traefik reverse proxy handles TLS termination and routes traffic to your Odoo container. For live chat functionality, ensure WebSocket connections are supported (Dokploy's Traefik handles this by default).
Verifying the Deployment
- In Dokploy, go to your project's Deployments tab and click Deploy
- Watch the build logs — you should see both
odooandodoo-dbcontainers start - Check the Logs tab for the
odooservice. Look for:HTTP service (werkzeug) running on - Open
https://erp.yourdomain.comin your browser — you should see the Odoo database manager - Create a new database, set the master password, and choose which modules to install
- Log in to your new Odoo instance and configure your company details
Troubleshooting
Odoo shows "Database creation error"
Ensure PostgreSQL is healthy and the ODOO_DB_PASSWORD matches between services. Odoo needs the PostgreSQL user to have CREATEDB privileges, which the default postgres superuser setup provides. Check odoo-db logs for connection errors.
Custom modules not appearing in Apps list
Place module directories in ../files/odoo-addons. Each module must have an __manifest__.py file. In Odoo, go to Apps, remove the "Apps" filter, and click "Update Apps List" to scan for new modules.
Odoo is slow with many concurrent users
Increase the workers setting in odoo.conf (default is 0, meaning single-threaded). A good rule is (2 × CPU cores) + 1. Place the config file in ../files/odoo-config/odoo.conf with workers = 4 and max_cron_threads = 1.
SSL certificate not issuing Ensure your domain's DNS A record points to your server's IP and has propagated. Dokploy uses Let's Encrypt HTTP-01 challenges, so port 80 must be accessible. Check Traefik logs in Dokploy for certificate-related errors.
Learn more about Odoo in our complete overview.
Need a VPS? Hostinger VPS starts at $4.99/mo — perfect for running Odoo.
For more on Docker Compose deployments in Dokploy, see the Dokploy Docker Compose documentation.
App data sourced from selfh.st open-source directory.
Ready to get started?
Get the best VPS hosting deal today. Hostinger offers 4GB RAM VPS starting at just $4.99/mo.
Get Hostinger VPS — $4.99/mo// up to 75% off + free domain included
// related topics
fordnox
Expert VPS reviews and hosting guides. We test every provider we recommend.
// last updated: February 12, 2026. Disclosure: This article may contain affiliate links.