How to Set Up Odoo 17 Locally on Windows 11 (Step-by-Step with Docker)
The fastest, cleanest way to get a fully working Odoo development environment on Windows — no manual PostgreSQL installation, no Python version conflicts, no headaches.
Why Docker?
Installing Odoo manually on Windows means dealing with Python version mismatches, PostgreSQL configuration, system PATH issues, and a dozen other things that have nothing to do with actually learning Odoo.
Docker sidesteps all of that. You get a pre-configured Odoo container and a PostgreSQL container that talk to each other — ready to run in under 15 minutes.
This guide walks you through the entire setup from scratch, assuming you have a fresh Windows 11 machine and nothing installed yet.
What You’ll Need
- Windows 11 (Home or Pro)
- At least 8GB RAM (16GB recommended)
- At least 10GB of free disk space
- A stable internet connection for the initial Docker image download
Step 1 — Install WSL 2
Docker Desktop on Windows requires WSL 2 (Windows Subsystem for Linux). If you haven’t set it up yet:
Open PowerShell as Administrator and run:
wsl --install
This installs WSL 2 and Ubuntu automatically. Restart your machine when prompted.
After restart, Ubuntu will open and ask you to create a Linux username and password — set those up, then close the window.
Verify WSL 2 is working:
wsl --list --verbose
You should see Ubuntu listed with VERSION 2.
Step 2 — Install Docker Desktop
- Download Docker Desktop from docker.com/products/docker-desktop
- Run the installer — keep all default settings
- When asked about WSL 2 backend, make sure it’s checked
- Restart when prompted
After restart, Docker Desktop launches automatically. Wait for it to fully start — the whale icon in the system tray should stop animating.
Verify Docker is working by opening Git Bash or PowerShell and running:
docker --version
docker-compose --version
Both should return version numbers without errors.
Step 3 — Install Git Bash (If You Don’t Have It)
Git Bash gives you a Linux-like terminal on Windows — much nicer for Odoo development than PowerShell.
Download from git-scm.com and install with default settings.
Step 4 — Install VS Code + Dev Containers Extension
VS Code is the best editor for Odoo development on Windows because of the Dev Containers extension, which lets you browse and edit files directly inside the Docker container.
- Download VS Code from code.visualstudio.com
- Install it with default settings
- Open VS Code → Extensions (
Ctrl+Shift+X) → search and install:- Python (by Microsoft)
- Dev Containers (by Microsoft)
Step 5 — Create Your Project Structure
Open Git Bash and create your project folder:
mkdir -p ~/Documents/Project/odoo-dev/addons
cd ~/Documents/Project/odoo-dev
The addons folder is where all your custom Odoo modules will live.
Step 6 — Create the Docker Compose File
Inside your odoo-dev folder, create a file called docker-compose.yml:
services:
db:
image: postgres:15
environment:
POSTGRES_DB: postgres
POSTGRES_PASSWORD: odoo
POSTGRES_USER: odoo
ports:
- "5432:5432"
odoo:
image: odoo:17.0
depends_on:
- db
ports:
- "8069:8069"
environment:
HOST: db
USER: odoo
PASSWORD: odoo
volumes:
- ./addons:/mnt/extra-addons
- odoo-data:/var/lib/odoo
volumes:
odoo-data:
What this does:
- Spins up a PostgreSQL 15 database container
- Spins up an Odoo 17 container that connects to that database
- Maps your local
addons/folder into the container at/mnt/extra-addons— so any module you create locally is immediately available to Odoo - Stores Odoo data in a named volume so it persists between restarts
Step 7 — Start Odoo
In Git Bash, from your odoo-dev folder:
docker-compose up -d
The first run downloads the Odoo and PostgreSQL images — this takes 5–15 minutes depending on your internet connection. Subsequent starts are instant.
Check that both containers are running:
docker-compose ps
Both odoo-dev-odoo-1 and odoo-dev-db-1 should show status Up.
Step 8 — Create Your First Database
Open your browser and go to:
http://localhost:8069
You’ll see the Odoo database creation page. Fill in the fields:
| Field | Value |
|---|---|
| Master Password | Note this down — you’ll need it for database operations |
| Database Name | odoo_dev |
| Your email (this becomes the admin login) | |
| Password | Choose a strong password |
| Language | English (US) |
| Country | Your country |
| Demo Data | ✅ Check this |
Click Create database and wait 1–3 minutes. Odoo will initialize all the base modules.
Why check Demo Data? Demo data gives you sample records (customers, products, etc.) pre-loaded in the system. This is invaluable for learning — you can see how real data looks in views before you create your own.
When it finishes, you’ll be redirected to the Odoo Apps dashboard — that means everything worked.
Step 9 — Connect VS Code to the Container
This step lets you browse Odoo’s source code and edit your custom modules directly from VS Code, with full syntax highlighting and autocomplete.
- Make sure Docker is running and your containers are up
- In VS Code: press
Ctrl+Shift+P - Type “Dev Containers: Attach to Running Container”
- Select
odoo-dev-odoo-1 - A new VS Code window opens, connected to the container
Your custom modules live at /mnt/extra-addons inside the container — which maps to your local addons/ folder. Open that folder in VS Code to start working.
Odoo’s own source code (great for reference) is at:
/usr/lib/python3/dist-packages/odoo/addons/
Step 10 — Activate Developer Mode
Developer mode unlocks technical menus and debugging tools — essential for module development.
- In Odoo, click the avatar in the top-right corner → Settings
- Scroll down and click Activate the developer mode
Or simply navigate to:
http://localhost:8069/web?debug=1
You’ll know it’s active when you see a bug icon in the top bar.
Useful Commands
# Start containers
docker-compose up -d
# Stop containers
docker-compose stop
# Restart Odoo only (after Python changes)
docker-compose restart odoo
# Force upgrade a module (after adding new fields/models)
docker-compose stop odoo
docker-compose run --rm odoo odoo -d odoo_dev -u your_module_name --stop-after-init
docker-compose start odoo
# View Odoo logs (useful for debugging)
docker logs odoo-dev-odoo-1 --tail 50
# Open a shell inside the Odoo container
docker exec -it odoo-dev-odoo-1 bash
Your Development Workflow
Once everything is set up, the daily workflow looks like this:
- Start containers —
docker-compose up -d - Open VS Code — attach to the running container
- Edit your module files in
/mnt/extra-addons/your_module/ - For Python changes — restart the Odoo container:
docker-compose restart odoo - For new models or fields — force upgrade:
docker-compose run --rm odoo odoo -d odoo_dev -u your_module --stop-after-init - For XML-only changes — upgrade via the UI: Apps → find your module → Upgrade
Troubleshooting
Container won’t start: Make sure Docker Desktop is running (check system tray). Run docker-compose down then docker-compose up -d again.
Can’t access localhost:8069: Wait 30 seconds after starting — Odoo takes a moment to initialize. Check logs with docker logs odoo-dev-odoo-1 --tail 20.
Module not showing in Apps list: Go to Apps → click Update Apps List → remove the “Apps” filter from the search bar → search for your module name.
Changes not reflecting after edit: Python file changes need a container restart. XML-only changes need a module upgrade via the UI or CLI.
“column X does not exist” error: You added a new field but haven’t upgraded the module yet. Run the force upgrade command above with your module name.
What’s Next?
With your environment set up, you’re ready to start building custom Odoo modules. A good first project is a simple CRUD module — one model, a list view, and a form view. Once that’s working, you’ll have the foundation to tackle anything.
If you’re coming from a PHP background (Laravel, Magento, CodeIgniter), the concepts translate well. The main adjustments are Python syntax, Odoo’s declarative field system, and XML-based views. I wrote about that transition in detail here: From PHP Dev to Odoo Developer: My Learning Journey.
Questions or issues with your setup? Drop them in the comments.
