How to Install Odoo 19 on Ubuntu 24.04 LTS Server
Official Website: www.odoo.com
Documentation: https://www.odoo.com/documentation/19.0/

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_ipCustom SSH port:
ssh -p port_number username@server_ipWith PEM key:
ssh -i /path/to/your/key.pem username@server_ipStep 2: Update the Server
Update your system packages to ensure compatibility with the latest software:
sudo apt-get update
sudo apt-get upgrade -yStep 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 fail2banStep 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 gitInstall 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 rtlcssCreate symbolic link if needed:
sudo ln -s /usr/bin/nodejs /usr/bin/nodeInstall node-less
sudo apt-get install -y node-lessStep 5: Set Up PostgreSQL Database
Odoo uses PostgreSQL as its database backend:
Install PostgreSQL
sudo apt-get install -y postgresqlCreate PostgreSQL User for Odoo
sudo su - postgres
createuser --createdb --username postgres --no-createrole --superuser --pwprompt odoo19
exitNote: 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 odoo19Step 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 .
exitStep 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/activateInstall Python Dependencies
pip install --upgrade pip
pip install wheel
pip install -r requirements.txtInstall 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 -yInstall 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.debInstall Additional Fonts
sudo apt-get install -y xfonts-75dpi xfonts-baseDeactivate Virtual Environment
deactivate
exitStep 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.confUpdate 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 = 8069Set 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.confStep 10: Create the Systemd Service File
Create the Service File
sudo nano /etc/systemd/system/odoo19.serviceAdd 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.targetSet Permissions
sudo chmod 755 /etc/systemd/system/odoo19.service
sudo chown root: /etc/systemd/system/odoo19.serviceStep 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:8069You 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 reloadUseful Commands for Managing Odoo
| Command | Description |
|---|---|
sudo systemctl start odoo19 | Start the Odoo service |
sudo systemctl stop odoo19 | Stop the Odoo service |
sudo systemctl restart odoo19 | Restart the Odoo service |
sudo systemctl status odoo19 | Check service status |
sudo journalctl -u odoo19 -f | View real-time logs |
sudo journalctl -u odoo19 -n 100 | View last 100 log lines |
sudo systemctl is-enabled odoo19 | Check if service starts at boot |
sudo tail -f /var/log/odoo/odoo19.log | View Odoo application logs |
File Structure Overview
| Path | Description |
|---|---|
/opt/odoo19/ | Odoo installation directory |
/opt/odoo19/venv/ | Python virtual environment |
/opt/odoo19/addons/ | Official addons directory |
/opt/odoo19/odoo-bin | Odoo server executable |
/etc/odoo19.conf | Odoo configuration file |
/var/log/odoo/odoo19.log | Odoo application logs |
/etc/systemd/system/odoo19.service | Systemd service file |
Troubleshooting
Service Won't Start
Check logs for errors:
sudo journalctl -u odoo19.service -n 100 --no-pagerDatabase Connection Error
- Verify PostgreSQL is running:
sudo systemctl status postgresql - Check
db_host,db_user, anddb_passwordin/etc/odoo19.conf - Ensure PostgreSQL user
odoo19exists: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.confConclusion
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.

