How to Install Odoo on Debian Latest

In this tutorial, we will guide you through the process of installing Odoo, a popular open-source ERP software, on Debian Latest.

Pre-requisites

Before we begin, please ensure that you meet the following requirements:

Step 1: Update your system

Firstly, update your system to ensure you have the latest packages and dependencies installed:

sudo apt update && sudo apt upgrade

Step 2: Install necessary packages

Next, install the necessary packages with the following command:

sudo apt install git python3-pip build-essential wget python3-dev python3-setuptools libxml2-dev libxslt1-dev libevent-dev libpq-dev libjpeg-dev libldap2-dev libsasl2-dev node-less

Step 3: Create and configure PostgreSQL user

Create a new PostgreSQL user and database for Odoo to use:

sudo su - postgres
createuser --createdb --username postgres --no-createrole --no-superuser odoo
createdb --username postgres --owner odoo odoo
exit

Step 4: Install Odoo

Clone the latest Odoo repository from GitHub using the following command:

sudo git clone https://www.github.com/odoo/odoo --depth 1 --branch 14.0 /opt/odoo

Change directory to the cloned repository:

cd /opt/odoo

Install the Python requirements for Odoo using Pip:

sudo pip3 install -r requirements.txt

Step 5: Configure Odoo

Create a new configuration file for Odoo using the following command:

sudo nano /etc/odoo.conf

Add the following content to the file:

[options]
; This is the password that allows database operations:
admin_passwd = YOUR_ADMIN_PASSWORD
db_host = localhost
db_port = 5432
db_user = odoo
db_password = YOUR_POSTGRESQL_PASSWORD
addons_path = /opt/odoo/addons

Remember to replace YOUR_ADMIN_PASSWORD and YOUR_POSTGRESQL_PASSWORD with your own values.

Save and exit the file.

Step 6: Create Systemd Unit File

Create a new systemd unit file for Odoo:

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

Add the following content to the file:

[Unit]
Description=Odoo Open Source ERP and CRM
Requires=postgresql.service
After=network.target postgresql.service

[Service]
Type=simple
User=root
Group=root
ExecStart=/usr/bin/python3 /opt/odoo/odoo-bin -c /etc/odoo.conf
StandardOutput=journal+console

[Install]
WantedBy=multi-user.target

Save and close the file.

Start the Odoo service with the following command:

sudo systemctl start odoo

Enable the service to automatically start on boot with the following command:

sudo systemctl enable odoo

Check the status of the service with the following command:

sudo systemctl status odoo

If everything is working correctly, the output should show that the service is active and running.

Step 7: Configure Firewall

Finally, to enable traffic to your Odoo installation, you need to configure your firewall to allow incoming traffic on the Odoo port. For example, to allow traffic on port 8069, run the following command:

sudo ufw allow 8069/tcp

Conclusion

You have successfully installed Odoo on your Debian Latest server. You can now access your Odoo installation by visiting your domain name or IP address on port 8069.

We hope this tutorial has been helpful!

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!