Setting Up OpenERP (Odoo) 9 with Nginx on RHEL/CentOS and Debian/Ubuntu

Odoo, formerly known as OpenERP, is an Open Source Enterprise Resource Planning ERP web based business software written in Python which comes with a suite of web apps designed for every business, such as Website Builders, eCommerce modules, Billing and Accounting, Human Resources, Point of Sale, Customer Relationship Management, Inventory module, Live Chat and many other apps and features.

This tutorial will guide you on you how to install the latest stable version of Odoo (version 9) on a RHEL/CentOS/Fedora or Debian/Ubuntu based systems with Nginx server to act as a reverse proxy in frontend in order to access the web interface faster, securely and from standard web browsing ports, without the need to burden the users to use browser redirect ports.

Step 1: Install and Secure PostgreSQL Database

1. Before you start proceeding with Odoo installation first assure that your system ships with packages provided by Epel repositories in order to install the backend PostgreSQL database.

Also make sure the server is up-to-date with the latest security packages and patches by issuing the below commands:

As an additional step you can verify Odoo service listening port by running the ss or netstat command:

# ss -tulpn
OR
# netstat -tulpn

By default, Odoo listens for network connections on port 8069/TCP.

Step 3: Configure Odoo from Web Interface

5. In order to configure Odoo further fire-up a browser and access Odoo web interface at the following URI:

http://host-or-IP-address:8069/

6. Next you will be prompted to create a new database for Odoo and set a strong password for admin account.

Create Odoo Database

7. Once the database has been created you will be redirected to the administration web panel where you can further install applications and configure your ERP. For the moment leave the application as default and log out.

Odoo Administrative Web Panel

8. Once returned at the login screen, hit on Manage Databases link and Set a master password in order to secure Odoo database manager.

Odoo Manage Databases

Set Odoo Database Manager Password

Set New Odoo Manager Password

9. Once you have secured Odoo database manager you can login on your application and start to configure it further with your required apps and settings.

Install Configure Odoo Applications

Step 4: Access Odoo from Nginx Frontend

You can configure the system so that users can access Odoo web panel via Nginx reverse proxy. This can facilitate the users to navigate Odoo web interface faster, due to some Nginx frontend caching, on standard HTTP ports without the need to manually enter the http port 8069 on their browsers.

In order to configure this setting first you need to install and configure Nginx on your system by issuing the following steps.

13. This next step is a security optional feature and implies the change of the network socket that Odoo application is listening, changing the binding address from all interfaces (or address) to localhost only.

This change must be done only in conjunction with Nginx reverse proxy due to the fact that binding the application on localhost only implies that Odoo will not be accessible from users inside the LAN or other networks.

In order to active this change, open /etc/odoo/openerp-server.conf file and edit xmlrpc_interface line to bind on localhost only as suggested on the below screenshot.

xmlrpc_interface = 127.0.0.1

Configure Odoo Interface

In order to reflect changes restart Odoo service by running the below command:

# systemctl restart odoo.service
OR
# service odoo restart

14. In case your machine has a network defense line provided by the firewall, issue the following commands in order to open firewall ports to outside world for Nginx proxy:

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Hello and thank you for the great tutorial. In odoo you can create a website and an e-commerce webpage and those usually are public pages and there’s a login button above that let’s you login to the erp system.

My question is, how can we make the public pages non HTTPS and when the user want to login, he gets redirected to HTTPS and stays in HTTPS while using the ERP system? I’m aware that he can setup another instance of odoo and sync the data but this way some integration features will be lost. Is there a way to do that on a single odoo instance?