In this tutorial, we will show you how to install Odoo on Ubuntu 20.04 LTS. For those of you who didn’t know, Odoo is one of the most popular and most powerful Open Source ERP business software based on the Python programming language. It is a web-based fully-featured application and comes with Open Source CRM, Point of Sales, Human Resource Management, Point of Sales, Billing and Accounting, Event Management, Email Marketing, Order Tracking, etc. This application is helpful to maintain ERP in any business.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo
‘ to the commands to get root privileges. I will show you the step-by-step installation of Odoo open-source ERP on a Ubuntu 20.04 (Focal Fossa) LTS. You can follow the same instructions for Ubuntu 18.04, 16.04, and any other Debian-based distribution like Linux Mint.
Prerequisites
- A server running one of the following operating systems: Ubuntu 20.04, 18.04, 16.04, and any other Debian-based distribution like Linux Mint.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- A
non-root sudo user
or access to theroot user
. We recommend acting as anon-root sudo user
, however, as you can harm your system if you’re not careful when acting as the root.
Install Odoo on Ubuntu 20.04 LTS Focal Fossa
Step 1. First, make sure that all your system packages are up-to-date by running the following apt
commands in the terminal.
sudo apt update sudo apt upgrade 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
Step 2. Installing PostgreSQL.
Install the PostgreSQL package using the apt
command:
sudo apt install postgresql postgresql-client
By default, the PostgreSQL service is started automatically after the installation. You can confirm if it is running with the command:
systemctl status postgresql.service
PostgreSQL access graphical interface, you need to install pgAdmin:
sudo apt install pgadmin3
Next, create a PostgreSQL database user for Odoo:
sudo su postgres createuser --createdb --username postgres --no-createrole --pwprompt USERNAME
Then, you might need to execute the following command to assign superuser rights to a new user:
postgres@ubuntu$ psql postgres=# \du; List of roles Role name | Attributes | ------------+------------------------------------------------------------+----- twink | Create DB | {} postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {} postgres=# ALTER USER twink WITH SUPERUSER; ALTER ROLE postgres=# \du; List of roles Role name | Attributes | ------------+------------------------------------------------------------+----- twink | Superuser, Create DB | {} postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {} postgres=# exit
Finally, the user is created as well as assigned superuser rights. Also, one more command you have to execute and exit it:
createdb stable --encoding=UNICODE exit
Step 3. Installing Odoo 14 on Ubuntu 20.04.
First, Download Odoo 14 source code from Github:
sudo git clone --depth 1 --branch 14.0 https://www.github.com/odoo/odoo /odoo/odoo-server
Once downloaded, You have to go to that directory. Here you see the requirement.txt file. Python dependencies are listed in the requirements.txt file. You have to execute the below command to install depended on Python modules using pip3:
cd /14.0 sudo pip3 install -r requirements.txt
Step 4. Install wkhtmltopdf.
Now we download and install the Wkhtmltopdf package:
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb sudo apt install ./wkhtmltox_0.12.5-1.bionic_amd64.deb
Step 5. Start Odoo 13 Server.
You have to give the following access right to execute:
sudo chmod 775 odoo-bin
Finally, you have to execute the odoo-bin
command to start Odoo 13 in your local machine:
./odoo-bin
Step 6. Accessing Odoo.
Odoo will be available on HTTP port 8069 by default. Open your favorite browser and navigate to http://your-domain.com:8069
or http://server-ip-address:8069
.
Congratulations! You have successfully installed Odoo. Thanks for using this tutorial for installing Odoo 14 Open Source ERP on Ubuntu 20.04 Focal Fossa system. For additional help or useful information, we recommend you check the official Odoo website.