How to Install Odoo 19 on Ubuntu 24.04 LTS Server
A complete step-by-step technical guide to installing Odoo 19 Community Edition on Ubuntu 24.04 LTS, including system preparation, PostgreSQL setup, Python virtual environment, wkhtmltopdf, configuration, and systemd service setup.
Introduction
Odoo 19 introduces significant functional and technical enhancements focused on usability and streamlined business workflows. This guide explains how to install Odoo 19 Community Edition on an Ubuntu 24.04 LTS server from scratch in a secure and production-ready way.
Step 1 — Log in to the Ubuntu Server
You can access your Ubuntu 24.04 server using SSH or local login.
ssh username@server_ip
ssh -p port_number username@server_ip
ssh -i /path/to/key.pem username@server_ip
Choose the login method that matches your server configuration.
Step 2 — Update the Server
Update your server to ensure the latest security patches and packages are installed.
sudo apt-get update
sudo apt-get upgrade
Step 3 — Secure the Server
Install and enable essential security tools.
sudo apt-get install openssh-server
sudo apt-get install fail2ban
sudo systemctl start fail2ban
sudo systemctl enable fail2ban
sudo systemctl status fail2ban
Step 4 — Install Required Packages and Libraries
Install Python, system libraries, Node.js, and frontend dependencies required by Odoo.
sudo apt-get install -y python3-pip
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 libjpeg8-dev liblcms2-dev libblas-dev libatlas-base-dev
sudo apt-get install -y npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
sudo npm install -g less less-plugin-clean-css
sudo apt-get install -y node-less
Step 5 — Install and Configure PostgreSQL
Install PostgreSQL and create a dedicated database user for Odoo.
sudo apt-get install -y postgresql
sudo su - postgres
createuser --createdb --username postgres --no-createrole --superuser --pwprompt odoo19
exit
Step 6 — Create a System User for Odoo
Create a dedicated Linux user to run Odoo securely.
sudo adduser --system --home=/opt/odoo19 --group odoo19
Step 7 — Clone Odoo 19 from GitHub
Install Git and clone the Odoo 19 Community repository.
sudo apt-get install -y git
sudo su - odoo19 -s /bin/bash
git clone https://www.github.com/odoo/odoo --depth 1 --branch 19.0 --single-branch .
exit
Step 8 — Install Python Dependencies
Create and activate a Python virtual environment, then install required packages.
sudo apt install -y python3-venv
sudo python3 -m venv /opt/odoo19/venv
cd /opt/odoo19
source venv/bin/activate
pip install -r requirements.txt
deactivate
Step 9 — Install wkhtmltopdf and Fonts
Install wkhtmltopdf and required dependencies for PDF reports.
sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
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
sudo apt-get install -y xfonts-75dpi
sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
sudo apt install -f
Step 10 — Configure Odoo
Create and configure the Odoo configuration file.
sudo cp /opt/odoo19/debian/odoo.conf /etc/odoo19.conf
sudo nano /etc/odoo19.conf
[options]
db_host = localhost
db_port = 5432
db_user = odoo19
db_password = 123456
addons_path = /opt/odoo19/addons
logfile = /var/log/odoo/odoo19.log
sudo chown odoo19: /etc/odoo19.conf
sudo chmod 640 /etc/odoo19.conf
sudo mkdir /var/log/odoo
sudo chown odoo19:root /var/log/odoo
Step 11 — Create systemd Service
Create and enable the Odoo systemd service.
sudo nano /etc/systemd/system/odoo19.service
[Unit]
Description=Odoo19
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
sudo chmod 755 /etc/systemd/system/odoo19.service
sudo chown root: /etc/systemd/system/odoo19.service
sudo systemctl start odoo19
sudo systemctl enable odoo19
Conclusion
You have successfully installed Odoo 19 on Ubuntu 24.04 LTS. The service is running, secured, and configured to start automatically at boot. You can now access Odoo via http://your_server_ip:8069 and begin configuring your ERP system.
