How to Install Odoo 20 on Debian 13 with PostgreSQL

How to Install Odoo 20 on Debian with PostgreSQL

Odoo, formerly known as OpenERP, is an open-source suite of business applications that is easy to use and integrate. It offers many advantages, including a large community, comprehensive integrated modules, and straightforward installation. Its broad selection of modules, all available within a single application, has made Odoo increasingly popular. In its official announcement on September 24, 2026, Odoo introduced a range of updates across AI, purchasing, inventory, manufacturing, and accounting. These changes provide an opportunity to re-examine manual tasks and the company’s operational workflows. In this article, we will show you how to install Odoo 20 on Debian 13 with PostgreSQL.

Prerequisites

  • A Debian 13 server with at least 2GB of RAM
  • SSH access with sudo privileges, or root access

Conventions

# – given commands should be executed with root privileges either directly as a root user or by use of sudo command
$ – given commands should be executed as a regular user

Step 1. Log in and Update the System

First of all, we need to log in to our Debian 13 machine through SSH:

ssh master@IP_Address -p Port_number

Replace “master” with a user that has sudo privileges or root if necessary. Additionally, replace “IP_Address”and “Port_Number” with your server’s respective IP address and SSH port number. Next, let’s make sure that we’re on Debian 13. You can verify it with this command:

$ lsb_release -a

You should get this as the output:

No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 13 (trixie)
Release:	13
Codename:	trixie
root@debian13:/home/ma

Then, run the following command to make sure that all installed packages on the server are updated to their latest available versions:

$ sudo apt update

That’s it. The system package information should be updated now.

Step 2. Add a New System User

We will install the Odoo 20 instance under a new system user account. So, in this step, we will create a new system account called ‘odoo20’.

$ sudo useradd -md /opt/odoo20 -Urs /bin/bash odoo20

Step 3. Install Dependencies

Since Odoo is built on Python, we need to install some dependencies to proceed to install Odoo 20 on our Debian 13 system. We can install them by running the command below.

$ sudo apt install build-essential wget git python3-pip python3-dev python3-venv python3-wheel libfreetype6-dev libxml2-dev libzip-dev libsasl2-dev python3-setuptools libjpeg-dev zlib1g-dev libpq-dev libxslt1-dev libldap2-dev libtiff5-dev libopenjp2-7-dev

Step 4. Install PostgreSQL

Currently, Odoo only supports PostgreSQL for storing its data. Let’s execute the command below to install the PostgreSQL server on our Debian 13 server.

$ sudo apt install postgresql

After the installation is completed, we can add a new PostgreSQL user for our Odoo 20. Run this command:

$ sudo su - postgres -c "createuser -s odoo20"

Step 5. Install Wkhtmltopdf

There is no Debian package wkhtmltopdf for our Debian 13 system. We can download the Bookworm version and use it instead. The patched QT version of wkhtmltopdf offers better compatibility and more features compared to the stock version that you usually get from default repositories. If you need reliable PDF generation with advanced CSS and JavaScript support, install it this way.

$ curl -fsSL -o /tmp/wkhtmltox.deb https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.bookworm_amd64.deb

We downloaded the installation package file; let’s install it now.

$ sudo apt install /tmp/wkhtmltox.deb

Once installed, you can check its version by running this command

$ wkhtmltopdf --version

You will see an output like this:

wkhtmltopdf 0.12.6.1 (with patched qt)

Step 6. Install Odoo 20

There are some methods to install Odoo 20. In this article, we will install Odoo 20 using a Python virtual environment under a system user. We created a system user earlier in this article; let’s switch to the system user ‘odoo20’ and then install Odoo under that username.

$ sudo su - odoo20

We switched to the system user ‘odoo20’ now. Let’s download Odoo 20 from GitHub.

$ git clone https://www.github.com/odoo/odoo --depth 1 --branch 20.0 odoo20

Odoo 20 has been cloned to the /opt/odoo20/odoo20 directory. Now, let’s create a Python virtual environment. With this Python virtual environment method, we can install multiple Odoo instances on a single machine.

Execute the following command to create a new Python virtual environment.

$ python3 -m venv odoo20-venv

The virtual environment is now installed; activate it by running this command.

$ source odoo20-venv/bin/activate

Once executed, your shell prompt will look like this:

(odoo20-venv) odoo20@debian13:~$

Next, let’s install Odoo 20 on Debian 13.

(odoo20-venv) odoo20@debian13:~$ pip3 install wheel
(odoo20-venv) odoo20@debian13:~$ pip3 install -r odoo20/requirements.txt

Once Odoo installation is completed, we can create a new directory to store our custom Odoo addons.

(odoo20-venv) odoo20@debian13:~$ deactivate

Now create a new folder or directory to store our custom addons.

$ mkdir /opt/odoo20/odoo20/custom-addons

Now, exit as user ‘odoo20’ and create an Odoo configuration file.

$ exit
$ sudo nano /etc/odoo20.conf

Paste the following contents into the file.

[options]
admin_passwd = m0d1fyth15
db_user = odoo20
db_password = Fals
addons_path = /opt/odoo20/odoo20/addons,/opt/odoo20/odoo20/custom-addons
http_port = 8069
http_interface = 0.0.0.0

Make sure to modify the value of the admin_passwd key above to a strong password. This is your Odoo’s master password, you need it to create or delete databases.

Step 7. Create Odoo Systemd Unit file

In this step, we will create a systemd unit file, it is required to start/stop/restart Odoo.

$ sudo nano /etc/systemd/system/odoo20.service

Paste the following content into the systemd unit file above.

[Unit]
Description=odoo20
Requires=postgresql.service
After=network.target postgresql.service

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

[Install]
WantedBy=multi-user.target

That’s it. Now reload systemd and run Odoo.

$ sudo systemctl daemon-reload
$ sudo systemctl enable --now odoo20

Check if Odoo is starting by running this command:

$ sudo systemctl status odoo20

You should see it’s running.

● odoo20.service - odoo20
     Loaded: loaded (/etc/systemd/system/odoo20.service; enabled; preset: enabled)
     Active: active (running) since Mon 2026-11-23 07:55:29 EST; 6s ago
 Invocation: ca6fa6561c774bd6ae8b88d1edd68c2c
   Main PID: 22506 (python3)
      Tasks: 4 (limit: 2217)
     Memory: 95.1M (peak: 95.4M)
        CPU: 1.756s
     CGroup: /system.slice/odoo20.service
             └─22506 /opt/odoo20/odoo20-venv/bin/python3 /opt/odoo20/odoo20/odoo-bin -c /etc/odoo20.conf

Nov 23 07:55:29 debian13 systemd[1]: Started odoo20.service - odoo20.
Nov 23 07:55:30 debian13 odoo20[22506]: 2026-11-23 12:55:30,414 22506 WARNING ? odoo.tools.config: option addons_path, invalid addons directory '/opt/odoo20/odoo20/cu>
Nov 23 07:55:30 debian13 odoo20[22506]: 2026-11-23 12:55:30,415 22506 INFO ? odoo: Odoo version 20.0
Nov 23 07:55:30 debian13 odoo20[22506]: 2026-11-23 12:55:30,415 22506 INFO ? odoo: Using configuration file at /etc/odoo20.conf
Nov 23 07:55:30 debian13 odoo20[22506]: 2026-11-23 12:55:30,415 22506 INFO ? odoo: addons paths: _NamespacePath(['/opt/odoo20/odoo20/odoo/addons', '/opt/odoo20/.local>
Nov 23 07:55:30 debian13 odoo20[22506]: 2026-11-23 12:55:30,415 22506 INFO ? odoo: database: odoo20@default:default
Nov 23 07:55:31 debian13 odoo20[22506]: 2026-11-23 12:55:31,435 22506 INFO ? odoo.service.server: HTTP service running on 127.0.0.1:8069
Nov 23 07:55:31 debian13 odoo20[22506]: 2026-11-23 12:55:31,436 22506 INFO ? odoo.service.server.ThreadedServer.cron0: Alive
Nov 23 07:55:31 debian13 odoo20[22506]: 2026-11-23 12:55:31,437 22506 INFO ? odoo.service.server.ThreadedServer.cron1: Alive

Open your web browser and navigate to http://YOUR_SERVER_IP_ADDRESS:8069; you will see the Odoo page.

install odoo 20 on debian 13

You can fill them out to create a new database. After a new database is created, you will be brought to the backend.

Odoo 20 Dashboard

Step 8. Configure Reverse Proxy

To access Odoo with a domain name instead of typing the IP address and port number, we need a web server. In this tutorial, we will install and use Nginx. Run the following command to install it

$ sudo apt -y install nginx

After installation, Nginx will start automatically. It is also configured to start automatically upon reboot.

Now, let’s create an Nginx server block for the domain name you will use for accessing Odoo. For example, we will use yourdomain.com

$ sudo nano /etc/nginx/sites-enabled/yourdomain.com

Insert the following into that file

upstream odoo20 {
server 127.0.0.1:8069;
}

server {
   listen 80;
   server_name odoo20.yourdomain.com;

access_log /var/log/nginx/odoo.access.log;
error_log /var/log/nginx/odoo.error.log;

proxy_buffers 16 64k;
proxy_buffer_size 128k;

   location / {
      proxy_pass http://odoo20;
      proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";
      proxy_set_header Host $host;
      proxy_cache_bypass $http_upgrade;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-NginX-Proxy true;
      proxy_set_header X-Forwarded-Proto https;
      proxy_set_header X-Forwarded-Host $host;
      proxy_redirect off;
      proxy_request_buffering off;
      proxy_connect_timeout  36000s;
      proxy_read_timeout  36000s;
      proxy_send_timeout  36000s;
      send_timeout  36000s;
   }
   location ~* /web/static/ {
      proxy_cache_valid 200 60m;
      proxy_buffering on;
      expires 864000;
      proxy_pass http://odoo20;
   }

   location /longpolling {
      proxy_pass http://127.0.0.1:8072;
   }
}  

Save the file and restart the web server for the changes to take effect.

Need a fast and easy fix?
✔ Unlimited Managed Support
✔ Supports Your Software
✔ 2 CPU Cores
✔ 2 GB RAM
✔ 50 GB PCIe4 NVMe Disk
✔ 1854 GeekBench Score
✔ Unmetered Data Transfer
NVME 2 VPS

Now just $43 .99
/mo

GET YOUR VPS
$ sudo systemctl restart nginx

If you want to use nginx only to access Odoo, we need to adjust the /etc/odoo.conf file and make sure Odoo listens on localhost only. Simply replace 0.0.0.0 with 127.0.0.1 in http_interface. After you make changes to the odoo. conf file, conf file, you need to restart Odoo.

Step 9. Install SSL Certificate

In this step, we will install certbot. Certbot is an ACME client for generating Let’s Encrypt SSL certificates.

# apt install python3-certbot-nginx

Once installed, run this command to generate an SSL certificate. Make sure your subdomain or domain name is already pointing to your server; otherwise, certbot will fail to generate the SSL certificate.

# certbot --nginx -d odoo20.yourdomain.com

The command will return output like this if everything is working correctly.

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Enter email address or hit Enter to skip.
 (Enter 'c' to cancel): you@yourdomain.com

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at:
https://letsencrypt.org/documents/LE-SA-v1.8-July-06-2026.pdf
You must agree in order to register with the ACME server. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: y

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, to
share your email address with the Electronic Frontier Foundation, a founding
partner of the Let's Encrypt project and the non-profit organization that
develops Certbot? We'd like to send you email about our work encrypting the web,
EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: n
Account registered.
Requesting a certificate for odoo20.yourdomain.com

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/odoo20.yourdomain.com/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/odoo20.yourdomain.com/privkey.pem
This certificate expires on 2027-02-21.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.

Deploying certificate
Successfully deployed certificate for odoo20.yourdomain.com to /etc/nginx/conf.d/odoo20.conf
Congratulations! You have successfully enabled HTTPS on https://odoo20.yourdomain.com

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
 * Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
 * Donating to EFF:                    https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

You Managed to Install Odoo 20 on Debian 13

Finally, you should be able to access your Odoo 20 installation at https://odoo20.yourdomain.com. You can now start customizing your new Odoo 20 system.

Of course, you don’t have to install Odoo 20 on Debian 13 if you use one of our managed Odoo hosting services; in that case, you can simply ask our expert Linux admins to install Odoo 20 on Debian 13 for you. They are available 24×7 and will take care of your request immediately. Managing Odoo instances is not just about the installation; we can help you optimize your Odoo installation if you have an active service with us.

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

Leave a Comment