In this article, we will have explained the necessary steps to install and configure Odoo on Ubuntu 20.04 LTS. Before continuing with this tutorial, make sure you are logged in as a user with sudo
privileges. All the commands in this tutorial should be run as a non-root user.
Odoo is the most extensive open-source ERP that provides all business-related application. It includes a wide range of applications such as CRM, e-Commerce, website builder, billing, accounting, manufacturing, warehouse, project management, inventory, and much more, all seamlessly integrated.
Install Odoo on Ubuntu 20.04
Step 1. First, before you start installing any package on your Ubuntu server, we always recommend making sure that all system packages are updated.
sudo apt update sudo apt upgrade
Step 2. Install Odoo dependencies.
Run the following command to install all required dependency:
sudo apt install git python3-pip build-essential wget python3-dev python3-venv python3-wheel libxslt-dev libzip-dev libldap2-dev libsasl2-dev python3-setuptools node-less libjpeg-dev zlib1g-dev libpq-dev
Step 3. Creating a System User.
We’ll create a new system user and group with a home directory /opt/meilana
that will run the Odoo service:
sudo useradd -m -d /opt/odoo14 -U -r -s /bin/bash meilana
Step 4. Install PostgreSQL.
Run the following command to install PostgreSQL on the Ubuntu system:
sudo apt install postgresql
Then, create a PostgreSQL user with the same name as the previously created system user:
sudo su - postgres -c "createuser -s meilana"
Step 5. Install wkhtmltopdf.
Download and install the Wkhtmltopdf package. The recommended version is 0.12.5 and is available on the wkhtmltopdf download page, in the archive section:
sudo wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb sudo apt install ./wkhtmltox_0.12.6-1.bionic_amd64.deb
Step 6. Install Odoo on Ubuntu system:
First, change to user “meilana”:
sudo su - ramona
Then, clone the Odoo 14 source code from the GitHub repository:
git clone https://www.github.com/odoo/odoo --depth 1 --branch 14.0 /opt/odoo14/odoo
Once the download is complete, create a new Python virtual environment for Odoo:
cd /opt/odoo14 python3 -m venv odoo-venv source odoo-venv/bin/activate
After that, install all required Python modules with pip3:
pip3 install wheel pip3 install -r odoo/requirements.txt
Once successful, deactivate the environment by typing:
deactivate
Then, We’ll create a new directory that will hold the 3rd party addons:
mkdir /opt/odoo14/odoo-custom-addons exit
In the next steps we create a configuration file with the following content:
sudo nano /etc/odoo14.conf
[options] ; This is the password that allows database operations: admin_passwd = your_admin_passwd db_host = False db_port = False db_user = odoo14 db_password = False addons_path = /opt/odoo14/odoo/addons,/opt/odoo14/odoo-custom-addons
Step 7. Creating Systemd Unit File Odoo.
Open a nano text editor and create a service unit file called odoo14.service
with the following content:
sudo nano /etc/systemd/system/odoo14.service
[Unit] Description=Odoo14 Requires=postgresql.service After=network.target postgresql.service [Service] Type=simple SyslogIdentifier=odoo14 PermissionsStartOnly=true User=odoo14 Group=odoo14 ExecStart=/opt/odoo14/odoo-venv/bin/python3 /opt/odoo14/odoo/odoo-bin -c /etc/odoo14.conf StandardOutput=journal+console [Install] WantedBy=multi-user.target
Finally, start the Odoo service and enabled it to start on boot by running:
sudo systemctl daemon-reload sudo systemctl enable --now odoo14 sudo systemctl status odoo14
Step 8. Accessing Odoo 14.
To access Odoo 14, go to the following URL and create a new database:
http://your_domain_or_IP_address:8069
That’s all you need to do to install Odoo on Ubuntu 20.04 LTS Focal Fossa. I hope you find this quick tip helpful. For further reading on Odoo, please refer to their official knowledge base. If you have questions or suggestions, feel free to leave a comment below.