Skip to Content

Install Odoo 19 Community on Ubuntu 24.04

April 25, 2026 by
Eclick Africa, Administrator
| No comments yet

Welcome to your foundational guide for deploying Odoo 19 Community on Ubuntu 24.04. Whether you are building a reliable local sandbox for offline client presentations, testing third-party applications, or simply exploring Odoo's backend architecture, this guide provides a clean, repeatable, and highly organized approach to getting your environment up and running.

Environment Assumptions

To keep this deployment standardized and easy to troubleshoot, this guide operates on the following assumptions:

  • Dedicated System User: The installation relies on a dedicated Linux user named odoo to run the application securely.

  • Centralized Directory Structure: All Odoo components—including the core source code, Python virtual environments, custom addons, and configuration files—will be neatly contained within the /home/odoo directory.

A Foundation for the Future

This guide is designed to be much more than a one-off installation; it is the building block for a professional-grade local environment. In future guides, we will build directly upon this exact architecture to:

  • Seamlessly drop in and manage custom Community and official Enterprise modules.

  • Configure NGINX as a local reverse proxy, allowing you to easily route and access your local Community and Enterprise databases directly from your browser without juggling cumbersome port numbers.

Let's dive in and build your Odoo environment!

Step 1: Update System & Install Base Dependencies

First, we need to ensure Ubuntu is up to date and has all the necessary C-libraries and compilers required to build Python packages.

Bash

sudo apt update
sudo apt install git python3-venv python3-pip build-essential wget python3-dev \
python3-wheel libfreetype6-dev libxml2-dev libzip-dev libldap2-dev libsasl2-dev \
python3-setuptools libjpeg-dev zlib1g-dev libpq-dev libxslt1-dev libtiff5-dev \
libjpeg8-dev libopenjp2-7-dev liblcms2-dev libwebp-dev libharfbuzz-dev libfribidi-dev \
libxcb1-dev libcairo2-dev pkg-config

Why we do this: Odoo is built on Python. Many of Odoo's Python libraries (especially those for image processing, PDF rendering, and database connections) require underlying system-level C-libraries to compile successfully. Without these, your Python installations will fail.

Step 2: Install Node.js & RTL Support

Next, we install Node.js and a tool called rtlcss.

Bash

curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install nodejs
sudo npm install -g rtlcss

Why we do this: Odoo’s web interface and asset pipeline rely on Node.js. The rtlcss package specifically allows Odoo to automatically flip its interface for Right-to-Left languages (like Arabic or Hebrew).

Step 3: Install Wkhtmltopdf

We need to download and install a specific version of the tool that converts HTML to PDF.

Bash

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

Why we do this: Odoo uses this tool to generate all PDF reports (Invoices, Purchase Orders, etc.). The version of this tool available in Ubuntu's default app store strips out a Qt patch that Odoo requires for page headers and footers. Fetching it directly from GitHub guarantees your PDFs render correctly.

Step 4: Create a Dedicated Odoo User

Now we create a specific Linux user account just for Odoo.

Bash

sudo useradd -m -d /home/odoo -U -r -s /bin/bash odoo

Why we do this: Security! If Odoo was run under your main user account or the root account, a vulnerability in Odoo could give an attacker full control over your entire server. Isolating it in the odoo user account contains the blast radius.

Step 5: Install PostgreSQL & Create the Database User

We install the database software and create a user that matches the Linux user we just made.

Bash

sudo apt install postgresql
sudo su - postgres -c "createuser -R -S -d odoo"

Why we do this: Odoo uses PostgreSQL to store all its data. By default, PostgreSQL uses "peer authentication." This means if a Linux user named odoo tries to access a Postgres user named odoo, Postgres allows it without asking for a password. The -d flag gives this user the power to create new databases from the web interface.

Step 6: Create the Organized Folder Architecture

We will switch over to our new odoo user and build the folders.

Bash

sudo su - odoo
mkdir -p /home/odoo/odoo19/config /home/odoo/odoo19/custom-addons /home/odoo/odoo19/source

Why we do this: Keeping the configuration files, custom third-party apps, and the core Odoo source code in entirely separate folders prevents messy conflicts and makes upgrading to Odoo 20 much easier later.

Step 7: Clone Odoo & Install Python Requirements

While still logged in as the odoo user, we will download Odoo and isolate its Python environment.

Bash

# 1. Download Odoo 19 from GitHub
git clone https://www.github.com/odoo/odoo --depth 1 --branch 19.0 /home/odoo/odoo19/source

# 2. Create and activate a Python Virtual Environment
cd /home/odoo/odoo19
python3 -m venv venv
source venv/bin/activate

# 3. Install Odoo's dependencies (including the ones we discovered earlier)
pip3 install wheel passlib rlPyCairo phonenumbers pdfminer.six
pip3 install -r source/requirements.txt

# 4. Deactivate the environment and exit back to your main Ubuntu user
deactivate
exit

Why we do this: Ubuntu relies on Python for its own core operating system tasks. If we installed Odoo's Python libraries directly into Ubuntu, it could break your computer. A Virtual Environment (venv) acts as an isolated bubble where Odoo can have whatever Python libraries it wants without touching the rest of the laptop.

Step 8: Create the Odoo Configuration File

You are now back on your normal user account with sudo powers. Let's create the config file.

Bash

sudo nano /home/odoo/odoo19/config/odoo19.conf

Paste the following block into the editor, save (Ctrl+O, Enter), and exit (Ctrl+X):

Ini, TOML

[options]
db_host = False
db_port = False
db_user = odoo
db_password = False
addons_path = /home/odoo/odoo19/source/addons,/home/odoo/odoo19/custom-addons
logfile = /home/odoo/odoo19/config/odoo-server.log

Now, lock down the file permissions:

Bash

sudo chown -R odoo:odoo /home/odoo/odoo19/config
sudo chmod 640 /home/odoo/odoo19/config/odoo19.conf

Why we do this: This file acts as Odoo's map. It tells Odoo exactly where to find the database, where to look for custom modules, and where to write its live logs. We lock the permissions down so unauthorized users on the laptop can't tamper with it.

Step 9: Create the Systemd Auto-Start Service

We need to tell Ubuntu how to manage Odoo as a background service.

Bash

sudo nano /etc/systemd/system/odoo19.service

Paste the following block, save (Ctrl+O, Enter), and exit (Ctrl+X):

Ini, TOML

[Unit]
Description=Odoo 19
Requires=postgresql.service
After=network.target postgresql.service

[Service]
Type=simple
SyslogIdentifier=odoo19
PermissionsStartOnly=true
User=odoo
Group=odoo
ExecStart=/home/odoo/odoo19/venv/bin/python3 /home/odoo/odoo19/source/odoo-bin -c /home/odoo/odoo19/config/odoo19.conf
StandardOutput=journal+console

[Install]
WantedBy=multi-user.target

Why we do this: Systemd is Ubuntu's "manager". This file tells the manager: "Hey, wait until the network and the database are running, then launch Odoo using its virtual environment Python. Run it silently in the background, and if the laptop restarts, make sure Odoo turns back on automatically."

Step 10: Enable and Start Odoo

Finally, tell Ubuntu to read the new service file and fire up the application.

Bash

sudo systemctl daemon-reload
sudo systemctl enable odoo19
sudo systemctl start odoo19

Why we do this: daemon-reload forces Ubuntu to recognize the new .service file you just created. enable tells it to launch on boot, and start turns it on right now!

Sign in to leave a comment