Odoo is one of the most widely used open-source ERP platforms in the world. It handles accounting, CRM, inventory, HR, project management, e-commerce, and more from a single web-based application.
Odoo can be installed in three ways: from the official Odoo repository, via Docker, or from Git source code inside a Python virtual environment. The official repository method is the fastest path, but it limits you to a single Odoo instance per machine. Installing from source in a virtualenv gives you version control, multi-instance support on the same server, and cleaner upgrade paths.
This guide covers how to install Odoo 11 on Ubuntu 16.04 using Git source and a Python virtualenv.
<strong>Prerequisite:</strong> You need sudo access. Run <code>sudo apt update && sudo apt upgrade</code> before starting.
Install build dependencies. These libraries are required to compile Odoo’s Python dependencies during the virtualenv install step:
bashsudo apt install git python3-pip build-essential python3-dev \ libxslt-dev libzip-dev libldap2-dev libsasl2-dev node-less
Create a dedicated system user. Running Odoo under its own non-login account limits what the process can access if it is ever compromised:
bashuseradd -m -d /opt/odoo -U -r -s /bin/bash odoo
Install PostgreSQL and create the database user. Odoo uses peer authentication with PostgreSQL by default, which means the PostgreSQL user must match the Linux system user name exactly:
bashsudo apt install postgresqlsudo su - postgres -c "createuser -s odoo"
Install wkhtmltopdf. Odoo needs this tool to generate PDF reports. Version 0.12.1 is specifically required for Odoo 11. The Ubuntu 16.04 repositories ship a different version that is incompatible, so download the correct package directly:
bashwget https://builds.wkhtmltopdf.org/0.12.1.3/wkhtmltox_0.12.1.3-1~xenial_amd64.debsudo apt install ./wkhtmltox_0.12.1.3-1~xenial_amd64.deb
Switch to the odoo user and clone the Odoo 11 source. The --depth 1 flag creates a shallow clone that downloads only the latest commit rather than the full repository history, saving significant time and disk space:
bashsudo su - odoogit clone https://www.github.com/odoo/odoo --depth 1 --branch 11.0 /opt/odoo/odoo11
Install virtualenv and create an isolated Python environment for this Odoo instance. Isolation prevents Python package conflicts with other applications on the server:
bashpip3 install virtualenvcd /opt/odoovirtualenv odoo11-venvsource odoo11-venv/bin/activatepip3 install -r odoo11/requirements.txtdeactivate && exit
Create a separate directory for custom addon modules. Keeping custom addons outside the Odoo core directory means you can update or re-clone the core without overwriting your modules:
bashsudo mkdir /opt/odoo/odoo11-custom-addonssudo chown odoo: /opt/odoo/odoo11-custom-addons
Copy the default config file and edit it:
bashsudo cp /opt/odoo/odoo11/debian/odoo.conf /etc/odoo11.confsudo nano /etc/odoo11.conf
Set admin_passwd to a strong password — this controls access to the database management interface. Set db_user = odoo to match the PostgreSQL user. Update addons_path to include odoo11-custom-addons if you plan to install custom modules.
Create the systemd service unit at /etc/systemd/system/odoo11.service. The key directives are User=odoo, ExecStart pointing to the virtualenv Python binary running odoo-bin with the config file, and Requires=postgresql.service to guarantee PostgreSQL starts before Odoo:
bashsudo systemctl daemon-reloadsudo systemctl start odoo11sudo systemctl enable odoo11
Verify the service is running:
bashsudo systemctl status odoo11
For log output during troubleshooting:
bashsudo journalctl -u odoo11
Open http://your_domain_or_ip:8069 in a browser. The Odoo database creation screen confirms a successful installation.
Odoo 11 is now installed on Ubuntu 16.04 and running as a managed systemd service. Next, configure Nginx as a reverse proxy and add a Let’s Encrypt SSL certificate to secure the connection. Leave a comment below if you run into any issues.