Odoo 5 steps installation
Odoo 5 steps installation

How to Install Odoo 18 with Docker in 5 Simple Steps

Introduction:

Odoo 18 is one of the most popular open-source ERP platforms, trusted for streamlining sales, accounting, and operations. Setting it up can feel overwhelming unless you use Docker. With containerization, you can deploy Odoo 18 in a clean, hassle-free environment that works the same on any server. In this guide, we’ll show you how to install Odoo 18 with Docker in 5 simple steps so you can unlock its full potential without the usual deployment headaches.

Odoo + Docker: Why It Matters

Odoo 18 provides a robust ERP suite, but traditional installs are complex with manual configuration and dependencies. Docker simplifies this by containerizing Odoo and PostgreSQL, reducing setup time, avoiding version conflicts, and easing scaling. Ideal for developers testing features or businesses in production, it ensures a reliable experience.

Step-by-Step Instructions

Step 1: Install Docker Desktop
To run Odoo smoothly, the first requirement is Docker, the platform that creates and manages containers. Docker Desktop makes this easy on Windows and macOS, while Linux users can install Docker Engine directly from their package manager. Once installed, verifying with docker –version ensures Docker is active, and docker compose version confirms you are ready to deploy multi-container apps such as Odoo and PostgreSQL.
Installation Guide

Download Docker Desktop
Windows/macOS: Get it from the official site docker.com/products/docker-desktop.

Linux: Use your package manager or follow Docker Engine installation docs.

Windows Installation
Run the installer and select “Install required WSL2 components” if prompted.
Restart your system after installation.

Linux Installation
Update package index: sudo apt update.
Install prerequisites: sudo apt install ca-certificates curl gnupg lsb-release.
Add Docker’s official GPG key and repository.
Install Docker Engine: sudo apt install docker-ce docker-ce-cli containerd.io.

Odoo installation steps 3

After Installation
Verify Docker: docker –version.
Verify Docker Compose: docker compose version.

Expected: Both commands should return version details, confirming Docker is ready to use.

Docker is steup properly once the instructions are completed

Step 2: Create a Project Folder for Odoo
With Docker ready, the next step is to create a dedicated folder where all your Odoo files will live. Keeping a separate project directory ensures your configuration files and data stay organized, making it easier to manage and scale later.

Setup Guide

Choose your drive or location
Windows: Open PowerShell or Command Prompt.

Linux/macOS: Open a terminal.

Create a new directory
Example: mkdir odoo-docker

This creates a clean folder named odoo-docker.

Navigate into the folder
cd odoo-docker

Ensures you are working inside the project directory.

Confirm your location
Run pwd (Linux/macOS) or check the path in PowerShell.

Expected: The terminal should display the full path to your odoo-docker folder.

Step 3: Create a Docker Compose File
Now that the project folder is ready, the next task is to define how Odoo and PostgreSQL will run together. This is done using a docker-compose.yml file. Think of it as a recipe that tells Docker which services to start, which ports to use, and where to store your data.

Setup Guide

Open a text editor in your odoo-docker folder.
Windows: Use Notepad or VS Code.

Linux/macOS: Use nano or any preferred editor.

Create a new file named docker-compose.yml.

Add the following configuration:

version: ‘3.1’
services:
web:
image: odoo:18
depends_on:
– db
ports:
– “8069:8069”
volumes:
– odoo-web-data:/var/lib/odoo
– ./config:/etc/odoo
– ./addons:/mnt/extra-addons

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

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

Beginner’s Note
YAML (YAML Ain’t Markup Language) is a simple text format that Docker Compose uses to read instructions. Each line here tells Docker what image to run (Odoo or PostgreSQL), which ports to open, and where to save data. By using one file, you avoid manually starting each service separately—Docker does it all at once.

Odoo installation steps 2

What to Expect

You now have a docker-compose.yml file inside your project folder.

This file defines two services:

web → Runs the Odoo 18 container.

db → Runs PostgreSQL as the database backend.

Once saved, this file will allow you to start both containers together in the next step.

Step 4: Start Odoo and PostgreSQL Containers
With the docker-compose.yml file ready, it’s time to launch Odoo and its database. Docker Compose will read the file and spin up both containers in one command.

Setup Guide

Open a terminal or PowerShell window inside your project folder (odoo-docker).

Run the following command:

docker compose up -d

up → tells Docker to start the services.

-d → runs the containers in detached mode (in the background).

What to Expect

Docker will automatically pull the required images (odoo:18 and postgres:16) if they aren’t already on your system.

The containers will be created and started in the background.

You can confirm with:

docker ps

Expected: A list showing both odoo and postgres containers running.

Step 5: Access Odoo in Your Browser
With the containers up and running, it’s time to use Odoo.

Setup Guide

Open your browser and go to: http://localhost:8069.

The Odoo setup page will appear.

Enter a Master Password to secure your databases.

Create a new database by providing:

Email and password for the admin user
Optionally, select Load demo data to explore Odoo with sample records.

What to Expect

Odoo 18 will start in your browser.

You’ll be logged in as the admin and ready to install and explore modules like Sales, CRM, and Accounting.

Quick Checklist: Odoo 18 with Docker Setup

✅ Task Confirmation
Docker Desktop / Docker Engine installed docker –version shows version
Docker Compose available docker compose version shows version
Project folder created Path visible (e.g., /home/user/odoo-docker)
docker-compose.yml file saved File exists in project folder
Containers started successfully Odoo accessible at http://localhost:8069

Tips / Troubleshooting

Odoo doesn’t open in browser → Check if port 8069 is free. If not, change it in docker-compose.yml (e.g., 8070:8069) and restart with docker compose up -d.

Images take too long to download → This is normal the first time. Future runs will be faster since images are cached locally.

Containers fail to start → Run docker compose logs to see error details (often a typo in docker-compose.yml).

PostgreSQL errors → Make sure the POSTGRES_USER and POSTGRES_PASSWORD in your compose file match what Odoo expects.

Permission denied on Linux → Use sudo docker or add your user to the docker group.

 

Written by mazahir

Leave a Reply

Is your social media safe- technodebate.com

Is your social media account safe in 2024