

In this tutorial, we will guide you through the steps of installing Odoo 12 on Ubuntu 18.04. We will also install Nginx and configure it as a reverse proxy. Odoo (formerly OpenERP) is a simple and intuitive suite of open-source enterprise management applications such as Website Builder, eCommerce, CRM, Accounting, Manufacturing, Project and Warehouse Management, Human Resources, Marketing, and many more. Odoo comes in two editions, the Community edition which is free, and the Enterprise edition. In our case, we will install and use the Community edition.
Table of Contents
Prerequisites
- Ubuntu 18.04 with 2GB of memory or higher
- Python 3
- PostgreSQL
- Nginx
- SSH access with root privileges
1. Log in via SSH and update the system
Log in to your Ubuntu 18.04 VPS with SSH as a root user
You can check whether you have the proper Ubuntu version installed on your server with the following command:
You should get this output:
Once you are logged in, run the following command to update all installed packages to the latest available version.
2. Install PostgreSQL server
Odoo requires a PostgreSQL database to store its information, so we will have to install the PostgreSQL server. We will install a PostgreSQL server using the following command:
Once installed, PostgreSQL server will be started and it’s also enabled to start at server boot.
3. Install Odoo
a. Method 1
If you want to install Odoo on your fresh server or you currently do not have an Odoo instance running on your server, you can follow this method.
Add repository and install Odoo
Odoo is not available in the official Ubuntu 18.04 repository, so in order to install it, we will need to add the Odoo repository to the server. In order to do it, run the following commands
Next, update the local package database
and install Odoo using the apt package manager
This command will install Odoo 12, Python 3 and all necessary Python modules, create PostgreSQL user and start the Odoo instance. After the installation is completed, you can check the status of the Odoo service:
b. Method 2
If you want to run multiple Odoo version on your Ubuntu 18.04 server and/or you have another version of Odoo running on your server, you can follow these steps to install and configure Odoo 12 using their Github repository and Pyhton virtual environment.
Install dependencies
Create a new system user for Odoo
Install Wkhtmltopdf
The wkhtmltopdf package is an open source tool that Odoo uses to make HTML in PDF formats so that it can print PDF reports. The recommended version for Odoo is 0.12.1 which is not available in the official Ubuntu 18.04 repositories.
That’s it, wkhtmltopdf has been installed.
Install odoo 12
Now, still as user odoo12, let’s create a new python virtual environment
Then, let’s activate it
We need an Odoo configuration file, we can copy the one from GitHub:
We can create a master password, you can change the “m0d1fyth15” to your own password. Also, add addons_path and xmlrpc_port if you want to specify a port to run Odoo on, if you do not specify it, then Odoo will run on its default port, 8069.
Save the file then exit, then we create a systemd file to run Odoo 12.
At this point, we can access our new Odoo 12 installation at http://IP_Address:Odoo_port. To access it using a domain we need to configure a reverse proxy, and this time we will use nginx to do it.
Install Nginx web server and configure reverse proxy
In order to be able to access Odoo with a domain name, instead of typing the IP address and the port number, we need a web server. In this tutorial we will install and use Nginx. Run the following command to install it
and enable it to start on server boot
Create Nginx server block for the domain name you will use for accessing Odoo. For example, we will use yourdomain.com
Save the file and activate the Nginx block by creating a symbolic link
restart the web server for the changes to take effect
Now you should be able to access Odoo with your domain name at http://yourdomain.com, create your first Odoo database using the master password we set earlier in this tutorial, and start working on your project. For more information about Odoo 12, its features and configuration, please check their official documentation.
Of course, you don’t have to install Odoo 12 on Ubuntu 18.04 if you use one of our Odoo VPS Hosting services, in which case you can simply ask our expert Linux admins to install Odoo 12 on Ubuntu 18.04, for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post, on installing Odoo 12 on Ubuntu 18.04 with Apache as a reverse proxy, please share it with your friends on the social networks using the buttons below or simply leave a comment in the comments section. Thanks.
thanks alot, very useful info