Skip to Content

Odoo 19 has arrived, bringing with it a wave of exciting AI integrations, an overhauled user interface, and major performance boosts under the hood. Whether you are an experienced Odoo developer preparing to migrate custom modules or a newcomer looking to tinker with the latest features, setting up a local development environment is your first step.

While you can install Odoo via Docker or packaged installers, performing a source installation gives you the most flexibility for custom development and debugging.

In this guide, we will walk through setting up Odoo 19 locally from source on an Ubuntu/Linux system (the standard and most well-supported environment for Odoo development).

Prerequisites

Before we begin, ensure your local machine meets the following requirements:

  • Operating System: Ubuntu 22.04 LTS or 24.04 LTS (or a WSL2 Ubuntu instance on Windows).

  • Python: Python 3.10 or newer.

  • Database: PostgreSQL 12 or newer.

  • Permissions: Sudo access on your local machine.

Step 1: Update Your System and Install Dependencies

First, open your terminal and ensure your system packages are up to date. Then, install the essential system libraries, compilers, and development tools Odoo needs to run properly.

Bash

sudo apt update && sudo apt upgrade -y

sudo apt install git python3-pip build-essential wget python3-dev python3-venv \
python3-wheel libfreetype6-dev libxml2-dev libzip-dev libldap2-dev libsasl2-dev \
python3-setuptools node-less libjpeg-dev zlib1g-dev libpq-dev

Step 2: Install and Configure PostgreSQL

Odoo uses PostgreSQL as its database backend. Let's install it and set up a database user.

Bash

sudo apt install postgresql -y

For a local development environment, the easiest approach is to create a PostgreSQL user that matches your current Ubuntu logged-in username. This allows you to run Odoo without having to specify a database password in a configuration file every time.

Bash

# Replace $USER with your actual ubuntu username if the variable doesn't resolve
sudo su - postgres -c "createuser -s $USER"

Step 3: Clone the Odoo 19 Source Code

Next, we will pull the official Odoo 19 source code directly from GitHub. We’ll use the --depth 1 flag to download only the latest commits, which saves a massive amount of time and disk space.

Bash

# Navigate to your home directory (or your preferred workspace)
cd ~

# Clone the repository
git clone https://github.com/odoo/odoo.git --depth 1 --branch 19.0 ~/odoo19

Step 4: Set Up a Python Virtual Environment

It is highly recommended to run Odoo inside a Python Virtual Environment (venv). This isolates Odoo's Python dependencies from your global system packages, preventing version conflicts.

Bash

# Navigate into the cloned Odoo directory
cd ~/odoo19

# Create the virtual environment
python3 -m venv odoo19-venv

# Activate the virtual environment
source odoo19-venv/bin/activate

(Note: Your terminal prompt should now show (odoo19-venv) indicating the environment is active. You must activate this environment anytime you want to run Odoo).

Step 5: Install Python Requirements

With the virtual environment active, install the Python packages required by Odoo.

Bash

# Upgrade pip and install the wheel package first
pip install --upgrade pip
pip install wheel

# Install Odoo dependencies
pip install -r requirements.txt

Step 6: Install Wkhtmltopdf (Optional but Recommended)

Odoo uses the wkhtmltopdf package to generate PDF reports (like Invoices and Sales Orders). The standard version in the Ubuntu repository often lacks features Odoo needs, so we download the official release.

Bash

cd /tmp
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb
sudo apt install ./wkhtmltox_0.12.6.1-2.jammy_amd64.deb

(If you are on an older version of Ubuntu, make sure to grab the corresponding .deb file from the wkhtmltopdf GitHub releases page).

Step 7: Launch Odoo 19!

You are now ready to start your local server. Navigate back to your Odoo directory, ensure your virtual environment is active, and run the Odoo binary.

Bash

cd ~/odoo19
source odoo19-venv/bin/activate  # Only if it isn't already active

# Start the server
./odoo-bin

In your terminal, you should see the Odoo server spinning up on port 8069.

  1. Open your favorite web browser.

  2. Go to http://localhost:8069.

  3. You will be greeted by the Odoo Database Creation screen.

  4. Fill in the master password (found in your terminal output or setup standard), a database name, email, and password. Pro tip: Check "Demo Data" if you want to populate your local database with dummy records for testing!

Next Steps for Developers

Now that you have a functioning local instance, you can start building custom modules! Simply create a custom addons directory (e.g., mkdir ~/odoo19/custom_addons), and restart your server with the --addons-path flag:

Bash

./odoo-bin --addons-path="addons,custom_addons"

Happy coding, and enjoy exploring everything Odoo 19 has to offer!

# Odoo