Install Odoo 17 on Debian 12 Bookworm

This tutorial intends to teach you to Install and Configure Odoo 17 on Debian 12 Bookworm. Odoo is an open-source business management software. It supports tools and other business applications into a single software such as CRM, Sales, Accounting, etc. With Odoo you can easily do many of your daily business tasks much faster.

The latest release of Odoo at the current time is Odoo 17. You can follow the rest of the article to start your Odoo 17 installation on Debian 12.

Comprehensive Guide To Install Odoo 17 on Debian 12 Bookworm

You can install Odoo in different ways including APT repo, Docker, or Python virtual environment. In this guide, we will start our Odoo 17 installation in a virtual environment.

Before you start your Odoo installation, you must have access to your server as a non-root user with sudo privileges and set up a basic firewall. For this purpose, you can check our Debian 12 Initial Server Setup Guide.

Step 1 – Install Required Packages and Dependencies For Odoo 17

First, you must run the system update by using the command below:

sudo apt update

Then, you must install the required packages and dependencies for Odoo 17 on Debian 12. To do this, you can run the following command:

sudo apt install -y 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 2 – PostgreSQL Setup For Odoo 17 on Debian 12

Odoo uses PostgreSQL to store its data. So you must install PostgreSQL on your server. To do this, you can run the command below:

sudo apt install postgresql -y

Then, you must create a PostgreSQL user for Odoo 17. To do this, you can run the command below:

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

Step 3 – Get the wkhtmltopdf Tool on Debian 12

At this point, you must install the wkhtmltopdf Tool on your server. It is an open-source command-line tool that supports rendering HTML pages into PDF and other similar formats.

To install this tool, you can run the following command:

sudo apt install wkhtmltopdf -y

Check the version:

wkhtmltopdf --version
Output
wkhtmltopdf 0.12.6

Step 4 – Download Odoo 17 Source Code From GitHub on Debian 12

Before you start to download the source code, you must create a new system user and group with a home directory under /opt/odoo17 which will be needed to run an Odoo service on Debian 12. To do this, you can run the following command:

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

Then, switch to your Odoo user with the command below:

sudo su - odoo17

At this point, you can download the Odoo source code from GitHub by using the following command:

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

Example Output:

Clone Odoo 17 from GitHub

Step 4 – Set up Odoo 17 with Python Virtual Environment

At this point, you must create a new Python Virtual Environment for Odoo 17. To do this, you can use the following command:

python3 -m venv odoo-venv

Then, activate your Odoo virtual environment with the command below:

source odoo-venv/bin/activate

Now from your Virtual environment, you must install Python modules by using the commands below:

(odoo-venv) $ pip3 install wheel
(odoo-venv) $ pip3 install -r odoo17/requirements.txt

When it is finished, deactivate your virtual environment:

(odoo-venv) $ deactivate

Next, you must create a custom directory that includes third-party add-ons that you are going to include in the configuration. To do this, run the command below:

mkdir /opt/odoo17/odoo17/custom-addons

Now you can exit from your Odoo user:

exit

Step 5 – Create an Odoo 17 Config File on Debian 12

At this point, you must create a configuration file for Odoo 17. To do this, you can use your favorite text editor like Vi editor or Nano editor:

sudo vi /etc/odoo17.conf

Add the following config content to the file with your correct values:

[options]
admin_passwd = StrongPassword
db_host = False
db_port = False
db_user = odoo17
db_password = False
addons_path = /opt/odoo17/odoo17/addons,/opt/odoo17/odoo17/custom-addons
xmlrpc_port = 8069

When you are done, save and close the file.

Step 6 – Start and Enable Odoo 17 Service on Debian 12

To be able to manage Odoo service with systemd, you must create a systemd until file for it. To do this, you can use the following command:

sudo vi /etc/systemd/system/odoo17.service

Add the following content to the file:

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

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

[Install]
WantedBy=multi-user.target

Remember to define the correct path, user, and group. When you are done, save and close the file.

Reload Systemd to apply the changes:

sudo systemctl daemon-reload

Now you can use the following command to start and enable the Odoo 17 service:

sudo systemctl enable --now odoo17

Verify your Odoo 17 is active and running on Debian 12 Bookworm:

sudo systemctl status odoo17

Example Output:

Check Odoo 17 service status

Step 7 – Access Odoo 17 Dashboard Via Web Interface

At this point, you can easily access your Odoo dashboard on Debian 12 by typing your server’s IP address in your web browser followed by 8069:

http://Server_IP_address:8069

You will see the following screen. In the “Master password” put the password that you have defined in the configuration file. Enter other credentials to create the database.

Create Odoo 17 database and Account

Then, you will see the following screen. Enter the Email address and password you have defined in the login screen.

Odoo 17 Login screen

Now you can see your Odoo 17 dashboard via the Web interface on Debian 12 Bookworm.

Odoo 17 dashboard Debian 12

As you can see, you can easily add your desired apps in different categories for your business such as sales, services, accounting, etc.

Conclusion

At this point, you have learned to Download the latest Odoo Source code from GitHub, Install Odoo 17 with Python Virtual Environment, Manage Odoo Service, and Access Dashboard via the Web interface on Debian 12 Bookworm. Hope you enjoy using it.

Also, you may like to read the following guides:

Install and Configure Odoo 16 on Ubuntu 22.04

Install and Secure Odoo14 on Ubuntu 20.04

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!