How to install Odoo 17 on Debian 13

How to Install Odoo 17 on Debian 13

This blog post will show you how to install Odoo 17 on Debian 13 OS. Odoo is an open-source ERP (Enterprise Resource Planning) software in Python and JavaScript that seamlessly integrates multiple business applications. As a business management system, it includes CRM (customer relationship manager), e-commerce, billing, accounting, project management, inventory manager, and many more tools that can be installed under different plugins. Odoo runs as a service on any Linux OS and stores the data in a PostgreSQL database service, the installation of which will be covered in this post.

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

Prerequisites

  • A server with Debian 13 OS
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

Before we execute and command the installation, it is recommended first to update the system packages to their latest available versions:

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

Step 2. Install Python and its dependencies

Odoo 17 is compatible with Python 3.12., Python 3.12 is unavailable on Debian 13 as a package, so we must 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 zlib1g-dev libssl-dev libncurses5-dev libnss3-dev libreadline-dev libffi-dev libsqlite3-dev libbz2-dev -y

Now, we need to download, configure, compile, and install Python 3.12 by executing the following commands one by one until the previous commands are completed:

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

To check the installed version, execute the following command:

python3 -V

You should get the following output:

root@host:~# python3 -V
Python 3.12.0

Step 3. Install NPM and Node CSS plugins

Next, we need to install NPM and Node, which are very important and necessary for Odoo to function correctly. You can install NPM and Node with the following commands:

sudo apt-get install npm -y

npm install -g less less-plugin-clean-css

sudo apt-get install node-less -y

Step 4. 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.4 (with patched qt)

Step 5. Install PostgreSQL database service

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

sudo apt-get install postgresql -y

Afterwards, start and enable the PostgreSQL service, and you need to do 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 Fri 2025-04-11 04:21:30 CDT; 1min 30s ago
Invocation: c6f20e1498af4f9b87b7591dddbbec0e
Main PID: 24656 (code=exited, status=0/SUCCESS)
Mem peak: 1.7M
CPU: 24ms

Apr 11 04:21:30 host.test.vps systemd[1]: Starting postgresql.service - PostgreSQL RDBMS...
Apr 11 04:21:30 host.test.vps systemd[1]: Finished postgresql.service - PostgreSQL RDBMS.

Step 6. Create Odoo System and Database User

Next, we must create an Odoo system and an Odoo database user under the odoo17 name.

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

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

Odoo database user can be created with the command below:
sudo su - postgres -c "createuser -s odoo17"

Step 7. Install and Configure Odoo 17

First log in as “odoo17”:

su - odoo17

Download Odoo files from the Odoo GitHub repository:

git clone https://www.github.com/odoo/odoo --depth 1 --branch 17.0 /opt/odoo17/odoo17

Once downloaded, create a Python virtual environment and install the Odoo 17 requirements with the following commands one by one:
python3.12 -m venv odoo17-venv
source odoo17-venv/bin/activate
pip install --upgrade pip
pip3 install wheel
pip3 install -r odoo17/requirements.txt

Once the requirements are installed, deactivate the environment with:
deactivate

And then press CTRL+D to log out of the odoo17 user. The screen should look like this:

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

Next, we need to create the Odoo custom addons directory, Log file directory along with Log file for Odoo, and grant the correct permissions:
mkdir /opt/odoo17/odoo17-custom-addons
chown -R odoo17:odoo17 /opt/odoo17/odoo17-custom-addons
mkdir -p /var/log/odoo17/ && touch /var/log/odoo17/odoo17.log
chown -R odoo17:odoo17 /var/log/odoo17/

Step 8. Create Odoo configuration file

The Odoo configuration file can be created as explained below:

touch /etc/odoo17.conf

Open the file with your favorite text editor and paste the following lines of code:

[options]

admin_passwd = StrongPasswordHere db_host = False db_port = False db_user = odoo17 db_password = False xmlrpc_port = 8069 logfile = /var/log/odoo17/odoo17.log addons_path = /opt/odoo17/odoo17/addons,/opt/odoo17/odoo17-custom-addons

Could you save the file and close it?

Step 9. Create Odoo Service file

Next, we need to create an Odoo service file:

touch /etc/systemd/system/odoo17.service

Open the file with your favorite text editor and paste the following lines of code:

[Unit]
Description=odoo17

[Service]
Type=simple
SyslogIdentifier=odoo17
PermissionsStartOnly=true
User=odoo17
Group=odoo17
ExecStart=/opt/odoo17/odoo17-venv/bin/python3 /opt/odoo17/odoo17/odoo-bin -c /etc/odoo17.conf
StandardOutput=journal+console

[Install]
WantedBy=multi-user.target

Save the file and close it.

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

sudo systemctl start odoo17 && sudo systemctl enable odoo17

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

sudo systemctl status odoo17

You should get output similar to this:

root@host:/opt# sudo systemctl status odoo17
● odoo17.service - odoo17
     Loaded: loaded (/etc/systemd/system/odoo17.service; enabled; preset: enabled)
     Active: active (running) since Fri 2025-04-11 05:42:31 CDT; 5s ago
 Invocation: aedcdfebb731444680317e92d2cdb71a
   Main PID: 56768 (python3)
      Tasks: 4 (limit: 4644)
     Memory: 87.7M (peak: 88.2M)
        CPU: 3.320s
     CGroup: /system.slice/odoo17.service
             └─56768 /opt/odoo17/odoo17-venv/bin/python3 /opt/odoo17/odoo17/odoo-bin -c /etc/odoo17.conf

Apr 11 05:42:31 host.test.vps systemd[1]: Started odoo17.service - odoo17.

You can access Odoo at http://YourServerIPAddress:8069.

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

If you have difficulties with this installation, our Linux admins will help you. Sign up for one of our monthly management or per-incident server support plans. Do not hesitate to contact us anytime. We are available 24/7.

If you liked this post on how to install Odoo 17 on Debian 13, please share it with your friends or leave a comment below. Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *