
Odoo is an open-source ERP and business application suite with apps for sales, invoicing, inventory, purchase, CRM, manufacturing, POS and websites. CentOS Linux has reached end of life, so most Red Hat-style servers today run AlmaLinux, Rocky Linux, RHEL or CentOS Stream. In this tutorial we will install Odoo 19 Community on these systems (version 9 or 10) from source, run it with systemd, and configure firewalld, SELinux, Nginx and SSL, which many guides leave out.
Table of Contents
- Prerequisites
- Step 1. Update the System
- Step 2. Add a System User
- Step 3. Install Dependencies
- Step 4. Install PostgreSQL
- Step 5. Install Wkhtmltopdf
- Step 6. Install Odoo 19
- Step 7. Create the Odoo Configuration File
- Step 8. Create an Odoo Systemd Unit File
- Step 9. Configure the Firewall and SELinux
- Step 10. Configure Nginx and SSL
- Conclusion
Prerequisites
- A server running AlmaLinux, Rocky Linux, RHEL or CentOS Stream 9 or 10, with at least 2 GB of RAM
- SSH access with root or a user with sudo privileges
- A domain pointing to the server (for the Nginx and SSL step)
Conventions
# – run the command with root privileges, either as the root user or with sudo
$ – run the command as a regular (non-root) userStep 1. Update the System
Log in to your server via SSH and update all packages:
ssh root@IP_ADDRESS -p PORT_NUMBER$ sudo dnf update -yEnable the EPEL repository, which provides some extra packages we need:
$ sudo dnf install epel-release -yStep 2. Add a System User
Odoo should never run as root. Create a dedicated system user and group named odoo19, with /opt/odoo19 as its home directory:
$ sudo useradd -m -d /opt/odoo19 -U -r -s /bin/bash odoo19Step 3. Install Dependencies
Install the build tools and libraries Odoo needs:
$ sudo dnf install git wget gcc make redhat-rpm-config libxslt-devel libxml2-devel bzip2-devel \
openldap-devel libjpeg-devel freetype-devel zlib-devel libffi-devel openssl-devel \
xorg-x11-fonts-75dpi xorg-x11-fonts-Type1 -yOdoo 19 needs Python 3.10 or newer. Install Python 3.12, which is available on both version 9 and 10:
$ sudo dnf install python3.12 python3.12-devel -y
$ python3.12 --versionThe output should look like this:
Python 3.12.xStep 4. Install PostgreSQL
Install the PostgreSQL server, initialise the database cluster, then start and enable the service:
$ sudo dnf install postgresql-server postgresql-devel -y
$ sudo postgresql-setup --initdb --unit postgresql
$ sudo systemctl enable --now postgresqlOn version 9 the default PostgreSQL stream is 13, which meets Odoo 19's minimum. If you prefer a newer one, run sudo dnf module list postgresql and enable version 15 or 16 before installing.
Create a PostgreSQL role for Odoo:
$ sudo su - postgres -c "createuser -s odoo19"Step 5. Install Wkhtmltopdf
Install wkhtmltopdf 0.12.6.1 with patched Qt, which Odoo uses to print PDF reports:
$ cd /tmp
$ wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox-0.12.6.1-3.almalinux9.x86_64.rpm
$ sudo dnf install ./wkhtmltox-0.12.6.1-3.almalinux9.x86_64.rpm -yVerify it:
$ wkhtmltopdf --versionwkhtmltopdf 0.12.6.1 (with patched qt)Step 6. Install Odoo 19
Switch to the odoo19 user and download the Odoo 19 source code from GitHub:
$ sudo su - odoo19
$ git clone https://github.com/odoo/odoo --depth 1 --branch 19.0 /opt/odoo19/odoo19Create a Python virtual environment, so Odoo's packages do not conflict with system packages, and activate it:
$ python3.12 -m venv /opt/odoo19/odoo19-venv
$ source /opt/odoo19/odoo19-venv/bin/activateInstall the required Python packages:
(odoo19-venv) $ pip install --upgrade pip wheel
(odoo19-venv) $ pip install -r /opt/odoo19/odoo19/requirements.txtThis takes a few minutes. When it finishes, deactivate the environment, create a folder for custom modules and return to your sudo user:
(odoo19-venv) $ deactivate
$ mkdir /opt/odoo19/custom-addons
$ exitIf you have an Odoo Enterprise subscription, clone the odoo/enterprise repository (branch 19.0) into /opt/odoo19/enterprise and add that path first in addons_path in the next step.
Step 7. Create the Odoo Configuration File
Create a log folder and the Odoo configuration file:
$ sudo mkdir -p /var/log/odoo19
$ sudo chown odoo19: /var/log/odoo19
$ sudo nano /etc/odoo19.confPaste the following content. Replace STRONG_MASTER_PASSWORD with a long random password; it protects the database manager.
[options]
admin_passwd = STRONG_MASTER_PASSWORD
db_host = False
db_port = False
db_user = odoo19
db_password = False
addons_path = /opt/odoo19/odoo19/addons,/opt/odoo19/custom-addons
http_port = 8069
gevent_port = 8072
proxy_mode = True
logfile = /var/log/odoo19/odoo19.log
workers = 2
max_cron_threads = 1Save the file, then make sure only the odoo19 user can read it:
$ sudo chown odoo19: /etc/odoo19.conf
$ sudo chmod 640 /etc/odoo19.confAs a rule of thumb, set workers to (number of CPU cores x 2) + 1. On a small test server you can use workers = 0.
Step 8. Create an Odoo Systemd Unit File
To start Odoo automatically at boot, create a systemd unit file:
$ sudo nano /etc/systemd/system/odoo19.servicePaste the following lines:
[Unit]
Description=Odoo 19
Requires=postgresql.service
After=network.target postgresql.service
[Service]
Type=simple
SyslogIdentifier=odoo19
User=odoo19
Group=odoo19
ExecStart=/opt/odoo19/odoo19-venv/bin/python3 /opt/odoo19/odoo19/odoo-bin -c /etc/odoo19.conf
StandardOutput=journal+console
Restart=on-failure
[Install]
WantedBy=multi-user.targetReload systemd, then start and enable the service:
$ sudo systemctl daemon-reload
$ sudo systemctl enable --now odoo19Check that it is running:
$ sudo systemctl status odoo19You should see output similar to this:
● odoo19.service - Odoo 19
Loaded: loaded (/etc/systemd/system/odoo19.service; enabled; preset: enabled)
Active: active (running) since Sat 2026-11-21 10:15:02 UTC; 6s ago
Main PID: 41213 (python3)
CGroup: /system.slice/odoo19.service
└─41213 /opt/odoo19/odoo19-venv/bin/python3 /opt/odoo19/odoo19/odoo-bin -c /etc/odoo19.confOdoo now listens on port 8069. You can test it at http://YOUR_SERVER_IP:8069, where you will see the database creation screen. Fill in the master password from the config file, a database name, your admin email and password, language and country, then click Create database.
Step 9. Configure the Firewall and SELinux
For a quick test you can open port 8069:
$ sudo firewall-cmd --permanent --add-port=8069/tcp
$ sudo firewall-cmd --reloadFor production, open only HTTP and HTTPS, and allow Nginx to connect to Odoo. SELinux blocks this by default:
$ sudo firewall-cmd --permanent --add-service=http --add-service=https
$ sudo firewall-cmd --reload
$ sudo setsebool -P httpd_can_network_connect 1Step 10. Configure Nginx and SSL
Install Nginx and create a configuration file:
$ sudo dnf install nginx -y
$ sudo nano /etc/nginx/conf.d/odoo19.confPaste the following, replacing yourdomain.com with your domain:
upstream odoo19 {
server 127.0.0.1:8069;
}
upstream odoochat {
server 127.0.0.1:8072;
}
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
server_name yourdomain.com;
client_max_body_size 100m;
proxy_read_timeout 720s;
proxy_connect_timeout 720s;
proxy_send_timeout 720s;
access_log /var/log/nginx/odoo19.access.log;
error_log /var/log/nginx/odoo19.error.log;
location /websocket {
proxy_pass http://odoochat;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
}
location / {
proxy_pass http://odoo19;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;
}
location ~* /web/static/ {
proxy_cache_valid 200 60m;
proxy_buffering on;
expires 864000;
proxy_pass http://odoo19;
}
gzip on;
gzip_types text/css text/plain application/json application/javascript;
}Test the configuration and start Nginx:
$ sudo nginx -t
$ sudo systemctl enable --now nginxThen install a free Let's Encrypt certificate:
$ sudo dnf install certbot python3-certbot-nginx -y
$ sudo certbot --nginx -d yourdomain.comConclusion
Congratulations! You have successfully installed Odoo 19. Open your browser, create your first database and start installing the apps your business needs. For more options, check the official Odoo documentation, or see our Odoo 19 installation guide for every platform.
Of course, you don't have to install Odoo 19 yourself. As a CloudPk client you can ask our Odoo team to install, configure, host and maintain Odoo for you, on our fully managed SaaS or on your own server. Book a free consultation, or message us on WhatsApp +92 302 0600001, and we will take care of it.
PS. If this guide helped you, please share it with your friends on social networks, or ask a question in our Odoo Help Forum. Want to learn more? Take our free course Install and Administer Odoo 19.