How to Install Odoo 18 on Debian 13

How to Install Odoo 18 on Debian 13

This blog post is about installing Odoo 18 on Debian 13 OS. Odoo is an open-source resource planning software (ERP) and is a business application used worldwide. It is written in Python, which offers a variety of tools, including CRM (customer relationship management) systems, e-commerce, billing, accounting, project management, and many more. There are two versions of Odoo, Community and Enterprise. Odoo Community is an open-source software product, without a license, whereas the Enterprise is a version of the same product featuring an improved interface and more functionalities. In this blog post, we will install Odoo 18 CE Community Edition.

Installing Odoo 18 on Debian 13 is straightforward and may take up to 15 minutes. Let’s get things done!

Prerequisites

Step 1. Update the System

Before installing Odoo, we will update the system packages to their latest versions. To do that, execute the following command:

sudo apt update -y && sudo apt upgrade -y

Step 2. Install Python 3.12 and its Dependencies

Odoo 18 requires at least Python 3.11. But we will install Python 3.12. And this version is not available on Debian 13 as a package, so we need to install it from the source. Before we start with the installation process, first install the required Python 3.12 dependencies:

sudo apt install -y wget build-essential libfreetype-dev libxml2-dev libzip-dev libsasl2-dev node-less libjpeg-dev zlib1g-dev libpq-dev libxslt1-dev libldap2-dev libtiff5-dev libopenjp2-7-dev libcap-dev npm node-less -y

We need to download, configure, compile, and install Python 3.12. To do that, execute the following commands one by one:

cd /usr/src

wget https://www.python.org/ftp/python/3.12.0/Python-3.12.0.tgz

tar xzf Python-3.12.0.tgz

cd Python-3.12.0

./configure --enable-optimizations

make -j$(nproc)

make altinstall

Once installed, we need to set Python 3.12 as the default version with the command below:

update-alternatives --install /usr/bin/python3 python3 /usr/local/bin/python3.12 1

Check the installation with the command below:

python3 -V

You should get the following output:

root@host:~# python3 -V
Python 3.12.0

Step 3. Install Wkhtmltopdf

The Wkhtmltopdf is used to convert HTML pages to PDF files in Odoo. To install it, execute the following commands one by one in your terminal:

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

sudo mv wkhtmltox/bin/wkhtmlto* /usr/bin

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

wkhtmltopdf -V

You should get the following output:

root@host:~# wkhtmltopdf -V
wkhtmltopdf 0.12.6.1 (with patched qt)

Step 4. Install the PostgreSQL database service

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

sudo apt-get install postgresql -y

Next, start and enable the PostgreSQL service with the following:

sudo systemctl start postgresql && sudo systemctl enable postgresql

To check the status of the service:

sudo systemctl status postgresql

You should get output similar to this:

root@host:~# sudo systemctl status postgresql
● postgresql.service - PostgreSQL RDBMS
     Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; preset: enabled)
     Active: active (exited) since Thu 2025-05-01 10:30:22 CDT; 1h 9min ago
 Invocation: 37bf7045ae7e42c09b7033ccd9c73f43
   Main PID: 11417 (code=exited, status=0/SUCCESS)
   Mem peak: 1.6M
        CPU: 19ms

May 01 10:30:22 host.test.vps systemd[1]: Starting postgresql.service - PostgreSQL RDBMS...
May 01 10:30:22 host.test.vps systemd[1]: Finished postgresql.service - PostgreSQL RDBMS.

Step 5. Create Odoo System and Database User

Next, an Odoo system and an Odoo database user will be created under the odoo18 name.

To create an Odoo 18 system user in the /opt directory, execute the following:

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

An Odoo database user can be created with the command below:

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

Step 6. Download and Install Odoo 18

First, log in as “odoo18”:

su - odoo18

Download Odoo files from the Odoo GitHub repository:

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

Once downloaded, create a Python virtual environment and install the Odoo 18 requirements with the following commands one by one:

python3.12 -m venv odoo18-venv
source odoo18-venv/bin/activate
pip install --upgrade pip
pip3 install wheel
pip3 install -r odoo18/requirements.txt

Once the requirements are installed, deactivate the environment with:

deactivate

Then press CTRL+D to log out of the odoo18 user. The screen should look like this:

(odoo18-venv) odoo18@host:~$ deactivate
odoo18@host:~$ 
logout
root@host:~#

Next, we need to create the Odoo custom addons directory, the Log file directory, along with the Log file for Odoo, and grant the correct 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 Odoo configuration file

The Odoo configuration file can be created as explained below:

sudo nano /etc/odoo18.conf

Paste the following lines of code:

[options]
admin_passwd = StrongAdminPasswordHere
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

Please save the file and close it.

Step 8. Create Odoo Service file

Next, we need to create an Odoo service file:

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

Paste the following lines of code:

[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

Please save the file and close it.

Start and enable the odoo service for automatic start on system boot:

sudo systemctl start odoo18 && sudo systemctl enable odoo18

To check the status of the Odoo service, execute the following command:

sudo systemctl status odoo18

You should get output similar to this:

root@host:/opt/odoo18# systemctl status odoo18
● odoo18.service - odoo18
     Loaded: loaded (/etc/systemd/system/odoo18.service; enabled; preset: enabled)
     Active: active (running) since Fri 2025-05-01 11:00:04 CDT; 4s ago
 Invocation: 7494c6b4c53c43f3ac91464ebb87b6a8
   Main PID: 34803 (python3)
      Tasks: 4 (limit: 4644)
     Memory: 85.8M (peak: 86.3M)
        CPU: 3.255s
     CGroup: /system.slice/odoo18.service
             └─34803 /opt/odoo18/odoo18-venv/bin/python3 /opt/odoo18/odoo18/odoo-bin -c /etc/odoo18.conf

May 01 11:00:04 host.test.vps systemd[1]: Started odoo18.service - odoo18.

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

That’s it. You successfully installed the latest Odoo 18 on Debian 13.

Of course, you don’t have to do this if you have difficulties and are unfamiliar with Linux. You can always contact our technical support. You only need to sign up for one of our Odoo VPS plans and submit a support ticket. We are available 24/7 and will take care of your request immediately.

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

Leave a Comment