How To Install Odoo13 on Ubuntu 18.04 x64 LTS

Odoo 13 Installation


In this tutorial, we’ll install and configure Odoo version 13 on Ubuntu 18.04 LTS x64. We can use the same installation instructions for both server and desktop edition.We will cover how to install the software in two different ways, each of which have their own benefits depending on your specific needs.



Before starting this tutorial, you will need:

An Ubuntu 18.04 Desktop or Server with a root, sudo-enabled user.

A good internet connection to download the packages via various internet repositories.

Option 1 : 

Step by step guide to install guide. Execute each step as “root” user.

Step 1 — Add Odoo user to the system

sudo adduser --system --quiet --shell=/bin/bash --home=/opt/odoo --gecos 'odoo' --group odoo

Step 2 — Make Configuration Directory and Log Directory

sudo mkdir /etc/odoo && mkdir /var/log/odoo/

Step 3 — Installing Necessary OS Related Packages

sudo apt-get update && apt-get upgrade -y && apt-get install postgresql-10 postgresql-server-dev-10 build-essential python3-pillow python3-lxml python-ldap3 python3-dev python3-pip python3-setuptools npm nodejs git gdebi libldap2-dev libsasl2-dev  libxml2-dev libxslt1-dev libjpeg-dev -y

Step 4 — Cloning Odoo 13 From Source Repository

git clone --depth=1 --branch=13.0 /opt/odoo/odoo

Step 5 — Change Ownership of Odoo Directory

sudo chown odoo:odoo /opt/odoo/ -R && sudo chown odoo:odoo /var/log/odoo/ -R 

Step 6 — Installing Python Packages Required by Odoo

cd /opt/odoo/odoo && sudo pip3 install -r requirements.txt

Step 7 — Installing Node Packages Required by Odoo

sudo npm install -g less less-plugin-clean-css -y && sudo ln -s /usr/bin/nodejs /usr/bin/node

Step 8 — Installing wkhtmltopdf

cd /tmp && wget && sudo gdebi -n wkhtmltox_0.12.5-1.bionic_amd64.deb && rm wkhtmltox_0.12.5-1.bionic_amd64.deb

Step 9 — Linking wkhtmltopdf as Command

sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin/ && sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin/

Step 10 — Creating PostgreSQL user for Odoo

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

Step 11 — Starting Odoo and Creating Config File

sudo su - odoo -c "/opt/odoo/odoo/odoo-bin --addons-path=/opt/odoo/odoo/addons -s --stop-after-init"

Step 12 — Moving Config File To Config Directory

sudo mv /opt/odoo/.odoorc /etc/odoo/odoo.conf

Step 13 — Modifying Configuration Parameters

sudo sed -i "s,^\(logfile = \).*,\1"/var/log/odoo/odoo-server.log"," /etc/odoo/odoo.conf

sudo sed -i "s,^\(logrotate = \).*,\1"True"," /etc/odoo/odoo.conf

sudo sed -i "s,^\(proxy_mode = \).*,\1"True"," /etc/odoo/odoo.conf

Step 14 — Setting up Odoo Executable

sudo cp /opt/odoo/odoo/debian/init /etc/init.d/odoo && chmod +x /etc/init.d/odoo

sudo ln -s /opt/odoo/odoo/odoo-bin /usr/bin/odoo

Step 15 — Setting Up Odoo To Start at OS StartUp

sudo update-rc.d -f odoo start 20 2 3 4 5 .

Step 15 — Starting Odoo

sudo service odoo start

Option 2 :

sudo wget && bash odoo13