Odoo Community can be deployed on your VPS using the Unihost application template in Portainer. Open Templates, choose Odoo, enter the PostgreSQL credentials and deploy the stack. Then configure the database master password, persistent storage, a domain with HTTPS, and backups. This guide also covers custom addons and safe image updates.
Compatibility: Linux with Docker Engine, Portainer and the Odoo Community Docker image. Odoo 20.0 is the latest stable major release as of November 6, 2026.
Requirements
You need a VPS with Docker and Portainer, administrator access, PostgreSQL and a domain. The original Unihost deployment uses Nginx Proxy Manager (NPM); Traefik is an alternative for HTTPS. For a small installation, 2 vCPU, 4 GB RAM and 40 GB SSD are a starting estimate, not an official universal requirement.
For Portainer basics, see What is Portainer?.
Steps
Step 1. Select the Odoo template
Sign in to Portainer, select the local environment and open Templates → Application → Odoo. Fill in the database username and a strong password, then deploy the application. The resulting stack is named odoo-app in the original Unihost template.




docker ps
Step 2. Set up PostgreSQL and storage
The official Odoo Docker image connects to PostgreSQL using these environment variables. The credentials must match the PostgreSQL container.
| Variable | Purpose |
|---|---|
| HOST | PostgreSQL service name |
| USER | PostgreSQL user |
| PASSWORD | PostgreSQL password |
HOST=db USER=odoo PASSWORD=YOUR_STRONG_DB_PASSWORD
Keep Odoo data at /var/lib/odoo and custom modules at /mnt/extra-addons. PostgreSQL also needs its own persistent data volume. Example mounts for the Odoo service:
volumes: - odoo_data:/var/lib/odoo - ./addons:/mnt/extra-addons
This is a Compose fragment, not a replacement for the Unihost template. Do not remove existing volumes when recreating containers.
Step 3. Protect the master password and configure workers
Set a unique master password in odoo.conf (normally mounted at /etc/odoo/odoo.conf). It protects database management and is different from the Odoo user password. If the template supplies default admin credentials, change them before exposing the site.
[options] admin_passwd = YOUR_UNIQUE_MASTER_PASSWORD
For a reverse-proxied production deployment, enable proxy mode and size the number of workers to available CPU and RAM. The following is an example, not a universal tuning recommendation:
[options] workers = 2 proxy_mode = True
Step 4. Configure a domain and HTTPS
To publish Odoo using Nginx Proxy Manager (NPM), follow these steps:
- Create a DNS A record for odoo.example.com pointing to your VPS public IP.
- Open NPM → Hosts → Proxy Hosts → Add Proxy Host.
- Set Domain Names to odoo.example.com and Scheme to http.
- Set Forward Hostname / IP to the Odoo service hostname reachable from NPM, and Forward Port to 8069.
- Enable Websockets Support when needed by your configuration. Under SSL, request a Let’s Encrypt certificate, enable Force SSL and save.
Use proxy_mode = True in odoo.conf when Odoo is behind a trusted proxy. With multiple workers, configure the evented/WebSocket endpoint according to your Odoo version. NPM and Odoo must have Docker network connectivity. Avoid exposing 8069 directly to the internet.
Nginx Proxy Manager installation and HTTPS configuration
Traefik with Portainer is an alternative for HTTPS.
odoo.example.com -> SERVER_IP Forward hostname: odoo-app Forward port: 8069

Restrict direct access to port 8069. Do not treat the HTTP login screen shown in an older screenshot as the desired public configuration.
Step 5. Install custom addons
Mount your trusted module folder at /mnt/extra-addons, confirm its presence in addons_path, restart Odoo, enable developer mode and update the Apps list before installing the module. Use only modules compatible with your Odoo version.
/mnt/extra-addons/my_custom_module/
Step 6. Back up Odoo
Use the Odoo Database Manager to download a ZIP backup that includes the filestore, or back up PostgreSQL with pg_dump. A database-only dump does not include attachments stored in the Odoo filestore.
docker exec DB_CONTAINER pg_dump -U odoo -d DATABASE_NAME -Fc > odoo-backup.dump
Keep copies of PostgreSQL, the Odoo filestore and configuration outside the VPS. Verify restoration periodically.
Step 7. Update the Docker image
Back up the database, filestore and configuration, then check the release notes and addon compatibility. For an installation already on the same major version, update the compatible image tag in Portainer and recreate the service without removing volumes. Upgrading from Odoo 19 to 20 requires a database migration, not just a new image.
odoo:20.0
Verify
Check that the Odoo and PostgreSQL containers are running, the site loads over HTTPS, users can sign in, modules are available and backups can be restored.
docker ps docker logs --tail 50 ODOO_CONTAINER

Troubleshooting
Odoo cannot connect to PostgreSQL
Check HOST, USER, PASSWORD, the database service and the shared Docker network.
The domain or HTTPS does not work
Check DNS, NPM or Traefik, TLS and access to internal port 8069.
A custom module is missing
Check the mounted /mnt/extra-addons directory, addons_path, module compatibility and the refreshed Apps list.
Odoo responds slowly
Check CPU, RAM, PostgreSQL performance and workers; increase VPS resources if necessary.
FAQ
Can I run Odoo Enterprise in Docker?
Yes, with a valid Enterprise subscription and the corresponding addons. The official Odoo image primarily provides Community.
How do I install custom modules?
Mount compatible addons at /mnt/extra-addons, add the path in Odoo configuration, restart and update the Apps list.
How do I back up Odoo?
Use Database Manager with filestore included, or pg_dump plus a separate copy of /var/lib/odoo and configuration.
What server size do I need for Odoo?
For a small deployment, 2 vCPU, 4 GB RAM and 40 GB SSD are a starting estimate. Size workers, RAM and storage for actual users and modules.
Related Articles
- What is Portainer?
- Traefik with Portainer
- MariaDB with Portainer (Odoo itself uses PostgreSQL)
- Official Odoo Docker image
- Nginx Proxy Manager setup
Deploy Odoo on Unihost infrastructure
Use Unihost application templates and a VPS sized for your Odoo workload.