Start for free
Back to blog

How to install Odoo 19 on Ubuntu 24.04

Install Odoo 19 on Ubuntu 24.04 with PostgreSQL, wkhtmltopdf, a Python virtual environment, and a systemd service.

This guide installs Odoo 19 on Ubuntu 24.04 from source. You will create the Odoo system user, install PostgreSQL and wkhtmltopdf, set up a Python virtual environment, and run Odoo through systemd. If you want Cloudpepper to provision the server instead, start from Cloudpepper and skip the manual setup.

Note for Ubuntu 24.04: the system Python is 3.12. You don’t need to change it—Odoo 19 supports Python 3.10+. A virtual environment is still recommended. (Odoo)

Step 1: Open the Terminal

To begin, you need to access the command line interface in Ubuntu. Press Ctrl + Alt + T to open the Terminal application.

Step 2: Update Your System

First, update your system packages to ensure you’re working with the latest versions. Type the following command and press Enter:

Terminal window
sudo apt update && sudo apt upgrade

Enter your password when prompted, and wait for the update process to complete.

Step 3: Install Dependencies

Odoo requires certain dependencies to function correctly. Run the following command to install them:

Terminal window
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 libxslt1-dev libldb-dev libldap2-dev libtirpc-dev

Step 4: Create an Odoo User

Create a new system user for Odoo and assign it a home directory:

Terminal window
sudo useradd -m -d /opt/odoo -U -r -s /bin/bash odoo

Step 5: Install PostgreSQL

Odoo uses PostgreSQL as its database management system. Install PostgreSQL with this command:

Terminal window
sudo apt install postgresql

After installation, create a new PostgreSQL user for Odoo:

Terminal window
sudo su - postgres -c "createuser -s odoo"

Odoo 19 supports PostgreSQL 12 or newer, so Ubuntu 24.04’s PostgreSQL 16 is fine. (Odoo)

Step 6: Install Wkhtmltopdf

Wkhtmltopdf is a dependency for generating PDF reports in Odoo. Download and install it using these commands:

Terminal window
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

Odoo 19 asks for wkhtmltopdf 0.12.6 (patched Qt) for proper headers/footers. The Jammy package above is the patched build and is the one Odoo points to in docs. (Odoo)

Step 7: Download Odoo 19

Switch to the Odoo user and download the Odoo 19 source code:

Terminal window
sudo su - odoo
git clone https://github.com/odoo/odoo.git --depth 1 --branch 19.0 /opt/odoo/odoo19

Step 8: Create a Virtual Environment

Create a new virtual environment for Odoo and activate it:

Terminal window
python3 -m venv /opt/odoo/odoo19-venv
source /opt/odoo/odoo19-venv/bin/activate

Odoo 19 requires Python 3.10 or later (Ubuntu 24.04’s default is 3.12, which is OK). (Odoo)

Step 9: Install Python Dependencies

Within the virtual environment, install the required Python packages:

Terminal window
pip install wheel
pip install -r /opt/odoo/odoo19/requirements.txt

Deactivate the virtual environment when finished:

Terminal window
deactivate

Switch back to the sudo user with:

Terminal window
exit

Step 10: Configure Odoo

Create a configuration file for Odoo:

Terminal window
sudo mkdir /etc/odoo
sudo touch /etc/odoo/odoo.conf
sudo nano /etc/odoo/odoo.conf

Copy and paste the following configuration settings into the /etc/odoo/odoo.conf file:

[options]
; This is the password that allows database operations:
admin_passwd = your_strong_admin_password
db_host = False
db_port = False
db_user = odoo
db_password = False
addons_path = /opt/odoo/odoo19/addons

Replace your_strong_admin_password with a secure password of your choice. Save the file and exit by pressing Ctrl + X, followed by Y and Enter.

Step 11: Create a Systemd Service File

Create a systemd service file to manage the Odoo service:

Terminal window
sudo nano /etc/systemd/system/odoo.service

Paste the following content into the odoo.service file:

[Unit]
Description=Odoo19
Requires=postgresql.service
After=network.target postgresql.service
[Service]
Type=simple
SyslogIdentifier=odoo19
PermissionsStartOnly=true
User=odoo
Group=odoo
ExecStart=/opt/odoo/odoo19-venv/bin/python3 /opt/odoo/odoo19/odoo-bin -c /etc/odoo/odoo.conf
StandardOutput=journal+console
[Install]
WantedBy=multi-user.target

Save and exit by pressing Ctrl + X, followed by Y and Enter.

Step 12: Enable and Start the Odoo Service

Enable the Odoo service to start automatically at boot:

Terminal window
sudo systemctl enable odoo

Start the Odoo service:

Terminal window
sudo systemctl start odoo

Check the status of the Odoo service to ensure it’s running:

Terminal window
sudo systemctl status odoo

If the service is running, you’ll see an “active (running)” status. (If PostgreSQL isn’t running, Odoo won’t start—make sure the DB service is up.) (Odoo)

Step 13: Access Odoo in Your Web Browser

Open your web browser and navigate:

http://your_server_ip_or_domain:8069

Replace your_server_ip_or_domain with your server’s IP address or domain name. You should see the Odoo setup page, where you can create a new database and start using Odoo 19.

Odoo 19 is now running on Ubuntu 24.04. If you do not want to maintain the server yourself, Cloudpepper can provision and manage the same kind of Odoo server for you.