Skip to Content

Installing Odoo 19 on Ubuntu 24.04 LTS – A Complete Guide by Al Hodood Technologies

Odoo continues to evolve as a powerful ERP platform, and its latest release, Odoo 19, brings advanced features, improved performance, and a more intuitive user experience. From modernized workflows to enhanced backend capabilities, this version is designed to help businesses operate more efficiently and scale seamlessly.

At Al Hodood Technologies, we guide organizations in deploying ERP solutions using best practices that ensure reliability, security, and performance. This guide walks you through the installation of Odoo 19 on Ubuntu 24.04 LTS, following a secure, production-ready approach tailored for real-world business environments.

Step 1: Access Your Ubuntu Server

Before beginning the installation, you need to connect to your Ubuntu 24.04 server. You can log in using different authentication methods based on how your server is configured.

2. Login Using a Custom SSH Port

If your server is secured with a non-default SSH port, specify it in your connection command.

ssh -p port_number username@server_ip_address
1. Standard SSH Login (Default Port 22)

Use this method if your server uses the default SSH port.

ssh username@server_ip_address  
3. Login Using a PEM Key

For servers that require key-based authentication, connect using your private key file.

ssh -i /path/to/your/key.pem username@server_ip_address

Once you’re logged in successfully, you can begin preparing your server environment for the Odoo 19 installation.


Step 2: Update Your Operating System


Before installing Odoo or any dependencies, ensure your Ubuntu server is up to date. This helps prevent compatibility issues and ensures you have the latest security patches.

Update the package list

This command fetches the latest list of available packages from Ubuntu’s repositories.

sudo apt-get update   
Upgrade the installed packages

Apply the latest updates to all existing packages on your system.

sudo apt-get upgrade   

Once the update process is complete, your server will be ready for installing the components required for Odoo 19.


Step 3: Secure the Server Environment


Before proceeding with the installation, it’s important to strengthen your server’s security. Adding essential protection helps safeguard your ERP environment from unauthorized access and brute-force attempts.

Install OpenSSH (if not already installed)

This service allows secure remote connections to your server.

sudo apt-get install openssh-server
Check its status:

Confirm that the service is running properly.

sudo systemctl status fail2ban
Install and Enable Fail2Ban for Brute-Force Protection

Fail2Ban monitors login attempts and blocks suspicious activity.

sudo apt-get install fail2ban
sudo systemctl start fail2ban
sudo systemctl enable fail2ban

With these security measures enabled, your server is more resilient and ready to support the installation of Odoo 19.


Step 4: Install Required Packages and Libraries


Odoo 19 depends on several system-level tools and libraries for its core functionality, including frontend processing, image handling, and PDF generation. Installing these packages ensures the application runs smoothly.

Install Python Pip

sudo apt-get install -y python3-pip
Install Development Libraries

These libraries are necessary for compiling and running Odoo and its dependencies.

sudo apt-get install -y python3-dev libxml2-dev libxslt1-dev zlib1g-dev libsasl2-dev libldap2-dev build-essential libssl-dev libffi-dev libmysqlclient-dev libjpeg-dev libpq-dev liblcms2-dev libblas-dev libatlas-base-dev   
Install Less Compiler

Less is a CSS preprocessor used by Odoo, and the clean-css plugin helps minify stylesheets.

sudo npm install -g less less-plugin-clean-css
sudo apt-get install -y node-less
Install Node.js and NPM

Node.js is required for managing frontend assets, and NPM is its package manager.

sudo apt-get install -y npm
sudo ln -s /usr/bin/nodejs /usr/bin/node

With these packages installed, your server now has the essential tools to support Odoo 19’s operations and frontend functionality.


Step 5: Set Up PostgreSQL


Odoo 19 relies on PostgreSQL to manage its database. Setting up a dedicated database user ensures that Odoo can securely create and manage its own databases.  

Install PostgreSQL

sudo apt-get install -y postgresql
Create a PostgreSQL User for Odoo

Switch to the PostgreSQL user and create a new database user with the required privileges: 

sudo su - postgres
createuser --createdb --username postgres --no-createrole --superuser --pwprompt odoo19
exit

This PostgreSQL user will be used exclusively by Odoo to manage its databases, keeping your ERP system organized and secure.


Step 6: Create an Odoo System User


For better security and organization, it’s recommended to run Odoo under a dedicated system user. This isolates Odoo from other system processes and ensures proper file permissions.

Add a New System User

sudo adduser --system --home=/opt/odoo19 --group odoo19

--home=/opt/odoo19: Sets the home directory where all Odoo files will reside.

--group odoo19: Creates a group with the same name and assigns the user to it.

--system: Marks this as a system user with limited privileges.

This setup ensures that all Odoo files and processes are contained within a dedicated environment, improving both security and maintainability.


Step 7: Download Odoo 19 Community Edition  


To install Odoo 19, you need to obtain the latest source code from the official GitHub repository. Using a dedicated system user ensures proper file ownership.

Install Git

sudo apt-get install -y git
Switch to Odoo User and Clone Repository

sudo su - odoo19 -s /bin/bash
git clone https://www.github.com/odoo/odoo --depth 1 --branch 19.0 --single-branch .
exit

After completing this step, your server contains the most up-to-date Odoo 19 Community Edition, ready for configuration and dependency installation.


Step 8: Prepare Python Environment and Essential System Tools  


For a smooth Odoo 19 setup, you need a dedicated Python workspace and a few system-level tools that handle PDF generation, encryption, and fonts. We’ve split this step into two parts to make it easier to follow.

  8a: Configure Python Virtual Environment and Dependencies 
​​
Install Python Virtual Environment Support

This allows Odoo to run in an isolated Python setup without affecting the system Python:

sudo apt install -y python3-venv
Create a Dedicated Python Environment ​ 

Set up the virtual environment under Odoo’s installation folder:

sudo python3 -m venv /opt/odoo19/venv
Activate the Environment as Odoo User ​ 

Switch to the Odoo system user and enable the virtual environment:

sudo su - odoo19 -s /bin/bash
cd /opt/odoo19/
source venv/bin/activate

Install Required Python Libraries ​ 

All dependencies needed by Odoo are listed in requirements.txt and can be installed via pip:

pip install -r requirements.txt
Exit the Virtual Environment ​

Once all packages are installed, leave the environment:

deactivate
exit
 
8b: Install System Utilities for PDF and Fonts

Odoo requires external tools like wkhtmltopdf to generate reports. Follow these commands to install all necessary utilities:

Download the wkhtmltopdf Installer


sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
Install OpenSSL Library

Some versions of wkhtmltopdf need OpenSSL for secure connections:


sudo wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb

Add Fonts Needed by wkhtmltopdf

sudo apt-get install -y xfonts-75dpi
Install wkhtmltopdf Package

sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
Resolve Any Missing Dependencies

sudo apt install -f
Step 9: Configure Odoo 19


After installing the core components, the next step is to prepare Odoo’s configuration file, which defines how the server connects to the database, where it stores logs, and where it loads addons from.

1. Copy the Template Configuration File

Move the sample config file to the /etc directory and rename it:

sudo cp /opt/odoo19/debian/odoo.conf /etc/odoo19.conf

2. Open the File for Editing

sudo nano /etc/odoo19.conf
3. Apply Custom Settings

Update the file with your actual database credentials and paths:

[options]
admin_passwd = admin
db_host = localhost
db_port = 5432
db_user = odoo19
db_password = 123456
addons_path = /opt/odoo19/addons
default_productivity_apps = True
logfile = /var/log/odoo/odoo19.log

Key fields:

  • db_host: Keep it as localhost if PostgreSQL is installed locally
  • db_user/db_password: Use the PostgreSQL account you created for Odoo
  • addons_path: Directory containing custom and core addons
  • logfile: Log storage path for Odoo runtime activity
4. Secure the Configuration File

sudo chown odoo19: /etc/odoo19.conf
sudo chmod 640 /etc/odoo19.conf
5. Set Up the Log Directory

sudo mkdir /var/log/odoo
sudo chown odoo19:root /var/log/odoo

Create the Systemd Service File


Creating a service file allows Odoo to run as a managed service, simplifies restarts, and ensures it loads at system boot.

 

1. Create the Service File

sudo nano /etc/systemd/system/odoo19.service
2. Add the Service Definition

Paste the following configuration:

[Unit]
Description=Odoo19 Service
Documentation=http://www.odoo.com
[Service]
Type=simple
User=odoo19
ExecStart=/opt/odoo19/venv/bin/python3.12 /opt/odoo19/odoo-bin -c /etc/odoo19.conf
[Install]
WantedBy=default.target

Notes:

  • Type=simple: Runs Odoo directly in the foreground
  • User=odoo19: Ensures proper permissions
  • ExecStart: Points to the virtual environment’s Python and Odoo binary

 3. Apply Permissions

sudo chmod 755 /etc/systemd/system/odoo19.service
sudo chown root: /etc/systemd/system/odoo19.service
4. Start the Odoo Service
  
sudo systemctl start odoo19.service
5. Access Odoo in Your Browser

http://<server-ip-or-domain>:8069
6. Monitor Logs

sudo tail -f /var/log/odoo/odoo19.log 
7. Enable Odoo on System Boot

sudo systemctl enable odoo19.service
8. Restart After Any Changes

sudo systemctl restart odoo19.service 

By completing these steps, you’ve successfully installed and configured Odoo 19 on your Ubuntu 24.04 server. The environment is now fully prepared with the necessary dependencies, a dedicated configuration file, and a systemd service to manage Odoo efficiently.

With the server running and accessible through your browser, you can now begin setting up your database, installing modules, and customizing Odoo to suit your business needs. This stable setup ensures smooth performance and provides a reliable foundation for further development, testing, or production use.