Skip to content

How to Set Up an Odoo Development Environment

DeployMonkey Team · March 11, 2026 8 min read

A proper local development environment is the foundation of productive Odoo work. Running Odoo from source gives you fast feedback loops, full debugger access, and the ability to step through framework code. This guide covers everything from PostgreSQL setup to IDE configuration.

Prerequisites

  • Ubuntu 22.04 / Debian 12 (or macOS with Homebrew)
  • Python 3.10 or 3.11 (Odoo 16+) / Python 3.12 (Odoo 19)
  • Git
  • At least 4 GB RAM and 10 GB free disk

Step 1 — Install System Dependencies

sudo apt update
sudo apt install -y python3-dev python3-venv python3-pip \
build-essential libssl-dev libffi-dev libxml2-dev \
libxslt1-dev libjpeg-dev zlib1g-dev libldap2-dev \
libsasl2-dev libpq-dev node-less wkhtmltopdf \
postgresql postgresql-client git curl

On macOS with Homebrew: brew install [email protected] postgresql libxml2 libxslt libjpeg openssl wkhtmltopdf

Step 2 — Set Up PostgreSQL

Odoo requires a PostgreSQL user with the ability to create databases:

sudo -u postgres createuser -s $USER
# Test connection
psql -c "SELECT version();"

This creates a superuser role matching your Linux username, so Odoo can connect without a password using peer authentication during development.

Step 3 — Clone Odoo Source

mkdir ~/odoo-dev && cd ~/odoo-dev
git clone https://github.com/odoo/odoo.git --depth=1 --branch=19.0 odoo-src
# If you have Enterprise access:
git clone [email protected]:odoo/enterprise.git --depth=1 --branch=19.0 enterprise

Using --depth=1 fetches only the latest commit, saving several gigabytes of history. You can deepen the clone later with git fetch --unshallow if you need history.

Step 4 — Create a Python Virtual Environment

cd ~/odoo-dev
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip wheel setuptools
pip install -r odoo-src/requirements.txt

Always activate the virtual environment before running Odoo or installing packages. Add source ~/odoo-dev/venv/bin/activate to a shell alias for convenience.

Step 5 — Create a Development Configuration File

Create ~/odoo-dev/dev.conf:

[options]
addons_path = /home/youruser/odoo-dev/odoo-src/addons,/home/youruser/odoo-dev/enterprise,/home/youruser/odoo-dev/custom
db_host = localhost
db_port = 5432
db_user = youruser
db_password =
db_name = odoo_dev
http_port = 8069
log_level = info
dev_mode = all

dev_mode = all enables automatic asset reloading and developer mode in the browser — essential during development.

Step 6 — Initialize the Database and Run Odoo

cd ~/odoo-dev/odoo-src
python odoo-bin -c ~/odoo-dev/dev.conf -d odoo_dev -i base --stop-after-init
python odoo-bin -c ~/odoo-dev/dev.conf

The first command initializes the database with the base module. The second starts the server. Visit http://localhost:8069 to access your instance.

Step 7 — VS Code Setup

Install the Python extension, then create .vscode/launch.json in your project root:

{
  "version": "0.2.0",
  "configurations": [
{
  "name": "Odoo",
  "type": "debugpy",
  "request": "launch",
  "program": "${workspaceFolder}/../odoo-src/odoo-bin",
  "args": ["-c", "/home/youruser/odoo-dev/dev.conf"],
  "python": "/home/youruser/odoo-dev/venv/bin/python",
  "justMyCode": false,
  "env": {
    "PYTHONPATH": "${workspaceFolder}/../odoo-src"
  }
}
  ]
}

Set "justMyCode": false to step into Odoo framework code. Press F5 to start Odoo under the debugger. Set breakpoints by clicking in the gutter.

Step 8 — PyCharm Setup

  1. Open the odoo-src directory as a PyCharm project.
  2. Go to File → Settings → Project → Python Interpreter and select the virtualenv at ~/odoo-dev/venv.
  3. Create a Run Configuration: Run → Edit Configurations → + → Python.
  4. Set Script path to odoo-bin, Parameters to -c /home/youruser/odoo-dev/dev.conf.
  5. Add your custom module directories under Content Roots for full autocompletion.

Useful Development Commands

# Open Odoo interactive shell
python odoo-bin shell -c dev.conf -d odoo_dev

# Upgrade a module and stop
python odoo-bin -c dev.conf -u my_module --stop-after-init

# Run tests for a module
python odoo-bin -c dev.conf --test-enable -u my_module --stop-after-init --log-level=test

DeployMonkey for Development Teams

Local development is great for building features, but staging and production need a reliable server. DeployMonkey provides:

  • Staging instances: Spin up a separate staging environment on the Pro plan to test modules before production deployment.
  • Git-based deployment: Push to your repo and DeployMonkey pulls the latest code automatically. See our Git deployment guide.
  • S3 backups: Automatic encrypted backups so you never lose production data.
  • Odoo 14–19 support: Match your production version exactly during local development.

FAQ

Can I use Docker for local Odoo development?

Yes. Docker simplifies dependency management and matches production more closely. However, running from source gives you faster iteration and full debugger support. See our guide on running Odoo in Docker for the Docker-based approach.

Which Python version should I use for Odoo 19?

Odoo 19 requires Python 3.12. Odoo 16 and 17 support Python 3.10 and 3.11. Always match the Python version to your target Odoo release to avoid dependency conflicts.

Do I need Odoo Enterprise source for development?

Only if you are customizing Enterprise modules. Community modules and custom apps work fine with just the Community source. Enterprise source requires an Odoo partner or enterprise subscription.

How do I enable hot-reload for frontend assets?

Set dev_mode = all in your config file or append ?debug=assets to the URL. Odoo will regenerate assets on every page load without a server restart.

Start Building on a Solid Foundation

Your local environment is ready — now you need somewhere reliable to deploy. DeployMonkey offers managed Odoo hosting starting free, with Git deployment, automatic backups, and SSL included. Launch your instance today.