How to Install Odoo 19 on Ubuntu 24.04 LTS Server

Jul 26, 2026NinjaFunction Team
OdooERPUbuntuPostgreSQLDevOpsInstallation
How to Install Odoo 19 on Ubuntu 24.04 LTS Server

Odoo 19 introduces a wide range of functional and technical improvements, including AI-powered features, UI enhancements, and performance optimizations. This guide walks you through installing Odoo 19 Community Edition on an Ubuntu 24.04 LTS server from source. All commands should be executed with sudo privileges unless specified otherwise.

Prerequisites

  • OS: Ubuntu 24.04 LTS (64-bit)
  • RAM: Minimum 2 GB (4 GB+ recommended)
  • CPU: 2+ cores recommended
  • Storage: 10 GB+ free space (SSD recommended)
  • Port: 8069 accessible for the Odoo web interface

Step 1: Log in to Your Ubuntu Server

If you're working on a remote machine, connect via SSH:

Default SSH port (22):

ssh username@server_ip

Custom SSH port:

ssh -p port_number username@server_ip

With PEM key:

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

Step 2: Update the Server

Update your system packages to ensure compatibility with the latest software:

sudo apt-get update
sudo apt-get upgrade -y

Step 3: Secure the Server

Install Fail2Ban to protect against brute-force attacks:

sudo apt-get install -y openssh-server fail2ban
sudo systemctl start fail2ban
sudo systemctl enable fail2ban
sudo systemctl status fail2ban

Step 4: Install Packages and Libraries

Install Python and System Dependencies

sudo apt-get install -y python3-pip python3-dev python3-venv \ 
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 git

Install Node.js and NPM

Odoo requires Node.js for frontend asset processing:

curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash - sudo apt-get install -y nodejs sudo npm install -g less less-plugin-clean-css rtlcss

Create symbolic link if needed:

sudo ln -s /usr/bin/nodejs /usr/bin/node

Install node-less

sudo apt-get install -y node-less

Step 5: Set Up PostgreSQL Database

Odoo uses PostgreSQL as its database backend:

Install PostgreSQL

sudo apt-get install -y postgresql

Create PostgreSQL User for Odoo

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

Note: You will be prompted to set a password for the odoo19 database user. Remember this password for the configuration file later.

Step 6: Create a System User for Odoo

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

Step 7: Clone Odoo 19 from GitHub

Switch to the Odoo user and clone the repository:

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 Packages and Dependencies

Create and Activate Virtual Environment

sudo python3 -m venv /opt/odoo19/venv
sudo -s
cd /opt/odoo19
source venv/bin/activate

Install Python Dependencies

pip install --upgrade pip
pip install wheel
pip install -r requirements.txt

Install wkhtmltopdf for PDF Reports

sudo wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb
sudo dpkg -i wkhtmltox_0.12.6.1-3.jammy_amd64.deb || sudo apt-get install -f -y

Install OpenSSL Dependency (if needed)

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

Install Additional Fonts

sudo apt-get install -y xfonts-75dpi xfonts-base

Deactivate Virtual Environment

deactivate
exit

Step 9: Set Up the Configuration File

Copy and Edit the Configuration File

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

Update the configuration with your settings:

[options]
;Master password for database operations (change this!)
admin_passwd = YOUR_STRONG_ADMIN_PASSWORD
db_host = localhost
db_port = 5432
db_user = odoo19
db_password = YOUR_POSTGRESQL_PASSWORD
addons_path = /opt/odoo19/addons
logfile = /var/log/odoo/odoo19.log
http_port = 8069

Set Permissions and Create Log Directory

sudo mkdir -p /var/log/odoo
sudo chown odoo19:root /var/log/odoo
sudo chown odoo19: /etc/odoo19.conf
sudo chmod 640 /etc/odoo19.conf

Step 10: Create the Systemd Service File

Create the Service File

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

Add the following content:

[Unit]
Description=Odoo 19
Documentation=http://www.odoo.com
Requires=postgresql.service
After=network.target postgresql.service
[Service]
Type=simple
User=odoo19
Group=odoo19
ExecStart=/opt/odoo19/venv/bin/python3 /opt/odoo19/odoo-bin -c /etc/odoo19.conf
Restart=on-failure
RestartSec=5
SyslogIdentifier=odoo19
StandardOutput=journal+console
[Install]
WantedBy=multi-user.target

Set Permissions

sudo chmod 755 /etc/systemd/system/odoo19.service
sudo chown root: /etc/systemd/system/odoo19.service

Step 11: Start and Enable Odoo Service

Reload systemd, start, and enable the service:

sudo systemctl daemon-reload
sudo systemctl start odoo19.service
sudo systemctl enable odoo19.service
sudo systemctl status odoo19.service

Step 12: Access Odoo in Your Browser

Open your web browser and navigate to:

http://your_server_ip_or_domain:8069

You should see the Odoo database creation page, where you can set up your first database.

Step 13: Firewall Configuration (Optional)

If you have UFW enabled, allow port 8069:

sudo ufw allow 8069/tcp
sudo ufw reload

Useful Commands for Managing Odoo

CommandDescription
sudo systemctl start odoo19Start the Odoo service
sudo systemctl stop odoo19Stop the Odoo service
sudo systemctl restart odoo19Restart the Odoo service
sudo systemctl status odoo19Check service status
sudo journalctl -u odoo19 -fView real-time logs
sudo journalctl -u odoo19 -n 100View last 100 log lines
sudo systemctl is-enabled odoo19Check if service starts at boot
sudo tail -f /var/log/odoo/odoo19.logView Odoo application logs

File Structure Overview

PathDescription
/opt/odoo19/Odoo installation directory
/opt/odoo19/venv/Python virtual environment
/opt/odoo19/addons/Official addons directory
/opt/odoo19/odoo-binOdoo server executable
/etc/odoo19.confOdoo configuration file
/var/log/odoo/odoo19.logOdoo application logs
/etc/systemd/system/odoo19.serviceSystemd service file

Troubleshooting

Service Won't Start

Check logs for errors:

sudo journalctl -u odoo19.service -n 100 --no-pager

Database Connection Error

  • Verify PostgreSQL is running:
    sudo systemctl status postgresql
  • Check db_host, db_user, and db_password in /etc/odoo19.conf
  • Ensure PostgreSQL user odoo19 exists:
    sudo -u postgres psql -c "\du"

Permission Errors

Ensure correct ownership:

sudo chown -R odoo19:odoo19 /opt/odoo19
sudo chown odoo19:root /var/log/odoo
sudo chmod 640 /etc/odoo19.conf

Conclusion

You have successfully installed Odoo 19 on your Ubuntu 24.04 server. The system is configured with a dedicated PostgreSQL database, Python virtual environment, and systemd service for automatic startup. You can now access your Odoo instance at http://your_server_ip:8069 and begin configuring your ERP system.

For production deployments, consider setting up a reverse proxy (like Nginx) with SSL certificates using Let's Encrypt for secure HTTPS access.

Reference