❤️ AZDIGI has officially updated to a new blog system. However, some posts may have incorrect or mismatched images. Please click the Report article button at the bottom of the post so AZDIGI can update as quickly as possible. Thank you!

To start your journey of exploring and implementing a modern and flexible business management system, Odoo is an indispensable choice. With the ability to integrate a variety of modules from sales management, warehouse, accounting to marketing and human resources, Odoo provides businesses with a comprehensive and powerful platform. However, installing and configuring Odoo can be a challenge for beginners. To solve this problem, Docker, a lightweight and convenient virtualization tool, will be the optimal solution.

In this article, we will explore the specific steps to install Odoo with Docker, helping you easily set up and operate the system efficiently and quickly.

Step 1: Install Docker and Docker Compose

First, you need to login to your VPS via SSH or access your VPS or server with root privileges first. If you don’t know how to SSH into your VPS/Server, you can refer to the following tutorial:

Once you log in to your VPS, you update the system packages and install Docker with the following commands:

AZDIGI Tutorial
sudo apt-get update -y
    
AZDIGI Tutorial
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
    
Instructions for installing odoo with docker.
AZDIGI Tutorial
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    
Instructions for installing odoo with docker.
AZDIGI Tutorial
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
    
Instructions for installing odoo with docker.

The process of updating system packages is complete, you proceed to install docker:

AZDIGI Tutorial
sudo apt-get update && sudo apt-get install docker-ce
    
Instructions for installing odoo with docker.

Next, you install Docker Compose:

AZDIGI Tutorial
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    
AZDIGI Tutorial
sudo chmod +x /usr/local/bin/docker-compose
    
Instructions for installing odoo with docker.

Step 2: Create a Docker Compose file.

You create a folder for your Odoo project, here I will create a folder named odoo-docker and move into this folder.

AZDIGI Tutorial
mkdir /home/odoo-docker && cd /home/odoo-docker
    

Next you create a docker-compose.yml file in your project directory.

AZDIGI Tutorial
touch docker-compose.yml
    

Then you can use vi, nano command to edit docker-compose.yml file and add following configuration content and save the file:

version: '3.1'

services: web: image: odoo:14 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

db: image: postgres:13 environment: - POSTGRES_DB=postgres - POSTGRES_PASSWORD=odoo - POSTGRES_USER=odoo volumes: - odoo-db-data:/var/lib/postgresql/data

volumes: odoo-web-data: odoo-db-data:
How to install odoo with docker

Step 3: Create the configuration and addon folders.

Create folders on your VPS to store Odoo data and configuration:

AZDIGI Tutorial
mkdir config addons
    
How to install odoo with docker

If you want to customize Odoo configuration, you can create a configuration file odoo.conf in the config folder:

AZDIGI Tutorial
vi config/odoo.conf
    

Here I have configured the basic content of the odoo.conf file as below, you can configure more according to your own needs.

[options]
; admin_passwd = admin
db_host = db
db_port = 5432
db_user = odoo
db_password = odoo
addons_path = /mnt/extra-addons
How to install odoo with docker

Step 4: Run Docker Compose.

Now the configuration is complete and you start the services with Docker Compose:

AZDIGI Tutorial
docker-compose up -d
    
How to install odoo with docker

Step 5: Go to Odoo.

After the boot process is complete, open your web browser and access Odoo via the VPS IP address with port 8069.

http://IP:8069

When you access, the Database creation page will appear, you fill in the necessary information. With Master Password odoo will suggest you a randomly generated password. You can use this password or change it according to your needs.

How to install odoo with docker
How to install odoo with docker
Share:
This article has been reviewed by AZDIGI Team

About the author

Đàm Trung Kiên

Đàm Trung Kiên

Chào mọi người, mình là Kiên - hiện đang công tác tại Phòng Kỹ thuật AZDIGI. Trong quá trình làm việc mình có cơ hội được tiếp xúc với khá nhiều các vấn đề liên quan đến Website/Hosting/VPS/Server, do đó mình viết lại các hướng dẫn này nhằm chia sẻ kiến thức, cũng như tạo một môi trường để chúng ta giao lưu và học hỏi lẫn nhau, trau dồi thêm nhiều kiến thức bổ ích hơn nữa.

10+ years serving 80,000+ customers

Start your web project with AZDIGI