Ad – 728Γ—90
🐍 Introduction

Odoo Installation & Setup for Development

Setting up a local Odoo development environment requires Python 3.11+, PostgreSQL 16+, and the Odoo source code from GitHub. This page walks through installation on Ubuntu/Debian (recommended for development), Docker-based setup for Windows/macOS, and how to set up VS Code for Odoo development. By the end you'll have a running Odoo instance and a custom addons directory ready for your first module.

⏱️ 25 min read 🎯 Beginner πŸ“… Updated 2026

System Requirements

ComponentVersionNotes
Python3.11–3.123.12 recommended
PostgreSQL16+17 recommended
Node.js18+Required for asset compilation (Less, SCSS)
wkhtmltopdf0.12.6Required for PDF reports
OSUbuntu 22.04 / Debian 12Recommended; Docker for Windows/macOS

Ubuntu/Debian Installation

This is the recommended approach for development. Follow these steps in order:

Step 1 β€” Install system dependencies

Bash
sudo apt update && sudo apt upgrade -y
sudo apt install -y python3-pip python3-dev python3-venv \
    libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev \
    libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev \
    libfreetype6-dev liblcms2-dev libwebp-dev libharfbuzz-dev \
    libfribidi-dev libxcb1-dev libpq-dev git curl

Step 2 β€” Install PostgreSQL

Bash
sudo apt install -y postgresql postgresql-contrib
sudo systemctl start postgresql
sudo systemctl enable postgresql
# Create Odoo database user (same as your Linux username)
sudo -u postgres createuser -s $USER

Step 3 β€” Clone Odoo 19

Bash
git clone https://github.com/odoo/odoo.git --depth=1 --branch=19.0 ~/odoo19

The --depth=1 flag clones only the latest commit, which is much faster than a full history clone. The --branch=19.0 flag checks out the Odoo 19 branch.

Step 4 β€” Create virtual environment and install dependencies

Bash
python3 -m venv ~/odoo19-venv
source ~/odoo19-venv/bin/activate
pip install -r ~/odoo19/requirements.txt
Ad – 336Γ—280

Step 5 β€” Create config file

Create ~/odoo19.conf with the following content (replace your_username with your Linux username):

INI
[options]
db_host = localhost
db_port = 5432
db_user = your_username
db_password = False
addons_path = /home/your_username/odoo19/addons,/home/your_username/custom_addons
logfile = /var/log/odoo/odoo.log

Step 6 β€” Create custom addons directory

Bash
mkdir ~/custom_addons

Step 7 β€” Start Odoo

Bash
source ~/odoo19-venv/bin/activate
python ~/odoo19/odoo-bin -c ~/odoo19.conf
# Open http://localhost:8069 in your browser

Docker Setup (Windows / macOS)

If you're on Windows or macOS, Docker is the easiest path to a working Odoo environment. Create a docker-compose.yml file:

YAML
# docker-compose.yml
version: '3.8'
services:
  db:
    image: postgres:16
    environment:
      POSTGRES_USER: odoo
      POSTGRES_PASSWORD: odoo
      POSTGRES_DB: postgres
    volumes:
      - pgdata:/var/lib/postgresql/data

  odoo:
    image: odoo:19.0
    depends_on:
      - db
    ports:
      - "8069:8069"
    environment:
      HOST: db
      USER: odoo
      PASSWORD: odoo
    volumes:
      - odoo-data:/var/lib/odoo
      - ./custom_addons:/mnt/extra-addons

volumes:
  pgdata:
  odoo-data:
Bash
mkdir custom_addons
docker-compose up -d
# Open http://localhost:8069 in your browser

The custom_addons directory is mounted into the container at /mnt/extra-addons. Any module you place there will be available in Odoo after updating the app list.

ℹ️
Windows users: use WSL2 + Ubuntu for native development

The Docker approach works for running Odoo, but if you want to edit Odoo's source code or run Python tests, WSL2 with Ubuntu gives you a full Linux environment inside Windows. Install Ubuntu from the Microsoft Store, then follow the Ubuntu installation steps above inside WSL2.

VS Code Setup

VS Code is the recommended editor for Odoo development. Install these extensions:

  • Python (Microsoft) β€” core Python language support
  • Pylance (Microsoft) β€” type checking and autocompletion
  • XML (Red Hat) β€” XML formatting and validation
  • Odoo Snippets β€” code snippets for common Odoo patterns

Configure your workspace settings in .vscode/settings.json:

JSON
{
  "python.defaultInterpreterPath": "~/odoo19-venv/bin/python",
  "python.analysis.extraPaths": [
    "~/odoo19"
  ],
  "editor.formatOnSave": true,
  "[python]": {
    "editor.defaultFormatter": "ms-python.black-formatter"
  }
}

Tip: Add ~/odoo19 to your VS Code workspace (File β†’ Add Folder to Workspace). This lets Pylance index Odoo's source code, giving you autocompletion for all Odoo models, fields, and methods as you write custom code.

Creating Your First Database

Once Odoo is running at http://localhost:8069, you'll see the database manager page. Fill in the fields:

  1. Master Password β€” set a password (it protects database management)
  2. Database Name β€” e.g. odoo_dev
  3. Email β€” your admin login email
  4. Password β€” your admin user password
  5. Language β€” select English
  6. Country β€” select yours
  7. Demo Data β€” check this (useful for learning β€” gives you sample customers, products, orders)

Click Create database and wait ~2 minutes for initialisation. You'll be redirected to the Odoo main menu β€” your development environment is ready.

Activating Developer Mode

Developer mode unlocks technical tools that are essential for module development:

  • Shows the Technical menu under Settings (access to views, models, actions, sequences, etc.)
  • Enables direct view editing from the UI
  • Shows field technical names on hover
  • Enables the Assets debug mode for frontend debugging

To activate:

  • Method 1: Settings β†’ General Settings β†’ scroll to Developer Tools section β†’ click Activate developer mode
  • Method 2: Append ?debug=1 to any URL, e.g. http://localhost:8069/web?debug=1
  • Method 3: Append ?debug=assets for full asset debugging (unminified JS)
βœ…
Always work in developer mode

When developing, always keep developer mode active. Without it, you cannot access the Technical menu, directly inspect views, or see field names β€” all essential for day-to-day module development.

πŸ“‹ Summary

  • Odoo 19 requires Python 3.11–3.12, PostgreSQL 16+, Node.js 18+.
  • Ubuntu/Debian is the recommended OS for native development β€” 7 steps from clean OS to running Odoo.
  • Docker Compose is the easiest path for Windows/macOS development.
  • VS Code with Python + Pylance + XML + Odoo Snippets extensions gives the best development experience.
  • Developer mode is essential for module development β€” activate it via Settings or ?debug=1 in the URL.
  • Your custom_addons directory is where all your custom modules will live.

FAQ

Can I use Windows for Odoo development? +

Native Windows is not recommended β€” wkhtmltopdf and some Python C-extension dependencies have issues on Windows. Two alternatives work well: Docker on Windows (good for running Odoo, limited for editing source), or WSL2 with Ubuntu (the best Windows option β€” gives you a full Linux environment with proper Python compilation, full Odoo source access, and VS Code Remote development). Install WSL2, install Ubuntu from the Microsoft Store, then follow the Ubuntu installation steps above.

What is the Odoo master password? +

The master password is a server-level password that protects database management operations (creating, dropping, duplicating databases). It is set in odoo.conf as the admin_passwd option. It is completely separate from any Odoo user account password. For local development, you can set it to something simple like admin.

What port does Odoo run on? +

Odoo's web interface runs on port 8069 by default. The long-polling server (used for live chat, bus notifications, and real-time features) runs on port 8072 by default. Both can be changed in odoo.conf via the xmlrpc_port and longpolling_port options.

How do I update a module after changing its Python code? +

Python method changes take effect after a server restart β€” Odoo is a Python process; it doesn't hot-reload Python code. For changes that affect the database schema (new fields, new models) or data (new views, menus, security records), you also need to upgrade the module. You can do this by restarting with -u module_name, e.g. python odoo-bin -c ~/odoo19.conf -u my_custom_module. In developer mode, you can also upgrade from Settings β†’ Technical β†’ Installed Modules.