How to Install Odoo 19 on Ubuntu 24.04

Odoo is a popular open-source suite of business apps that help companies manage and run their business. It includes a wide range of applications such as CRM, e-commerce, website builder, billing, accounting, manufacturing, warehouse, project management, inventory, and more, all seamlessly integrated.
Odoo can be installed in different ways, depending on the use case and available technologies. The easiest and quickest way to install Odoo is by using the official Odoo APT repositories.
Installing Odoo in a virtual environment, or deploying as a Docker container, gives you more control over the application and allows you to run multiple Odoo instances on the same system.
This guide walks you through how to install Odoo 19 on Ubuntu 24.04 inside a Python virtual environment. We’ll download Odoo from the official GitHub repository and use Nginx as a reverse proxy.
Prerequisites
Before you begin, make sure you have:
- A server running Ubuntu 24.04 with at least 2GB of RAM
- Python 3.10 or later
- PostgreSQL 13 or later
- wkhtmltopdf 0.12.6 (for PDF headers/footers)
- A user with sudo privileges
- A domain name pointing to your server (for TLS/SSL setup)
These minimum versions match Odoo 19 requirements and help avoid issues with database compatibility and PDF report rendering.
Installing Dependencies
The first step is to install Git, Pip, Node.js, and the development tools required to build Odoo dependencies:
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-devInstalling Node.js
Ubuntu 24.04 ships with an older version of Node.js. To get a supported LTS release, install Node.js from the NodeSource repository:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install nodejsInstall the rtlcss utility (used for right-to-left language support):
sudo npm install -g rtlcssOptionally, verify the installed versions:
python3 --version
node --version
npm --versionCreating a System User
Running Odoo under the root user poses a great security risk. We’ll create a new system user and group with home directory /opt/odoo19 that will run the Odoo service:
sudo useradd -m -d /opt/odoo19 -U -r -s /bin/bash odoo19You can name the user anything you want, as long as you create a PostgreSQL user with the same name.
Installing and Configuring PostgreSQL
Odoo uses PostgreSQL as the database backend. Ubuntu 24.04 includes PostgreSQL 16 in the standard repositories. Install it with:
sudo apt install postgresqlOnce the service is installed, create a PostgreSQL user with the same name as the previously created system user (without superuser privileges):
sudo su - postgres -c "createuser -R -S -D odoo19"You don’t need to create a database manually. Odoo will automatically create and initialize the database when you access the web interface for the first time.
Installing wkhtmltopdf
wkhtmltopdf is an open-source CLI tool for rendering HTML pages into PDF and images. Odoo uses it to generate PDF reports.
The wkhtmltopdf package in Ubuntu repositories is built without the patched Qt, which breaks headers and footers. Use the official 0.12.6 build from GitHub:
sudo wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.debInstall the downloaded package:
sudo apt install ./wkhtmltox_0.12.6.1-3.jammy_amd64.debsudo apt --fix-broken install to resolve them.Installing and Configuring Odoo 19
We’ll install Odoo from the source inside an isolated Python virtual environment.
First, switch to the “odoo19” user:
sudo su - odoo19Clone the Odoo 19 source code from GitHub:
git clone https://www.github.com/odoo/odoo --depth 1 --branch 19.0 /opt/odoo19/odooCreate a new Python virtual environment for Odoo:
cd /opt/odoo19
python3 -m venv odoo-venvActivate the virtual environment:
source odoo-venv/bin/activateOdoo dependencies are specified in the requirements.txt file. Install all required Python modules with pip3:
pip3 install wheel
pip3 install -r odoo/requirements.txtOnce done, deactivate the environment:
deactivateCreate a separate directory for third-party addons:
mkdir /opt/odoo19/odoo-custom-addonsLater we’ll add this directory to the addons_path parameter. This parameter defines a list of directories where Odoo searches for modules.
Switch back to your sudo user:
exitCreate a configuration file:
sudo nano /etc/odoo19.confAdd the following content:
[options]
; This is the password that allows database operations:
admin_passwd = my_admin_passwd
db_host = False
db_port = False
db_user = odoo19
db_password = False
addons_path = /opt/odoo19/odoo/addons,/opt/odoo19/odoo-custom-addonsmy_admin_passwd to a strong, secure password. This password is used to create, duplicate, and delete databases.Creating the Systemd Service
A unit file is a configuration file that holds information about a service.
Create a file named odoo19.service:
sudo nano /etc/systemd/system/odoo19.serviceAdd the following content:
[Unit]
Description=Odoo 19
Requires=postgresql.service
After=network.target postgresql.service
[Service]
Type=simple
SyslogIdentifier=odoo19
PermissionsStartOnly=true
User=odoo19
Group=odoo19
ExecStart=/opt/odoo19/odoo-venv/bin/python3 /opt/odoo19/odoo/odoo-bin -c /etc/odoo19.conf
StandardOutput=journal+console
[Install]
WantedBy=multi-user.targetReload systemd to recognize the new unit file:
sudo systemctl daemon-reloadStart the Odoo service and enable it to start on boot:
sudo systemctl enable --now odoo19Verify that the service is running:
sudo systemctl status odoo19The output should show that the Odoo service is active and running:
● odoo19.service - Odoo 19
Loaded: loaded (/etc/systemd/system/odoo19.service; enabled; preset: enabled)
Active: active (running) since Tue 2026-01-28 10:00:00 UTC; 10s ago
...To view the Odoo service logs using journalctl
:
sudo journalctl -u odoo19Other useful commands to manage the Odoo service:
sudo systemctl restart odoo19
sudo systemctl stop odoo19
sudo systemctl start odoo19Testing the Installation
Open your browser and navigate to: http://<your_domain_or_IP_address>:8069
If the installation is successful, you’ll see the Odoo database creation screen where you can create your first database and start using Odoo.
Configuring Nginx as a Reverse Proxy with TLS Termination
The default Odoo web server serves traffic over HTTP. To make the Odoo deployment more secure, we’ll configure Nginx as a reverse proxy with TLS termination to serve traffic over HTTPS.
TLS termination means Nginx processes and decrypts incoming TLS (HTTPS) connections, then forwards unencrypted HTTP requests to Odoo. The traffic between Nginx and Odoo will not be encrypted.
Using a reverse proxy provides benefits such as load balancing, TLS termination, caching, compression, and serving static content.
Before continuing, ensure you have:
- A domain name pointing to your server. We’ll use
example.com. - Nginx installed.
- A TLS certificate for your domain (for example, a free Let’s Encrypt certificate).
Create the Nginx server block configuration:
sudo nano /etc/nginx/sites-available/odoo.confAdd the following configuration:
# Odoo servers
upstream odoo {
server 127.0.0.1:8069;
}
upstream odoochat {
server 127.0.0.1:8072;
}
# HTTP -> HTTPS redirect
server {
listen 80;
listen [::]:80;
server_name www.example.com example.com;
return 301 https://example.com$request_uri;
}
# WWW -> NON-WWW redirect
server {
listen 443 ssl;
listen [::]:443 ssl;
http2 on;
server_name www.example.com;
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/example.com/chain.pem;
return 301 https://example.com$request_uri;
}
# Main server block
server {
listen 443 ssl;
listen [::]:443 ssl;
http2 on;
server_name example.com;
proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;
# Proxy headers
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
# SSL parameters
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/example.com/chain.pem;
# Log files
access_log /var/log/nginx/odoo.access.log;
error_log /var/log/nginx/odoo.error.log;
# Websocket (live chat)
location /websocket {
proxy_pass http://odoochat;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
# Handle / requests
location / {
proxy_redirect off;
proxy_pass http://odoo;
}
# Cache static files
location ~* /web/static/ {
proxy_cache_valid 200 90m;
proxy_buffering on;
expires 864000;
proxy_pass http://odoo;
}
# Gzip compression
gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript;
gzip on;
}example.com with your actual domain name and update the SSL certificate paths accordingly.Enable the site by creating a symbolic link:
sudo ln -s /etc/nginx/sites-available/odoo.conf /etc/nginx/sites-enabled/Test the Nginx configuration:
sudo nginx -tIf there are no errors, restart Nginx:
sudo systemctl restart nginxNext, tell Odoo to use the proxy. Open the configuration file and add the following line:
sudo nano /etc/odoo19.confproxy_mode = TrueRestart the Odoo service:
sudo systemctl restart odoo19You can now access your Odoo instance at https://example.com.
Firewall Configuration (Optional)
If UFW is enabled, allow SSH and web traffic, and block direct access to Odoo’s port now that Nginx is configured:
sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw deny 8069/tcpChanging the Binding Interface
This step is optional but recommended for security.
By default, Odoo listens on port 8069 on all interfaces. To disable direct access to Odoo, you can either block port 8069 for all public interfaces or configure Odoo to listen only on the local interface.
Open the configuration file and add the following lines:
sudo nano /etc/odoo19.confxmlrpc_interface = 127.0.0.1
netrpc_interface = 127.0.0.1Restart the Odoo service:
sudo systemctl restart odoo19Enabling Multiprocessing
By default, Odoo runs in multithreading mode. For production deployments, it’s recommended to switch to multiprocessing mode for better stability and resource usage.
To enable multiprocessing, edit the Odoo configuration and set a non-zero number of worker processes. The number of workers is calculated based on the number of CPU cores and available RAM.
According to the official Odoo documentation , use these formulas:
Worker number calculation:
- Theoretical maximum workers = (system_cpus * 2) + 1
- 1 worker can serve ~= 6 concurrent users
- Cron workers also require CPU
RAM memory calculation:
- Assume 20% of requests are heavy (1 GB RAM) and 80% are light (150 MB RAM)
- Needed RAM =
workers * ((0.8 * 150) + (0.2 * 1024))
To check the number of CPUs on your system:
grep -c ^processor /proc/cpuinfoFor a system with 4 CPU cores, 8 GB of RAM, and 30 concurrent users:
30 users / 6 = 5workers needed(4 * 2) + 1 = 9maximum workers- Use 5 workers + 1 cron worker = 6 total workers
- RAM needed:
6 * ((0.8 * 150) + (0.2 * 1024)) ~= 2 GB
Add the multiprocessing configuration:
sudo nano /etc/odoo19.conflimit_memory_hard = 2684354560
limit_memory_soft = 2147483648
limit_request = 8192
limit_time_cpu = 600
limit_time_real = 1200
max_cron_threads = 1
workers = 5Restart the Odoo service:
sudo systemctl restart odoo19Troubleshooting
- Missing PDF headers/footers: Make sure you’re using wkhtmltopdf 0.12.6 (the official build), not the distro package.
- Database connection errors: Verify the PostgreSQL role exists and that
/etc/odoo19.confuses the correctdb_user. - Websocket errors (live chat): Confirm Nginx is proxying
/websocketto port8072and Odoo is running.
Upgrading Odoo 19
To update your Odoo source installation, pull the latest changes and refresh dependencies:
sudo su - odoo19
cd /opt/odoo19/odoo
git checkout 19.0
git pull
source /opt/odoo19/odoo-venv/bin/activate
pip3 install -r requirements.txt
deactivate
exit
sudo systemctl restart odoo19For production stability, you can pin to a specific tag instead of tracking the branch:
sudo su - odoo19
cd /opt/odoo19/odoo
git fetch --tags
git tag -l "19.0.*"
git checkout 19.0.0
source /opt/odoo19/odoo-venv/bin/activate
pip3 install -r requirements.txt
deactivate
exit
sudo systemctl restart odoo19FAQ
Does Odoo 19 work on Ubuntu 24.04?
Yes. Ubuntu 24.04 meets Odoo 19 requirements when you use Python 3.10+, PostgreSQL 13+, and wkhtmltopdf 0.12.6.
What PostgreSQL version does Odoo 19 require?
PostgreSQL 13 or later.
Which wkhtmltopdf version should I use?
Use the official wkhtmltopdf 0.12.6 build for correct PDF headers and footers.
Conclusion
You’ve successfully installed Odoo 19 on Ubuntu 24.04 using a Python virtual environment with Nginx as a reverse proxy. You’ve also learned how to enable multiprocessing and optimize Odoo for production.
For additional configuration, check out our guide on how to create automatic daily backups of Odoo databases .
If you have any questions, feel free to leave a comment below.
Tags
Linuxize Weekly Newsletter
A quick weekly roundup of new tutorials, news, and tips.
About the authors

Dejan Panovski
Dejan Panovski is the founder of Linuxize, an RHCSA-certified Linux system administrator and DevOps engineer based in Skopje, Macedonia. Author of 800+ Linux tutorials with 20+ years of experience turning complex Linux tasks into clear, reliable guides.
View author page