Follow the guidance below:
Install Docker Desktop
Download and Install Docker Desktop
Docker Desktop Includes:
-
Docker CLI
-
Docker Engine
-
Docker Compose
Docker recommends using Docker Desktop as the easiest way to install Docker Desktop.
During Installation, use WSL 2 when offered.
After Installation, open Docker Desktop and wait until it shows it is running.
Official Installation guide: Docker Desktop for Windows↗
Verify Docker
Open Terminal and run:
docker --version
Create a Folder for Odoo
Create following Files and Folders inside Odoo:
odoo/
├── addons/
├── conf/
│ ├── odoo.conf
├── logs/
└── docker-compose.yaml
or use the following command inside Odoo Folder:
mkdir addons, conf, logs
New-Item conf\odoo.conf, docker-compose.yaml -ItemType File
Docker Compose YAML
Paste this inside docker-compose.yaml
services:
db:
image: postgres:16
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=odoo
- POSTGRES_PASSWORD=odoo
volumes:
- odoo18-db-data:/var/lib/postgresql/data
restart: unless-stopped
odoo:
image: odoo:18.0
depends_on:
- db
ports:
- "8069:8069"
volumes:
- odoo18_data:/var/lib/odoo
- ./addons:/mnt/extra-addons
- ./conf/odoo.conf:/etc/odoo/odoo.conf
- ./logs:/var/log/odoo
environment:
- HOST=db
- USER=odoo
- PASSWORD=odoo
restart: unless-stopped
volumes:
odoo18-db-data:
odoo18_data:
Change the image:odoo:18.0 to the odoo version you intend to install e.g; image:odoo:19.0 or add your own Docker Image.
Rename the Docker volume names to the correct version of odoo (doesn't affect installation)
Odoo Config
Paste this inside conf/odoo.conf
[options]
addons_path = /usr/lib/python3/dist-packages/odoo/addons,/mnt/extra-addons
data_dir = /var/lib/odoo
db_host = db
db_port = 5432
db_user = odoo
db_password = odoo
admin_passwd = "Your Password"
log_level = info
workers = 0
Add your own admin password to admin_passwd = "Your Password" for database management, this password will be used to create, delete or downloading backup database.
Start Odoo
Open Powershell in Odoo folder and run:
docker compose up -d
The first startup may take few minutes.
Check the status of Odoo
docker ps
You should see:
| NAME | STATUS | PORTS |
|---|---|---|
| odoo | Up | 0.0.0.0:8069->8069/tcp |
| odoo-db | Up | 5432/tcp |
Open Odoo
Open your browser:
You should see the Odoo Database Creation Screen
Create your first Database:
e.g:
-
Database Name: Test
-
Admin password: ********
-
Email: user
-
Password: ****
-
Language: English
-
Country: Pakistan
select your country
Then click create database.
Manage Odoo
You can manage your Odoo containers using Docker Desktop or Use Powershell in the Odoo folder
# stop odoo
docker compose stop
# start odoo
docker compose start
# remove odoo
docker compose down
# create odoo
docker compose up -d
Above commands are to manually configure, Odoo will automatically start and stop when turning on or closing Docker Desktop respectively.
Add Custom Addons
Place your custom addons in odoo/addons
Restart Odoo using Docker Desktop