If you’re looking for a simple and reliable way to install Odoo 17 Community Edition on Ubuntu 24.04, this step-by-step guide is all you need.
You’ll have your Odoo server up and running in just a few minutes, complete with a Python virtual environment, PostgreSQL setup, and a systemd service for automatic startup.
What You’ll Learn
In this guide, you’ll learn how to:
-
Install Odoo 17 Community Edition on Ubuntu 24.04 LTS
-
Set up a dedicated Odoo user and database role
-
Use a Python virtual environment for isolated dependencies
-
Configure systemd to manage your Odoo service automatically
-
Enable RTL support for Arabic using
rtlcss
Step-by-Step Odoo 17 Installation Guide
Step 1: Install System Dependencies
Run the following command to install all required packages, including PostgreSQL, Python, Node.js, and wkhtmltopdf (for PDF reports):
sudo apt update
sudo apt install -y git python3-venv python3-dev build-essential \ libpq-dev libxml2-dev libxslt1-dev libjpeg-dev zlib1g-dev \ libsasl2-dev libldap2-dev libtiff5-dev libopenjp2-7-dev \ libfreetype6-dev liblcms2-dev libwebp-dev libharfbuzz-dev \ libfribidi-dev libxcb1-dev pkg-config xz-utils fontconfig \ wkhtmltopdf nodejs npm postgresql
Step 2: Create the Odoo User and Directory
Create a new system user for Odoo to keep files organized and secure:
sudo useradd -r -m -U -s /bin/bash -d /opt/odoo17 odoo17
Step 3: Create a PostgreSQL Role
Create a PostgreSQL role for the Odoo user. This allows Odoo to connect without a password
sudo -u postgres createuser -d -R -S odoo17
Step 4: Download Odoo 17 Community Source
Clone the official Odoo 17 source code into the user directory:
sudo -u odoo17 -H bash -c "cd /opt/odoo17 && git clone --depth 1 --branch 17.0 https://github.com/odoo/odoo.git server"
Step 5: Create Python Virtual Environment
Odoo runs best in an isolated Python environment:
sudo -u odoo17 -H bash -c "python3 -m venv /opt/odoo17/venv" sudo -u odoo17 -H bash -c "/opt/odoo17/venv/bin/pip install --upgrade pip setuptools wheel" sudo -u odoo17 -H bash -c "/opt/odoo17/venv/bin/pip install -r /opt/odoo17/server/requirements.txt"
Step 6: (Optional) Install RTL CSS for Arabic Layouts
If you’re setting up Odoo for Arabic users, add RTL CSS support:
sudo npm install -g rtlcss
Step 7: Configure Odoo
Create and set the Odoo configuration file:
sudo mkdir -p /var/log/odoo17 sudo chown odoo17:odoo17 /var/log/odoo17
sudo tee /etc/odoo17.conf >/dev/null <<'EOF' [options] admin_passwd = change-this-master-password db_host = False db_port = False db_user = odoo17 db_password = False addons_path = /opt/odoo17/server/odoo/addons,/opt/odoo17/server/addons data_dir = /opt/odoo17/.local/share/Odoo logfile = /var/log/odoo17/odoo.log EOF sudo chown odoo17:odoo17 /etc/odoo17.conf sudo chmod 640 /etc/odoo17.conf
Step 8: Create Systemd Service
To automatically start Odoo with your system, create a systemd unit file:
sudo tee /etc/systemd/system/odoo17.service >/dev/null <<'EOF' [Unit] Description=Odoo 17 Community After=network.target postgresql.service [Service] Type=simple User=odoo17 Group=odoo17 WorkingDirectory=/opt/odoo17/server ExecStart=/opt/odoo17/venv/bin/python3 /opt/odoo17/server/odoo-bin -c /etc/odoo17.conf Restart=on-failure RestartSec=5 StandardOutput=journal StandardError=journal [Install] WantedBy=multi-user.target EOF sudo systemctl daemon-reload sudo systemctl enable --now odoo17 sudo systemctl status odoo17 | cat
Step 9: Access Odoo Web Interface
Once the service starts, open your browser and go to:
http://YOUR_SERVER_IP:8069
Create a new database and log in to your Odoo 17 instance.
Fix wkhtmltopdf Version Issue in Odoo 17 (Ubuntu Jammy)
If you are facing wkhtmltopdf version errors, PDF report issues, or Odoo not generating invoices properly, follow the steps below to install the correct version of wkhtmltopdf.
Odoo 17 works best with wkhtmltopdf 0.12.6.1 (patched Qt version).
Step 1: Install Required Dependencies
sudo apt-get install -y wget xfonts-75dpi xfonts-base libjpeg-turbo8 libxrender1 libfontconfig1 libxext6 libssl3
Step 2: Download Correct wkhtmltopdf Version
cd /tmp wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb
Step 3: Install the Package
sudo dpkg -i wkhtmltox_0.12.6.1-2.jammy_amd64.deb
If you see dependency errors, run:
sudo apt-get install -f -y
Step 4: Verify Installation
wkhtmltopdf --version
Step 5: Restart Odoo
cd sudo systemctl restart odoo17
Setting up Odoo 17 Community on Ubuntu 24.04 is easier than ever with this streamlined method.
This configuration ensures a secure, lightweight, and production-ready Odoo environment, ideal for developers, ERP consultants, and businesses deploying Odoo in the cloud.