
Odoo is an open-source suite of business apps for CRM, sales, invoicing, inventory, purchase, POS, websites and more. Docker is the fastest way to run Odoo 19 on any operating system: Linux, Windows or macOS. Odoo and PostgreSQL run in separate containers, your data lives in volumes, and upgrading is a matter of pulling a new image. In this tutorial we will install Odoo 19 with Docker Compose.
Table of Contents
Prerequisites
- A Linux server, or a Windows or macOS computer with Docker Desktop
- At least 2 GB of RAM
- A user with sudo privileges (Linux)
Conventions
# – run the command with root privileges, either as the root user or with sudo
$ – run the command as a regular (non-root) userStep 1. Install Docker
On Ubuntu or Debian, install Docker Engine and the Compose plugin with the official convenience script, then add your user to the docker group:
$ curl -fsSL https://get.docker.com | sudo sh
$ sudo usermod -aG docker $USERLog out and back in, then check the versions:
$ docker --version
$ docker compose versionOn Windows or macOS, install Docker Desktop instead and make sure it is running.
Step 2. Create the Project Folder
$ mkdir -p ~/odoo19/config ~/odoo19/addons
$ cd ~/odoo19Step 3. Create the Docker Compose File
Create a file named docker-compose.yml:
$ nano docker-compose.ymlPaste the following, and replace STRONG_DB_PASSWORD in both places:
services:
db:
image: postgres:16
environment:
POSTGRES_DB: postgres
POSTGRES_USER: odoo
POSTGRES_PASSWORD: STRONG_DB_PASSWORD
volumes:
- odoo-db-data:/var/lib/postgresql/data
restart: unless-stopped
odoo:
image: odoo:19
depends_on:
- db
ports:
- "8069:8069"
- "8072:8072"
environment:
HOST: db
USER: odoo
PASSWORD: STRONG_DB_PASSWORD
volumes:
- odoo-web-data:/var/lib/odoo
- ./config:/etc/odoo
- ./addons:/mnt/extra-addons
restart: unless-stopped
volumes:
odoo-db-data:
odoo-web-data:Step 4. Create the Odoo Configuration File
$ nano config/odoo.conf[options]
admin_passwd = STRONG_MASTER_PASSWORD
addons_path = /mnt/extra-addons
proxy_mode = True
workers = 2
max_cron_threads = 1Step 5. Start Odoo 19
$ docker compose up -d
$ docker compose psYou should see both containers running:
NAME IMAGE STATUS PORTS
odoo19-db-1 postgres:16 Up 20 seconds 5432/tcp
odoo19-odoo-1 odoo:19 Up 19 seconds 0.0.0.0:8069->8069/tcp, 0.0.0.0:8072->8072/tcpOpen http://YOUR_SERVER_IP:8069 (or http://localhost:8069 on your own computer) and create a database.
Step 6. Add Custom Modules
Copy your custom or third-party modules into the addons folder and restart Odoo:
$ docker compose restart odooIn Odoo, go to Apps, click Update Apps List, then search for and install the module. To upgrade a module from the command line:
$ docker compose exec odoo odoo -d DATABASE_NAME -u MODULE_NAME --stop-after-initStep 7. Back Up and Update
Back up the database and the filestore regularly:
$ docker compose exec db pg_dump -U odoo -Fc DATABASE_NAME > backup_$(date +%F).dump
$ docker run --rm -v odoo19_odoo-web-data:/data -v $PWD:/backup alpine tar czf /backup/filestore_$(date +%F).tgz -C /data .To update to the latest Odoo 19 image:
$ docker compose pull
$ docker compose up -dFor production, put Nginx with SSL in front of the container, as shown in our Ubuntu 24.04 guide.
Conclusion
Congratulations! You have successfully installed Odoo 19. Open your browser, create your first database and start installing the apps your business needs. For more options, check the official Odoo documentation, or see our Odoo 19 installation guide for every platform.
Of course, you don't have to install Odoo 19 yourself. As a CloudPk client you can ask our Odoo team to install, configure, host and maintain Odoo for you, on our fully managed SaaS or on your own server. Book a free consultation, or message us on WhatsApp +92 302 0600001, and we will take care of it.
PS. If this guide helped you, please share it with your friends on social networks, or ask a question in our Odoo Help Forum. Want to learn more? Take our free course Install and Administer Odoo 19.