Skip to Content

How to Install Odoo Using Docker?

June 1, 2026 by

Docker is one of the most popular containerization tools, significantly simplifying the installation and deployment of business applications. Installing Odoo with Docker is a fast, efficient and flexible method that lets you run a fully functional ERP system in just a few minutes. In this guide, we will walk you through the whole process step by step.

Why install Odoo using Docker?

Docker offers a number of benefits that make it an ideal solution for installing Odoo:

  • Environment isolation - each container runs independently, which eliminates conflicts with other applications
  • Ease of management - you can quickly start, stop and remove instances
  • Portability - the same container runs identically on different operating systems
  • Fast deployment - installation takes minutes instead of hours
  • Easy scaling - you can run multiple Odoo instances at the same time

Compared with traditional methods, such as installing Odoo on Windows or installing on Ubuntu, Docker offers far greater flexibility and convenience.

Prerequisites

Before you install Odoo using Docker, make sure you have:

  • Docker Desktop (Windows/macOS) or Docker Engine (Linux) installed
  • Docker Compose installed
  • At least 4 GB of RAM (8 GB recommended)
  • At least 20 GB of free disk space
  • Basic knowledge of the command line

Installing Docker

For Windows and macOS

Download Docker Desktop from docker.com and install it following the instructions. After installation, launch the application and make sure Docker is working correctly by running the command:

docker --version

For Linux (Ubuntu/Debian)

Run the following commands in the terminal:

sudo apt-get update
sudo apt-get install docker.io docker-compose
sudo systemctl start docker
sudo systemctl enable docker

Installing Odoo with Docker Compose

Using Docker Compose is the most convenient way to run Odoo together with a PostgreSQL database.

Step 1: Create the project directory

Create a new directory for your Odoo instance and the required subdirectories:

mkdir odoo-docker
cd odoo-docker
mkdir -p config addons

Step 2: Create the docker-compose.yml file

Create a docker-compose.yml file with the following configuration:

version: '3.1'
services:
  web:
    image: odoo:17.0
    depends_on:
      - db
    ports:
      - "8069:8069"
    volumes:
      - odoo-web-data:/var/lib/odoo
      - ./config:/etc/odoo
      - ./addons:/mnt/extra-addons
    environment:
      - HOST=db
      - USER=odoo
      - PASSWORD=odoo
    restart: unless-stopped
  db:
    image: postgres:15
    environment:
      - POSTGRES_DB=postgres
      - POSTGRES_PASSWORD=odoo
      - POSTGRES_USER=odoo
      - PGDATA=/var/lib/postgresql/data/pgdata
    volumes:
      - odoo-db-data:/var/lib/postgresql/data/pgdata
    restart: unless-stopped

volumes:
  odoo-web-data:
  odoo-db-data:

In the configuration above, we use named volumes (odoo-web-data, odoo-db-data) for application and database data, which provides better performance and management, and bind mounts (./config, ./addons) for configuration files and add-ons, which makes it easy to edit them directly from the host system.

Step 3: Start the containers

Run the command that will pull the images and start the containers:

docker-compose up -d

The -d parameter runs the containers in the background. The first start may take a few minutes, because Docker has to download all the required images. The database container needs about 20-30 seconds to start up fully before it can connect to Odoo.

Step 4: Check the container status

Make sure the containers are running correctly:

docker-compose ps

Both containers should have the status "Up". You can also check the logs to make sure there are no errors:

docker-compose logs

Step 5: Access Odoo

Open your browser and go to:

http://localhost:8069

The Odoo setup screen will appear, where you can create a new database. Enter the database name, the administrator's email address and the master password. The master password will be used to manage databases, so make sure it is secure.

Try Odoo for free

Advanced configuration

Adding custom modules

The addons directory has already been created in the project directory. Place your custom modules in it - they will be automatically mounted in the container at the path /mnt/extra-addons. After adding new modules, you must update the app list in the Odoo interface (Settings → Update Apps List).

Configuring the odoo.conf file

You can create your own odoo.conf configuration file in the config directory:

[options]
admin_passwd = silne_haslo_admin
db_host = db
db_port = 5432
db_user = odoo
db_password = odoo
addons_path = /mnt/extra-addons
data_dir = /var/lib/odoo
logfile = /var/log/odoo/odoo.log
log_level = info

To make Odoo use this file, add the following line to the web section in docker-compose.yml, in the command section:

    command: -- --config=/etc/odoo/odoo.conf

Limiting resources

For better control over resources, you can add limits to docker-compose.yml:

  web:
    image: odoo:17.0
    deploy:
      resources:
        limits:
          cpus: '2.0'
          memory: 4G
        reservations:
          cpus: '1.0'
          memory: 2G

Managing Odoo containers

Stopping containers

docker-compose stop

Starting again

docker-compose start

Restarting containers

docker-compose restart

Removing containers

docker-compose down

Note: The command above removes the containers but does not remove the volumes with data. To remove the data as well, use:

docker-compose down -v

Viewing logs

docker-compose logs -f web

The -f parameter continuously displays new logs (follow mode).

Installing Odoo with individual Docker containers

If you prefer a simpler approach without Docker Compose, you can run Odoo with individual commands. The modern approach uses Docker networks instead of the deprecated --link flag:

Create a Docker network

docker network create odoo-network

Starting the PostgreSQL database

docker run -d \
  --name db \
  --network odoo-network \
  -e POSTGRES_USER=odoo \
  -e POSTGRES_PASSWORD=odoo \
  -e POSTGRES_DB=postgres \
  -v odoo-db-data:/var/lib/postgresql/data \
  postgres:15

Wait about 20-30 seconds for the database to start up fully, then start the Odoo container:

Starting Odoo

docker run -d \
  --name odoo \
  --network odoo-network \
  -p 8069:8069 \
  -e HOST=db \
  -e USER=odoo \
  -e PASSWORD=odoo \
  -v odoo-web-data:/var/lib/odoo \
  odoo:17.0

Thanks to the Docker network, containers can communicate using container names as hostnames.

Contact us

Creating backups

Regular backups are essential for data security. You can back up the database with the following command:

First, check the exact name of the database container:

docker ps | grep postgres

Then run the backup (replace the container name with the one that matches your setup):

docker exec -t NAZWA_KONTENERA_DB pg_dump -U odoo postgres > backup_$(date +%Y%m%d_%H%M%S).sql

For a docker-compose setup, the container name is usually odoo-docker_db_1 or odoo-docker-db-1 (depending on the Docker Compose version).

To restore a backup:

cat backup.sql | docker exec -i NAZWA_KONTENERA_DB psql -U odoo postgres

It is also worth backing up the Odoo filestore (attachments, images):

docker run --rm -v odoo-web-data:/data -v $(pwd):/backup ubuntu tar czf /backup/odoo-filestore-backup.tar.gz /data

Common problems and solutions

The container does not start

Check the container logs:

docker-compose logs

The most common causes are: port conflicts, lack of permissions to directories, or insufficient system resources.

Database connection error

Make sure the database container is running and that the connection parameters are correct. Check the status:

docker-compose ps
docker-compose logs db

The database container may need additional time to initialize on the first start.

Port issues

If port 8069 is in use, change the port mapping in the docker-compose.yml file, e.g. to "8070:8069", and then restart the containers:

docker-compose down
docker-compose up -d

Missing directory permissions

On Linux systems, you may need to set the appropriate permissions:

sudo chown -R 101:101 config addons

The Odoo user in the container has UID 101.

Try Odoo for free

Performance optimization

To optimize Odoo performance in Docker:

  • Allocate more resources in the Docker Desktop settings (Settings → Resources)
  • Use named volumes instead of bind mounts for data directories for better I/O performance
  • Configure memory and CPU limits for containers in the docker-compose.yml file
  • Regularly clean up unused images and containers: docker system prune -a
  • For production environments, consider using an external PostgreSQL database (not in a container)
  • Configure worker processes in the odoo.conf file (for Enterprise versions): workers = 4
  • Enable Redis cache for better performance of user sessions

Integration with other systems

After installing Odoo with Docker, you can easily integrate the system with other applications. For example, you can set up an Odoo integration with WooCommerce or manage key business processes, such as warehouse management in Odoo.

Next steps after installation

After successfully installing Odoo with Docker, you can start configuring individual modules:

FAQ - Frequently Asked Questions

Is installing Odoo with Docker safe for a production environment?

Yes, Docker is widely used in production environments by many companies and organizations around the world. However, you need to remember about proper security: changing default passwords (especially POSTGRES_PASSWORD and admin_passwd), configuring a firewall (closing ports other than 80/443), regularly updating images (docker-compose pull) and implementing SSL/TLS for encrypted connections (e.g. using an Nginx or Traefik reverse proxy). We also recommend regular backups, container security monitoring, using Docker secrets for passwords, and limiting container resources.

How do I upgrade Odoo to a newer version in Docker?

To upgrade Odoo in Docker, first create a full backup of the database and filestore. Then change the version number in the docker-compose.yml file (e.g. from odoo:16.0 to odoo:17.0) and run the commands: docker-compose down, docker-compose pull and docker-compose up -d. After the container starts, Odoo will automatically detect the new version and offer a migration the first time you log in to the database. Keep in mind that upgrades between major versions (e.g. 16.0 → 17.0) may require manual module updates and may be incompatible with some third-party modules. Always test the upgrade in a test environment before deploying to production. For production upgrades, we recommend using tools such as Odoo.sh or migration services.

How many system resources does Odoo running in Docker need?

The minimum requirements are 4 GB of RAM and 2 CPU cores, but for optimal performance we recommend 8 GB of RAM and 4 CPU cores. Requirements may grow depending on the number of users, installed modules and database size. For small companies (5-10 users), 8 GB of RAM is enough, while larger organizations (50+ users) may need 16 GB or more. You should also allow about 20-50 GB of disk space for the system and data, although this can grow significantly depending on the amount of stored documents and attachments. Docker adds minimal overhead (about 100-200 MB of RAM) compared with a native installation. It is worth monitoring resource usage with the docker stats command and adjusting the limits in docker-compose.yml.

Summary

Installing Odoo with Docker is a modern, efficient and flexible solution that significantly simplifies the deployment of an ERP system. Thanks to containerization, you can quickly launch a fully functional Odoo environment, manage it easily and scale it as needed. Docker Compose further automates the configuration by connecting Odoo with a PostgreSQL database in a consistent, easy-to-manage way.

Whether you are just starting your Odoo journey or you are an experienced user looking for a more efficient way to deploy, Docker is an excellent solution. This method is especially useful for developers who need to quickly create test environments, as well as for companies planning a production deployment with easy scaling and management.

Need help implementing Odoo in your company? KK Innovations are experts in ERP systems and containerization. We will help you with professional installation, configuration and optimization of Odoo tailored to the specifics of your business. Contact us today to find out how we can support the growth of your company with modern technology solutions!

Contact us