How to Install Odoo 16 ERP on Ubuntu 22.04

In this article, we setup Odoo ERP on Ubuntu 22.04 LTS Server with step by step.

Step : 1 Update the system

sudo apt update
sudo apt upgrade

Step : 2 Install Dependencies

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 : 3 Install PostgreSQL database

sudo apt install postgresql

Step : 4 Configure the PostgreSQL database server

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

Step : 5 Install Wkhtmltopdf

sudo apt install wkhtmltopdf

Step : 6 Create a System User

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

Step : 7 Install Git

sudo apt-get install git

Step : 8 Switch to System User

sudo su - odoo

Step : 9 Clone Odoo 16 (Community Edition)

git clone --depth 1 --branch 16.0 odoo16

Step : 10 Create a new Python virtual environment

python3 -m venv odoo16-venv

Step : 11 Activate Python virtual environment by running

source odoo16-venv/bin/activate

Step : 12 install Odoo & requirements.txt

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

Step : 13 Now exit from the odo16-venv

(odoo16-venv) odoo16@ubuntu:~$ deactivate

Step : 14 make a new directory

mkdir /opt/odoo16/odoo16/custom

Step : 15 exit from the user "odoo16"


Step : 16 create the Odoo16 Configuration file

sudo nano /etc/odoo16.conf
Now paste this configuration into it.
admin_passwd = admin
db_host = False
db_port = False
db_user = odoo16
db_password = False
addons_path = /opt/odoo16/odoo16/addons,/opt/odoo16/odoo16/custom
xmlrpc_port = 8080

Step : 17 Create a service to run Odoo

sudo nano /etc/systemd/system/odoo16.service
Now paste this systemd unit file odoo16.service
Requires=postgresql.service postgresql.service
ExecStart=/opt/odoo16/odoo16-venv/bin/python3 /opt/odoo16/odoo16/odoo-bin -c /etc/odoo16.conf

Step : 18 reload systemd and start running Odoo16

sudo systemctl daemon-reload
sudo systemctl start odoo16

Step : 19 Check the odoo running status

sudo systemctl status odoo16

Step : 20 Check your Installation is Active


This will take you to the Odoo database page. Just Create a database with an admin password which you include in odoo.conf file admin_password=Master Password.

If everything goes fine, you will be redirected to the login page.

Leave a Comment

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