
Odoo, formerly OpenERP, is a suite of open-source business applications. It is widely regarded as a leading open-source enterprise resource planning (ERP) software. Odoo offers a diverse range of modules that can be incorporated into a single application, significantly contributing to its widespread adoption. The latest version of Odoo, Odoo 18, brings additional features that improve its usability. The updated interface includes keyboard shortcuts, facilitating the selection of records and enabling multiple selections with ease. This article will guide you on how to install Odoo 18 on Debian 12.
Table of Contents
Prerequisites
- A Debian 12 VPS with at least 2GB of RAM.
- SSH root access, or user with sudo privileges.
Conventions
Step 1. Login to VPS and Update the System
First of all, we need to log in to our Debian 12 VPS through SSH using your favorite terminal:
ssh root@IP_Address -p Port_number
Replace “root” with a user with sudo privileges. Replace “IP_Address” and “Port_Number” with your server’s IP address and SSH port number. Next, let’s make sure that we’re on Debian 12. You can do that like this:
The command should return an output similar to this:
Before starting, you have to make sure that all Debian packages installed on the server are up to date. You can do this by running the following commands:
Step 2. Install Dependencies
At the time of this writing, Debian 12 ships with Python 3.11. Since Odoo 18 requires at least Python 3.11, we do not need to install a new Python. Let’s install its dependencies first before proceeding to the next step.
Step 3. Add System User
There are some methods to install Odoo. The simplest and easiest way is to install it from the repository. But we are going to install Odoo 18 using a Python virtual environment. Since it will be running under a regular system user, we will create a new system user. Let’s execute this command below to add a new system user.
Alright! A new system user named ‘odoo18’ has been added. Its home directory is /opt/odoo18, which is the directory we are going to use for the installation.
Step 4. Install PostgreSQL
Please be informed that Odoo only supports PostgreSQL. In this step, we will install a PostgreSQL server from the default Debian 12 repository.
After installing PostgreSQL, the service will automatically run, and now it is time to create a PostgreSQL user with the same name as the new system user. Run the following command to create a PostgreSQL user:
Our Odoo 18 will run the service using the new PostgreSQL user. Let’s proceed to the next step.
Step 5. Install wkhtmltopdf
Wkhtmltopdf, a command line tool, is an open-source solution for converting HTML data into PDF format using a Qt Webkit. Debian 12 also provides this package in their repository, but we will use the patched with QT version. However, since the .DEB package for Debian 12 is still not available on their official download page.
If you see an error message, you can execute this command:
Step 6. Install Odoo
In this step, we must switch to the system user we created earlier. Let’s switch to the system user ‘odoo18’ to download Odoo files from GitHub and create a new Python environment.
Next, let’s download Odoo from GitHub.
Create a Python virtual environment.
This Odoo installation method enables you to install multiple Odoo versions on your server by using a Python virtual environment. Let’s create a new Python virtual environment for our Odoo 18.
At this point, we have a new Python virtual environment under the directory /opt/odoo18/odoo18-venv. We need to activate it before installing Odoo.
Once executed, your shell prompt would look like this:
Next, let’s install Odoo 18.
Wait until the installation finishes; it will be under the directory /opt/odoo18/odoo18. We can create a new directory to store our custom Odoo add-ons now.
Done! Let’s exit from user ‘odoo18’ and create an Odoo configuration file.
The command above should bring you back to the previous user, in this case, root.
Paste the following content into the file.
Replace m0d1fyth15 with a stronger password. This will be your Odoo’s master password. Save the file, then exit from nano editor.
Step 7. Create Odoo Systemd Unit file
To manage the newly installed Odoo 18, we need to create a systemd service file. Let’s run the command below to complete this step.
The command above will bring you to a text editor. Insert the following content into the systemd unit file.
Save the file, then exit. And do not forget to reload the systemd service and then run Odoo.
Check if Odoo is starting by running this command:
Now, you can navigate to http://YOUR_SERVER_IP_ADDRESS:8069, and you will see the default Odoo page
When working with an Odoo database, you will be prompted for the master password. The master password is the one in your Odoo configuration file; it is the value of admin_passwd. Make sure to use a strong password for your Odoo master password.
Step 8. Install and Configure Reverse Proxy
To access your Odoo website at http://yourdomain.com instead of http://YOUR_SERVER_IP_ADDRESS:8069, we must install a web server and configure it as a reverse proxy. A reverse proxy offers many benefits, such as load balancing, caching, compression, and serving static content. Let’s install the web server.
On the Debian 12 server, Nginx should be up and running upon installation. Let’s create a new Nginx server block now.
Insert the following into that file.
Replace yourdomain.com with your domain name or subdomain name pointing to your server IP address. Then, save the file and exit from the editor.
To apply the changes, we can restart the Nginx.
That’s it. You should now be able to access Odoo 18 at http://yourdomain.com.
If you prefer Apache to Nginx, you can check and follow our post on how to install Odoo 17 on Ubuntu 24.04.
Congratulations! You have followed this article and successfully installed Odoo 18 on your Debian 12 server.
Of course, you don’t have to install Odoo 18 on Debian 12 if you have an active Debian VPS Hosting service with us. In that case, you can ask our expert Linux admins to install Odoo 18 on Debian 12 for you. Our admins will install and set up Odoo 18 immediately without any additional fee, along with many helpful configurations and optimizations we can do for you. In fact, we’ll gladly install Odoo and any other services you may require and make sure they all play nice with one another.
If you liked this post about installing Odoo 18 on Debian 12, please share it with your friends or leave a comment below.
Why update odoo 18 later ?
Can you be more specific about this, what update are you referring to?