Skip to content
Guides

Self-hosting Odoo Community in 2026: a complete guide

Odoo Community is free to run on your own server. This guide installs Odoo 19 Community on Ubuntu 24.04 from source, step by step, then covers the parts that make it production-ready: HTTPS, backups, updates and monitoring.

Key takeaways

  • A small company can run Odoo Community on one Ubuntu 24.04 server with PostgreSQL, Nginx and HTTPS.
  • Install from source in a Python virtual environment, as its own system user, with Odoo listening only on localhost.
  • Installing is the easy part. Backups, updates, monitoring and upgrades are the ongoing work.
  • Test PDF reports early: they need the right version of wkhtmltopdf.

Before you self-host Odoo Community

Odoo Community is the open-source edition of Odoo, licensed under the LGPL. You pay no licence fee, but you take on the hosting work. You need:

  • A server. For a small team, 2 vCPUs and 4 GB of RAM is a common starting point. Our Odoo server sizing guide explains how to size for your number of users.
  • A domain name you can point at the server, for HTTPS.
  • Basic Linux skills: SSH, apt and editing configuration files.

Odoo's documentation for 19.0 lists Python 3.10 or later and PostgreSQL 13 or later for a source install (as of October 2026). Ubuntu 24.04 LTS ships newer versions of both, so the packages from Ubuntu's own archive are enough.

Step 1: Install system packages

Log in to a fresh Ubuntu 24.04 server and install PostgreSQL, Nginx, certbot and the libraries Odoo's Python dependencies need to build:

sudo apt update
sudo apt install -y git postgresql postgresql-client nginx certbot \
  python3 python3-venv python3-dev python3-pip build-essential \
  libpq-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev \
  libjpeg-dev zlib1g-dev libffi-dev libssl-dev \
  fontconfig fonts-dejavu-core fonts-liberation fonts-noto-core

Step 2: Create the Odoo user and database role

Run Odoo as its own unprivileged system user, and give it a PostgreSQL role with the same name. The role may create databases, but it is not a superuser:

sudo adduser --system --group --home /opt/odoo odoo
sudo -u postgres createuser --createdb --no-superuser --no-createrole odoo

Because the system user and the role share a name, Odoo can connect to PostgreSQL over the local socket without a password.

Step 3: Get the Odoo source code

Clone the 19.0 branch of the official repository. A shallow clone of one branch keeps the download small:

sudo -u odoo git clone --depth 1 -b 19.0 --single-branch \
  https://github.com/odoo/odoo /opt/odoo/odoo

Keep your own custom and OCA modules in separate directories, for example /opt/odoo/addons, never inside the Odoo source tree.

Step 4: Create a Python virtual environment

sudo -u odoo python3 -m venv /opt/odoo/venv
sudo -u odoo /opt/odoo/venv/bin/pip install --upgrade pip wheel setuptools
sudo -u odoo /opt/odoo/venv/bin/pip install -r /opt/odoo/odoo/requirements.txt

A virtual environment keeps Odoo's Python packages separate from the system's, so an Ubuntu update cannot break Odoo and an Odoo update cannot break Ubuntu.

Step 5: Install wkhtmltopdf for PDF reports

Odoo renders PDF invoices and reports with wkhtmltopdf, which is not installed with pip. Odoo's documentation says it must be installed separately, in version 0.12.6, for headers and footers to work. The builds with patched Qt from the wkhtmltopdf packaging project are the ones commonly used. After installing it, print a test invoice and check that the header and footer appear before you go live.

Step 6: Configure Odoo

Create /etc/odoo/odoo.conf, readable only by the odoo user:

[options]
admin_passwd = a-long-random-master-password
db_user = odoo
addons_path = /opt/odoo/odoo/addons,/opt/odoo/addons
list_db = False
proxy_mode = True
http_interface = 127.0.0.1
http_port = 8069
gevent_port = 8072
workers = 3
max_cron_threads = 1
limit_time_cpu = 120
limit_time_real = 240
logfile = /var/log/odoo/odoo.log

A few of these matter for security and stability:

  • list_db = False hides the database manager, and a random admin_passwd protects it anyway.
  • http_interface = 127.0.0.1 means Odoo is only reachable through Nginx.
  • workers turns on multi-process mode. Size it, and the memory limits, with the worker formula.

Create the log directory, then the database, with the apps you need:

sudo mkdir -p /var/log/odoo && sudo chown odoo: /var/log/odoo
sudo -u odoo /opt/odoo/venv/bin/python /opt/odoo/odoo/odoo-bin \
  -c /etc/odoo/odoo.conf -d mycompany -i base --stop-after-init

Step 7: Run Odoo as a systemd service

Create /etc/systemd/system/odoo.service:

[Unit]
Description=Odoo
After=network.target postgresql.service

[Service]
User=odoo
Group=odoo
ExecStart=/opt/odoo/venv/bin/python /opt/odoo/odoo/odoo-bin -c /etc/odoo/odoo.conf
Restart=on-failure

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now odoo

Step 8: Put Nginx and HTTPS in front

Configure Nginx to proxy your domain to Odoo on port 8069, and /websocket to port 8072, passing the X-Forwarded-* headers. Point your domain's A and AAAA records at the server, then get a free Let's Encrypt certificate with certbot and redirect HTTP to HTTPS. Our guide to Odoo HTTPS setup covers the DNS records, Nginx settings and web.base.url in detail.

Step 9: Check the installation

Before you invite users, run through a short checklist:

  • Log in over HTTPS on your domain, and check that plain HTTP redirects to it.
  • Try the database manager URL, /web/database/manager. It should be blocked.
  • Print a PDF report and check the header and footer.
  • Send a test email once you have set up an outgoing mail server in Odoo's settings.
  • Restart the server and check that Odoo comes back on its own.
  • Read the log in /var/log/odoo/odoo.log for errors.

For the email part, follow our guide to configuring email for self-hosted Odoo.

Running self-hosted Odoo Community in production

Backups

Back up both the PostgreSQL database and the filestore every day, keep copies off the server, and test a restore. See our Odoo backup strategy guide.

Updates

Pull the latest commits of the 19.0 branch regularly for bug and security fixes, restart Odoo, and update modules with -u when their data changed. Test on a staging copy first.

Security and monitoring

Use SSH keys, automatic security updates and a firewall that exposes only HTTP, HTTPS and SSH. Then watch uptime, disk space, backups and certificates. Our checklists for hardening an Odoo server and monitoring Odoo cover both.

Major upgrades

Moving to a new major version means migrating the database, usually with OCA's OpenUpgrade for Community. Plan it as a project; our upgrade guide explains the steps.

Self-hosting Odoo Community with CloudPilot

Every step above is what CloudPilot automates. On servers in your own cloud account or connected over SSH (Pro and Business plans), it installs PostgreSQL, Nginx, certbot and Odoo from source in a virtual environment, creates a system user and database role per instance, writes the configuration with the database manager off and Odoo on localhost, issues HTTPS certificates, and adds backups, staging, Git deploys and monitoring. On Starter, CloudPilot runs one Odoo Community instance for you on its own servers.

See Odoo Community hosting for the details and pricing for each plan.

Self-hosting Odoo Community: questions

Is it free to self-host Odoo Community?

Odoo Community has no licence fee. You pay for the server, a domain and your time to run it, or for a hosting platform that does the running for you.

Which Ubuntu version should I use for Odoo 19?

Ubuntu 24.04 LTS works well. It ships Python and PostgreSQL versions that meet Odoo 19's requirements of Python 3.10 or later and PostgreSQL 13 or later.

Why are the headers missing from my Odoo PDF reports?

Usually the wrong wkhtmltopdf build. Odoo's documentation says version 0.12.6 is needed for headers and footers; check that you installed that version.

Keep reading

Hardening an Odoo server: a security checklist

A security checklist for Odoo servers: SSH keys, fail2ban, closed ports, the database manager and master password, PostgreSQL roles, two-factor logins and backups.

Run Odoo on your own cloud

Deploy, back up and monitor Odoo on AWS, Google Cloud, Azure, Hetzner or any server. 14-day free trial.