
Running Odoo on your own server gives you full control of your data, modules and customisations, without per-user fees for the hosted edition. In return you handle updates and regular backups, which this guide covers.
Choosing resources #
| Use | Suitable plan | Why |
|---|---|---|
| Testing or a startup | VPS 4GB | Odoo and PostgreSQL together need at least 2 to 3 GB |
| A mid-size team with several modules | VPS 8GB | Inventory, accounting and reports use memory |
| A company with many users | VPS 16GB | Room for more concurrent work and a bigger database |
Before you start #
- An Ubuntu 24.04 or Debian 12 server with root access.
- A subdomain such as
erp.example.compointed to the server IP with an A record. - In the firewall, open only ports 22, 80 and 443 and keep the rest closed.
1. Install Docker #
curl -fsSL https://get.docker.com | sh systemctl enable --now docker docker compose version
2. The docker-compose file #
mkdir -p /opt/odoo && cd /opt/odoo
Create docker-compose.yml and choose a strong database password:
services:
db:
image: postgres:16
restart: unless-stopped
environment:
- POSTGRES_USER=odoo
- POSTGRES_PASSWORD=choose-a-strong-password
- POSTGRES_DB=postgres
volumes:
- db_data:/var/lib/postgresql/data
odoo:
image: odoo:18
restart: unless-stopped
depends_on:
- db
environment:
- HOST=db
- USER=odoo
- PASSWORD=choose-a-strong-password
volumes:
- odoo_data:/var/lib/odoo
caddy:
image: caddy:2
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
volumes:
db_data:
odoo_data:
caddy_data:
And the Caddyfile:
erp.example.com {
reverse_proxy odoo:8069
}
3. Start Odoo and create the database #
docker compose up -d docker compose logs -f odoo
Open https://erp.example.com and the database creation page appears. Choose a strong master password and keep it safe, because it allows creating, deleting and copying databases, then pick your language and country.
Backups #
- From Odoo’s own database manager (
/web/database/manager) you can download a full backup with data and attachments. - Take a snapshot from the VPS control panel before any update or new module.
- Keep a copy off the server; a snapshot does not replace a backup stored elsewhere.
Frequently asked questions #
Which Odoo version should I use?
Use the latest stable version available on Docker, as it gets updates for longer. Do not jump between major versions before testing the upgrade on a separate copy.
Does Odoo support Arabic and e-invoicing?
The interface supports Arabic, and there are local accounting modules for several countries. Confirm your country’s requirements with the module provider before relying on it.
How many users can the server handle?
It depends more on modules and data size than on user count. Start with 4GB, watch usage in the control panel and upgrade when needed.