Enable Dark Mode!
By: Sreejith

How to Configure Odoo with Nginx as Reverse Proxy?


Odoo is one the of most popular business software in the world and is packed with multiple useful modules like Customer Relationship Management (CRM), Point of Sale, Project Management, Inventory Management, Automated Invoicing, Accounting, E-commerce, and much more. 

This blog provides instructions on how to use Nginx as a reverse proxy to Odoo.

- In order to access your Odoo application only by using your domain name, without the port number in the URL, we need to set up Nginx as a reverse proxy.

- Before installing the Nginx web server, make sure that there is no other web server like Apache installed on the VPS. If Apache web server is running, stop it:

systemctl stop apache2
and remove it:
apt-get purge apache2*
apt autoremove

NGINX web server
- Nginx is free and open source web server/software, which can also be used as a reverse proxy, load balancer and HTTP cache.  A large fraction of web servers use NGINX.

- Install NGINX  on Ubuntu
On Ubuntu (and other Debian based Linux distributions), run:
sudo apt-get update
sudo apt-get install nginx

- Start NGINX
Start the nginx service with the following command:
sudo service nginx start

Change the binding interface

- This step is optional, but it is a good security practice. By default, Odoo server listens to port 8069 on all interfaces, so if you want to disable the direct access to your Odoo instance,  open the Odoo configuration and add the following two lines at the end of the file:


xmlrpc_interface =
netrpc_interface =

- Save the configuration file and restart the Odoo server for the changes to take effect:

systemctl restart odoo

Configure NGINX

- Edit the current nginx server block about the old domain or create a new server block if it is not created yet.

- Add the following lines:

Cd /etc/nginx/sites-enabled

server {
    server_name testing.com; //replace ip and server name with your domain and ip
    listen 80;
    access_log /var/log/nginx/testing-access.log;
    error_log /var/log/nginx/testing-error.log;
    location /longpolling {
        proxy_connect_timeout   3600;
        proxy_read_timeout      3600;
        proxy_send_timeout      3600;
        send_timeout            3600;
    location / {
        proxy_connect_timeout   3600;
        proxy_read_timeout      3600;
        proxy_send_timeout      3600;
        send_timeout            3600;
        proxy_set_header Host $http_host;
        proxy_set_header X-Forwarded-Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    gzip on;
    gzip_min_length 1000;
upstream odoo {
server weight=1 fail_timeout=0;
upstream odoo-im {
server weight=1 fail_timeout=0;

Restart NGINX

- Do not forget to restart the nginx service for the changes to take effect:

service nginx restart

If you need any assistance in odoo, we are online, please chat with us.

cybrosys youtube


James Smith

Odoo Implementation is the most vital part of any business change process. We deliver highly competitive odoo implementation services with a systematic approach.




Dwarkanath Bari

Hello i made a changes link domain with odoo and now trying to configure my domain with https but showing error like :nginx: [emerg] no "ssl_certificate_key" is defined for certificate "/etc/ssl/certs/surveyspan_com.crt" nginx: configuration file /etc/nginx/nginx.conf test failed please help me




Adam Phillips

How do I configure multiple websites on odoo with nginx. I've done this but nginx is giving an error with the second conf file





Hello, I follow ur steps but after entering domain name showing nginx home page.




Leave a comment


Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kakkancherry, Calicut
Kerala, India - 673635


Cybrosys Limited
Alpha House,
100 Borough High Street, London,
SE1 1LB, United Kingdom


Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, India - 682030.


Cybrosys Techno Solutions
The Estate, 8th Floor,
Dickenson Road,
Bangalore, India - 560042

Send Us A Message