How to Install Odoo 20 on Ubuntu: Complete Step-by-Step Setup Guide

Learn how to install Odoo 20 on Ubuntu step by step using Python 3.12, PostgreSQL 16, Git, dependencies, systemd, and source installation.

This guide explains how to install Odoo 20 Community Edition from source on an Ubuntu or Debian server. You will install Python 3.12, PostgreSQL 16, Odoo's own dependencies, set up a systemd service, and open your new Odoo 20 instance in a browser.

Odoo is one of the most popular open-source business management platforms in the world, combining CRM, sales, inventory, accounting, HR, and website tools into a single system. Odoo 20 is the newest version, and it raised its minimum Python and PostgreSQL requirements, which is the main thing that trips people up when following an older guide.

You do not need to be a Linux expert to follow along. Just work through the commands in order, and by the end you will have a working Odoo 20 environment. The steps apply to any recent Ubuntu or Debian release, and we call out the couple of places where an older release needs one extra command.


Ways to Install Odoo 20

Before diving in, it helps to know that source installation is only one of a few ways to get Odoo 20 running. Here is how they compare:

πŸ“¦
Packaged Install (.deb)
Fastest way to get a single Odoo instance running on a dedicated server; less flexible for custom code.
πŸ› οΈ
Source Installation
Clones Odoo's code directly from GitHub β€” full control over version, add-ons, and configuration. This is what this guide covers.
🐳
Docker
Good for isolated, disposable environments and quick testing, especially alongside other services.
☁️
Odoo Online (SaaS)
Odoo's own hosted service; no server needed, but you give up direct file and database access.

Odoo's own documentation notes that source installation is particularly convenient for people building or testing custom modules, since it is easy to run alongside other Odoo versions on the same machine β€” see Odoo's official source-installation docs. That is the approach this guide walks through, step by step.

Odoo 20 System Requirements

Odoo 20 raised its minimum software requirements compared to earlier versions, so check these carefully:

Python 3.12 or later (older Odoo versions accepted Python 3.10, but Odoo 20 does not).
PostgreSQL 16 or later (Odoo 20 raised this from PostgreSQL 13).
A Debian-based distribution β€” Ubuntu 22.04 LTS, 24.04 LTS, or newer, or Debian 11, 12, or 13.
At least 4 GB of RAM and 2 CPU cores (2 GB can work for testing, but slowly).
At least 20 GB of free disk space.
A user account with sudo (administrator) privileges, and an internet connection.
Tip: If you are testing on a personal laptop instead of a server, you can install Ubuntu or Debian inside a virtual machine (VirtualBox, VMware, or WSL2 on Windows) and follow the exact same steps.

Odoo 20 on Ubuntu 24.04 vs. Ubuntu 22.04

If you searched specifically for Odoo 20 on one of these releases, here is the short version:

Ubuntu 24.04
Default Python (3.12) and default PostgreSQL (16) already meet Odoo 20's requirements, so Steps 3 and 5 below finish quickly.
Ubuntu 22.04
Default Python is 3.10 and default PostgreSQL is 14 both too old, so you'll use the extra deadsnakes and PGDG repository commands shown in Steps 3 and 5.

Note: Every other step is identical on both releases, and on Debian 11, 12, and 13 as well.

Odoo 20 Installation Guide

Step-by-Step Odoo 20 Installation

Step 1

Connect to Your Server

If you are working on a remote server, connect to it over SSH from your local computer:

ssh your_username@your_server_ip

If your server uses a custom SSH port or a private key file, connect like this instead:

ssh -p 2222 your_username@your_server_ip
ssh -i /path/to/key.pem your_username@your_server_ip

Once you are logged in, check which distribution and version you are on:

lsb_release -a

Make a note of the Codename value shown, as you will use it again later.

Step 2

Update the System

Always start with a fully updated system. This avoids errors caused by outdated packages.

sudo apt update
sudo apt upgrade -y
Step 3

Make Sure You Have Python 3.12 or Later

Check the Python version that is currently installed:

python3 --version

If this already shows 3.12 or higher, skip ahead. If it shows an older version, install Python 3.12 alongside your existing Python.

On Ubuntu, install it using the deadsnakes PPA:

sudo apt install -y software-properties-common
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt update
sudo apt install -y python3.12 python3.12-venv python3.12-dev

On Debian, use pyenv to install Python 3.12 without replacing the system Python.

Step 4

Create a Dedicated System User for Odoo

Running Odoo under its own dedicated system user is safer and keeps your setup organized.

sudo adduser --system --home=/opt/odoo20 --group odoo20

This creates the odoo20 system user with its home directory at /opt/odoo20.

Step 5

Install PostgreSQL 16 or Newer

Odoo stores all its data in PostgreSQL. Install PostgreSQL using the official PostgreSQL repository:

sudo apt install -y curl ca-certificates postgresql-common
sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y
sudo apt update
sudo apt install -y postgresql postgresql-client

Confirm the installed version:

psql --version

Then create the PostgreSQL role used by Odoo:

sudo -u postgres createuser -d -R -S odoo20
Step 6

Download the Odoo 20 Source Code

Switch to the Odoo system user and clone the Odoo 20 source code:

sudo su - odoo20 -s /bin/bash
cd /opt/odoo20
git clone https://github.com/odoo/odoo.git --branch 20.0 --depth 1 --single-branch .

Once the download finishes, verify that files such as odoo-bin, requirements.txt, and the addons directory are present.

Step 7

Install Dependencies with Odoo's Setup Script

Odoo provides a setup script that installs the system dependencies required by the source code:

cd /opt/odoo20
sudo ./setup/debinstall.sh

Let the script finish before continuing to the next step.

Step 8

Install Node.js Tools for the Web Client

Install Node.js and the Less packages required for Odoo's web assets:

sudo apt install -y nodejs npm
sudo npm install -g less less-plugin-clean-css

Confirm Node.js is available:

node --version
Step 9

Set Up a Python Virtual Environment

Create an isolated Python environment for Odoo and install its Python dependencies:

sudo -u odoo20 python3.12 -m venv /opt/odoo20/venv
sudo -u odoo20 /opt/odoo20/venv/bin/pip install --upgrade pip wheel
sudo -u odoo20 /opt/odoo20/venv/bin/pip install -r /opt/odoo20/requirements.txt
Step 10

Install wkhtmltopdf

Odoo uses wkhtmltopdf to generate PDF documents such as invoices and quotations. Install the required package and dependencies:

sudo apt install -y xfonts-75dpi
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb
sudo dpkg -i wkhtmltox_0.12.6.1-2.jammy_amd64.deb
sudo apt install -f -y

Verify that wkhtmltopdf was installed successfully:

wkhtmltopdf --version
Step 11

Create the Odoo Configuration File

Create the log directory and configuration file:

sudo mkdir -p /var/log/odoo20
sudo chown odoo20: /var/log/odoo20
sudo nano /etc/odoo20.conf

Add the following configuration:

[options]
admin_passwd = choose_a_strong_master_password
db_host = localhost
db_port = 5432
db_user = odoo20
db_password = False
addons_path = /opt/odoo20/addons
logfile = /var/log/odoo20/odoo20.log
xmlrpc_port = 8069

Then secure the configuration file:

sudo chown odoo20: /etc/odoo20.conf
sudo chmod 640 /etc/odoo20.conf
Step 12

Create a Systemd Service

Create a systemd service so Odoo starts automatically and can restart if it stops unexpectedly:

sudo nano /etc/systemd/system/odoo20.service

Add the following service definition:

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

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

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
Step 13

Start Odoo and Check Its Status

Start the service, enable it on system boot, and verify that it is running:

sudo systemctl start odoo20
sudo systemctl enable odoo20
sudo systemctl status odoo20

A status of active (running) means Odoo has started successfully.

Step 14

Open Odoo in Your Browser

Odoo listens on port 8069 by default. Open your browser and visit:

http://your_server_ip:8069

If Odoo is running locally, use http://localhost:8069 instead.

Step 15

Install the Apps You Need

Once you are inside Odoo, open the Apps menu, search for the applications you need, and click Activate or Install. Odoo will configure the selected application inside your database.

Once these steps are complete, your Odoo 20 environment is ready to use. You can now configure your database, install additional applications, and begin setting up your business workflows.

Common Odoo 20 Installation Errors and How to Fix Them

Ten of the most frequent issues readers run into, and the fastest fix for each.

Check the log file for the exact error message:

sudo tail -n 50 /var/log/odoo20/odoo20.log

You can also watch the systemd journal in real time while restarting the service, which is often the fastest way to catch the problem:

sudo journalctl -u odoo20 -f

psycopg2 needs PostgreSQL's development headers to compile. Make sure libpq-dev is installed (Step 7 covers this via debinstall.sh), then re-run the pip install command from Step 9.

This usually means the database role name does not match, or PostgreSQL is set to peer authentication instead of password authentication. Double-check that db_user in your config file matches the role you created in Step 5.

Another process, or a second Odoo instance, may already be using that port. Find and stop it, or change xmlrpc_port in /etc/odoo20.conf to a free port such as 8070.

This means Odoo cannot find the binary, usually because Step 10 was skipped or dpkg -i reported missing dependencies. Re-run sudo apt install -f -y, then confirm wkhtmltopdf --version works from the same shell Odoo runs under.

This almost always means a system library is missing. Re-run sudo ./setup/debinstall.sh from Step 7, then try the pip install again.

Odoo 20 needs Python 3.12 or later. Run python3 --version, and if it is older, revisit Step 3 and make sure the virtual environment in Step 9 was created with python3.12, not the system's default python3.

Odoo 20 needs PostgreSQL 16 or later. Run psql --version; if it shows an older number, your system likely installed its own default PostgreSQL instead of the PGDG one from Step 5. Remove the old cluster or install PostgreSQL 16 explicitly with sudo apt install -y postgresql-16.

Confirm PostgreSQL is running with sudo systemctl status postgresql, and that db_host, db_port, and db_user in /etc/odoo20.conf are correct. If you set a password for the odoo20 role, also add db_password to the config file instead of leaving it as False.

This is almost always a module-loading problem rather than a network issue. Check the log file from Step 11's path for a Python traceback, and try starting Odoo with the -u all flag once to force all modules to update:

sudo -u odoo20 /opt/odoo20/venv/bin/python3 /opt/odoo20/odoo-bin -c /etc/odoo20.conf -u all -d your_database_name

Setting Up an Odoo 20 Development Environment

If your goal is to build custom modules rather than just run Odoo, the steps above still apply, with two small additions:

Use an IDE

Use an IDE such as PyCharm or VS Code, and point it at the odoo-bin file so you can run and debug Odoo directly from the editor.

Keep Custom Modules Separate

Keep your custom modules in a separate folder, for example /opt/odoo20/custom-addons, and add that path to addons_path in your configuration file, separated by a comma.

Keeping your custom modules separate from Odoo's source code makes the project easier to maintain and simplifies future upgrades.

Conclusion

You now have Odoo 20 installed, configured as a background service, and ready to use from your browser. From here, you can explore Odoo's apps, connect your own domain and set up SSL for production use, and start customizing modules to fit your business. Take it one step at a time, keep an eye on the log file whenever something looks off, and you will have a stable Odoo 20 environment running smoothly.

Frequently Asked Questions

Follow Steps 1–15 above. Ubuntu 24.04 already ships Python 3.12 and PostgreSQL 16 by default, so Steps 3 and 5 finish without needing the extra repository commands.

Yes. Use the deadsnakes PPA commands in Step 3 to get Python 3.12, and the PGDG repository commands in Step 5 to get PostgreSQL 16, since Ubuntu 22.04 ships older defaults of both.

Python 3.12 or later. This is higher than Odoo 19, which accepted Python 3.10.

PostgreSQL 16 or later. This is higher than Odoo 19, which accepted PostgreSQL 13.

Yes, Debian 11, 12, and 13 are all supported by this guide. Debian users install Python 3.12 with pyenv instead of the Ubuntu-only deadsnakes PPA (see Step 3); everything else is identical to Ubuntu.

Yes, but Linux is strongly recommended for real projects, since that is what Odoo is built and tested on. For quick testing on Windows, use WSL2 with an Ubuntu or Debian image, or run Odoo inside Docker.

Use sudo systemctl start odoo20 to start it and sudo systemctl restart odoo20 to restart it after a configuration change, assuming you set up the systemd service in Step 12.

Based on the setup in this guide, it is at /etc/odoo20.conf.

Based on the setup in this guide, logs are written to /var/log/odoo20/odoo20.log.

Port 8069 for the web interface. This can be changed with the xmlrpc_port setting in the configuration file.

See Step 12 above, which walks through the full unit file and how to enable it on boot.

Yes. Repeat the steps with a different system user, a different xmlrpc_port, and a separate configuration and service file for each instance.

Use the packaged installer if you want the fastest possible single-instance setup and do not plan to touch the code. Use source installation, as covered in this guide, if you plan to install custom modules, run multiple Odoo versions on one machine, or want full control over the environment.

Need Help Installing Odoo 20?

Get professional Odoo installation, configuration, migration, and technical support from our Odoo experts.

Talk to an Expert

Get GritXi's Expertise

Sign in to leave a comment
Oct 2, 2026

Odoo 20 CRM: New Features & Complete Guide

A CRM should do more than store customer information. It should actively help sales teams move deals forward, and that is the direction Odoo 20 CRM takes. This release brings a unified lead generation...
Oct 2, 2026

Odoo 20 Website & eCommerce: Complete New Features Guide

Odoo 20 Website & eCommerce β€” Complete Feature Documentation Odoo 20 delivers a transformative leap in Website and eCommerce capabilities. This section covers every major new feature from a business a...
Sep 25, 2026

Odoo 20 Keynote and Updates: What’s New in Odoo 20

Odoo 20 brings a wide range of improvements across the ERP platform, from everyday usability and mobile workflows to AI, accounting, eCommerce, manufacturing, communication, and technical development....