Odoo is a popular open-source suite of business applications. A single platform covers CRM, e-commerce, accounting, inventory, warehouse, and project management — all integrated out of the box.
This guide shows you how to install Odoo 13 on Ubuntu 18.04 inside a Python virtual environment, with Nginx configured as an SSL reverse proxy. This setup gives you better control, clean dependency isolation, and a production-ready deployment.
<strong>Prerequisite:</strong> You need sudo access and a domain name pointing to your server.
Update the package list and install the required build tools and development libraries:
bashsudo apt updatesudo 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
Create a dedicated system user named odoo13 with a home directory at /opt/odoo13. Odoo will run as this user:
bashsudo useradd -m -d /opt/odoo13 -U -r -s /bin/bash odoo13
Odoo uses PostgreSQL as its database backend. Install it and create a database user that matches the system username:
bashsudo apt install postgresqlsudo su - postgres -c "createuser -s odoo13"
Install wkhtmltopdf version 0.12.5 for PDF report generation. The version in the Ubuntu 18.04 repositories is incompatible, so download it directly from the project’s release page:
bashwget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.debsudo apt install ./wkhtmltox_0.12.5-1.bionic_amd64.deb
Switch to the odoo13 user and clone the Odoo 13 source code from GitHub:
bashsudo su - odoo13git clone https://www.github.com/odoo/odoo --depth 1 --branch 13.0 /opt/odoo13/odoo
Create a Python virtual environment and install all required packages:
bashpython3 -m venv odoo-venvsource odoo-venv/bin/activatepip3 install wheelpip3 install -r odoo/requirements.txtdeactivate
Create a directory for third-party addons, then return to your sudo user:
bashmkdir /opt/odoo13/odoo-custom-addonsexit
Create the Odoo configuration file at /etc/odoo13.conf. Set a strong admin_passwd, set db_user to odoo13, and point addons_path to both the main Odoo addons directory and your custom addons folder.
Create a systemd unit file at /etc/systemd/system/odoo13.service. Set User and Group to odoo13, declare postgresql.service as a dependency, and set ExecStart to the virtual environment’s Python binary with -c /etc/odoo13.conf.
Load and start the service:
bashsudo systemctl daemon-reloadsudo systemctl enable --now odoo13sudo systemctl status odoo13
Odoo is now accessible at http://your_server_ip:8069.
For production, place Odoo behind Nginx with an SSL certificate. The Nginx configuration needs two upstream blocks — odoo on port 8069 and odoochat on port 8072 for long-polling. Proxy all HTTPS traffic to Odoo, enable gzip compression, and configure static file caching to improve page load performance.
Add proxy_mode = True to /etc/odoo13.conf and restart both Nginx and Odoo after saving changes.
To restrict direct access to the Odoo process, add xmlrpc_interface = 127.0.0.1 and netrpc_interface = 127.0.0.1 to the configuration file. This forces Odoo to listen only on the local interface so all external traffic must go through Nginx.
Odoo runs in multithreading mode by default. Switching to multiprocessing gives better stability and more efficient use of server resources.
Calculate your worker count based on CPU cores: (CPUs x 2) + 1 is the theoretical maximum. Each worker handles roughly 6 concurrent users. Add the workers value and appropriate memory limits to /etc/odoo13.conf, then restart Odoo. Use grep -c ^processor /proc/cpuinfo to check how many CPU cores your server has.
Odoo 13 is now installed and running on Ubuntu 18.04 inside a Python virtual environment, served securely through Nginx. The setup is production-ready with SSL, long-polling support, and multiprocessing. Leave a comment below if you run into any issues during setup.
Python 3.7 was a significant release for the language. It introduced data classes, a decorator that automatically…
Let's Encrypt is a free, automated certificate authority run by the Internet Security Research Group…
GCC (GNU Compiler Collection) is a set of compilers and development libraries for C, C++, Fortran,…
Python is one of the most widely used programming languages in the world. Its clean, readable…
Apache Tomcat is an open-source Java application server that implements the Java Servlet, JavaServer Pages, and…
Setting the correct timezone on your Ubuntu machine is more important than it sounds. Your…