How to Install Odoo 18 on Ubuntu 26.04

This tutorial demonstrates how to install Odoo 18 on Ubuntu 26.04. Odoo is a comprehensive open-source ERP solution that combines essential business applications into a single platform, including accounting, CRM, sales, inventory, eCommerce, manufacturing, and more. Its modular framework allows businesses to deploy only the features they require while remaining flexible enough to accommodate future growth. Odoo also offers extensive customization, centralized data management, multiple deployment options, and an intuitive user interface. Since Odoo uses PostgreSQL as its database backend, this guide also covers PostgreSQL installation and basic configuration.

Deploying Odoo 18 on Ubuntu 26.04 is a simple, efficient process that typically takes no more than 15 minutes. Follow the steps in this guide to prepare your server and install a fully functional Odoo instance.

Prerequisites

Step 1. Update the system

Before installing Odoo and the required dependencies, it is recommended to update the system packages to their latest available versions. Run the following command to refresh and upgrade your packages:

apt update -y && apt upgrade -y

Step 2. Install Python along with its Dependencies

Odoo 18 supports Python 3.12, not newer versions. So to install Python 3.12, first we need to install some dependencies:

apt install software-properties-common build-essential libssl-dev zlib1g-dev libbz2-dev  libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python3-openssl git -y

Then we need to add the Python 3.12 repository:

add-apt-repository ppa:deadsnakes/ppa && apt update

Finally, we can install Python 3.12 with the following command:

apt install python3.12 python3.12-venv python3.12-dev -y

To verify the installation of Python 3, execute the command below:

python3 -V

You should get output similar to this:

root@host:~# python3 -V
Python 3.12.13

Step 3. Install Wkhtmltopdf

Odoo 18 relies on wkhtmltopdf to generate PDF documents from HTML content. This utility is also required by earlier Odoo releases. To install wkhtmltopdf, run the following commands one at a time:

wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz

tar xvf wkhtmltox*.tar.xz

mv wkhtmltox/bin/wkhtmlto* /usr/bin

Once installed, check the wkhtmltopdf version with the command below:

wkhtmltopdf -V

You should get the following output:

Step 4. Install the PostgreSQL database service

To install the PostgreSQL database service, execute the command below:

apt-get install postgresql -y

Start the PostgreSQL service and configure it to launch automatically at system startup by running the following commands:

systemctl start postgresql && systemctl enable postgresql

To verify that the PostgreSQL service is running, execute the following command:

systemctl status postgresql

You should get output similar to this

root@host:~# systemctl status postgresql
● postgresql.service - PostgreSQL RDBMS
     Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; preset: enabled)
     Active: active (exited) since Tue 2026-07-07 18:18:19 CDT; 32s ago
 Invocation: 259f2b206868483081a2c3200fe4e9c0
   Main PID: 9623 (code=exited, status=0/SUCCESS)
   Mem peak: 1.8M
        CPU: 16ms

Jul 07 18:18:19 host.test.vps systemd[1]: Starting postgresql.service - PostgreSQL RDBMS...
Jul 07 18:18:19 host.test.vps systemd[1]: Finished postgresql.service - PostgreSQL RDBMS.

Step 5. Create the Odoo System User and PostgreSQL Role

The next step is to create a dedicated system user that will own and run the Odoo 18 service. Create the user by executing the following command:

useradd -m -U -r -d /opt/odoo18 -s /bin/bash odoo18

After creating the system user, create a matching PostgreSQL role that Odoo 18 will use to access the database:

sudo su - postgres -c "createuser -s odoo18"

Step 6. Download and Install Odoo 18

Switch to the newly created odoo18 user before downloading the Odoo source code:

su - odoo18

Clone the Odoo 18 source code from the official GitHub repository by running:

git clone https://www.github.com/odoo/odoo --depth 1 --branch 18.0 /opt/odoo18/odoo18

Once the source code has been downloaded, create a Python virtual environment and install all required Odoo 18 dependencies by executing the following commands in order:

 
python3.12 -m venv odoo18-venv 

source odoo18-venv/bin/activate 

pip install --upgrade pip 

pip3 install wheel 

pip3 install -r odoo18/requirements.txt 

When the installation is complete, exit the virtual environment with the following command:

deactivate

Then log out from the odoo18 account by pressing CTRL+D. Your terminal output should be similar to the following:

 
(odoo18-venv) odoo18@host:~$ deactivate 
odoo18@host:~$ ^C 
odoo18@host:~$ 
logout 

Finally, create a directory for custom Odoo addons, prepare the log directory and log file, and assign the appropriate ownership permissions:

 
mkdir /opt/odoo18/odoo18-custom-addons 

chown -R odoo18:odoo18 /opt/odoo18/odoo18-custom-addons 

mkdir -p /var/log/odoo18/ && touch /var/log/odoo18/odoo18.log 

chown -R odoo18:odoo18 /var/log/odoo18/ 

Step 7. Create the Odoo Configuration File

The next step is to create the configuration file that Odoo 18 will use during startup. Open a new configuration file by running:

nano /etc/odoo18.conf

Insert the following configuration into the file:

[options] 
admin_passwd = StrongMasterPassword
db_host = False
db_port = False
db_user = odoo18
db_password = False
xmlrpc_port = 8069
logfile = /var/log/odoo18/odoo18.log
addons_path = /opt/odoo18/odoo18/addons,/opt/odoo18/odoo18-custom-addons

Once you have added the configuration, save the file and exit the editor.

Step 8. Create the Odoo Systemd Service

To manage Odoo 18 as a system service, create a new systemd service file:

nano /etc/systemd/system/odoo18.service

Add the following contents to the file:

[Unit] 
Description=odoo18 
[Service] 
Type=simple 
SyslogIdentifier=odoo18 
PermissionsStartOnly=true 
User=odoo18 
Group=odoo18 
ExecStart=/opt/odoo18/odoo18-venv/bin/python3 /opt/odoo18/odoo18/odoo-bin -c /etc/odoo18.conf 
StandardOutput=journal+console 
[Install] 
WantedBy=multi-user.target

Save the file, then close your text editor.

After creating the service, start Odoo 18 and enable it to launch automatically whenever the system boots:

systemctl start odoo18 && systemctl enable odoo18

To confirm that the service is running correctly, execute the following command:

systemctl status odoo18

If everything has been configured successfully, you should see output similar to the following:

root@host:~# systemctl status odoo18
● odoo18.service - odoo18
     Loaded: loaded (/etc/systemd/system/odoo18.service; enabled; preset: enabled)
     Active: active (running) since Tue 2026-07-07 18:30:06 CDT; 7s ago
 Invocation: 606f3c400db8404db1aa6f30c025c4b3
   Main PID: 11577 (python3)
      Tasks: 4 (limit: 3770)
     Memory: 87.7M (peak: 88M)
        CPU: 2.669s
     CGroup: /system.slice/odoo18.service
             └─11577 /opt/odoo18/odoo18-venv/bin/python3 /opt/odoo18/odoo18/odoo-bin -c /etc/odoo18.conf

Jul 07 18:30:06 host.test.vps systemd[1]: Started odoo18.service - odoo18.

Now you can access your Odoo 18 at http://YourServerIPAddress:8069

You’ve learned how to install Odoo 18 on Ubuntu 26.04

That’s it. You learned how to install Odoo 18 on Ubuntu 26.04. If you still need assistance, you can get help from a reputable MSP.

If you liked this post about Odoo 18 installation, please share it with your friends or leave a comment below.

Leave a Comment