
How to install Odoo 19 on Ubuntu 24.04
Self-hosting Odoo gives you full control over data, and custom modules. This guide walks you through a safe, maintainable install of Odoo 19 on Ubuntu 24.04, covering both Community and Enterprise editions, an easy CLI installer (install-odoo), configuration, HTTPS, your instance runs reliably in production.
Key references used: Odoo official docs (install paths & packaging), the install-odoo CLI project, and practical server-deployment tutorials.
Quick overview — what you’ll do
- Prepare the Ubuntu 24.04 server (users, updates, firewall).
- Install PostgreSQL and system packages.
- Install Odoo 19 (two options: recommended manual/source method or quick CLI with install-odoo).
- Configure systemd and Nginx reverse proxy with HTTPS.
- Optionally add Enterprise addons (requires Odoo subscription and enterprise repo access). Odoo Source
Prerequisites (what you need before starting)
- An Ubuntu 24.04 server (fresh or dedicated VM).
- A non-root sudo user (recommended).
- Minimum recommended hardware for small production: 4 vCPU, 8–16 GB RAM, 100+ GB SSD. Increase for many users/modules. (real world deployments often use 4+ GB RAM as absolute minimum).
- Domain name pointing to the server (for HTTPS).
- Odoo Enterprise: valid subscription and access to the enterprise addons / repository if you plan to enable Enterprise features.
- (Optional but recommended) Node.js (for JS build assets) and wkhtmltopdf 0.12.6 for PDF headers/footers.
Recommended PostgreSQL version
Odoo requires PostgreSQL. Recent community guides and deployments recommend using modern PostgreSQL (15 or 16) for best compatibility and performance with Odoo 19; the packaged installers default to the distro PostgreSQL package. Use the distribution package unless you have a specific reason to compile/customize.
Option A
Quick install using the install-odoo CLI (fast & repeatable)
install-odoo is a CLI helper that automates many common tasks (user creation, PostgreSQL, dependencies, Odoo clone, systemd, nginx). It’s useful for a fast, consistent setup.
- Install Node.js & npm (if not installed)
1sudo apt update2sudo apt install -y nodejs npm3# (Or install Node.js 18+ from nodesource for recommended node versions)
- Run the installer (interactive)
1npx install-odoo
npx install-odoo will prompt for options: Odoo version (choose 19.0), install Community or Enterprise, PostgreSQL config, domain, SSL (LetsEncrypt) options, etc. The tool supports Ubuntu 22.04 and 24.04.
- After completion:
- The installer typically creates an odoo system user, clones the specified Odoo branch, sets up a Python venv, installs dependencies, configures systemd, and generates an Nginx config with HTTPS if you chose that option.
- Verify service:
1sudo systemctl status odoo-server.service2# or check the service name printed by the installer
Notes:
- The CLI speeds setup and is great for dev/test or small production — but review generated configs and secrets before going to production.
- If you choose Enterprise, the installer may ask for your Enterprise repository credentials or expect you to have them available.
Option B
Manual (recommended for full control / production)
If you need precise control or must integrate custom modules, follow these manual steps.
- System update and create user
1sudo apt update && sudo apt upgrade -y2sudo adduser --system --home=/opt/odoo --group --shell=/bin/bash odoo
- Install PostgreSQL and create DB user
1sudo apt install -y postgresql postgresql-contrib postgresql-16-pgvector2sudo -u postgres createuser --createdb --username postgres --no-createrole --pwprompt odoo3# Follow prompts to set password for user 'odoo'
- Install system packages & Python venv
1sudo apt install -y git python3-venv python3-pip build-essential wget \2python3-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev \3libjpeg-dev zlib1g-dev libpq-dev nodejs npm node-less45sudo ln -s /usr/bin/nodejs /usr/bin/node67sudo npm install -g less less-plugin-clean-css
- wkhtmltopdf (for PDF reports with headers/footers)
1sudo wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb2sudo dpkg -i wkhtmltox_0.12.6-1.bionic_amd64.deb3sudo apt install -f
- Clone Odoo 19 source and set up virtualenv
1sudo -u odoo -H bash -c '2cd /opt/odoo3git clone --depth 1 --branch 19.0 https://github.com/odoo/odoo.git odoo-server4python3 -m venv venv5source venv/bin/activate6pip install --upgrade pip7pip install -r /opt/odoo/odoo-server/requirements.txt8'
FOR ENTERPRISE ONLY
if you wanted to deploy the odoo enterprise you can clone it too.
1sudo -u odoo -H bash -c '2mkdir -p /opt/odoo/enterprise3cd /opt/odoo/enterprise4git clone --depth 1 --branch 19.0 https://github.com/odoo/enterprise.git addons'
Note: To clone and install the Odoo Enterprise version, you must be an official Odoo partner and have authorized access to https://github.com/odoo/enterprise.
- Create odoo-server.conf (example) and log directory
1sudo nano /etc/odoo-server.conf
Paste the following content, adjusting the admin_passwd and other settings as needed:
1[options]2admin_passwd = your_secure_password3db_host = False4db_port = False5db_user = odoo6db_password = False7addons_path = /opt/odoo/odoo-server/addons,/opt/odoo/custom-addons8; uncomment below if you are using odoo enterprise9;addons_path = /opt/odoo/odoo-server/addons,/opt/odoo/enterprise/addons,/opt/odoo/custom-addons10logfile = /var/log/odoo/odoo-server.log1112workers = 4 ; tune per CPU and RAM13max_cron_threads = 114limit_memory_soft = 2147483648 ; 2GB, tune based on RAM15limit_time_cpu = 6016limit_time_real = 12017db_maxconn = 64
Set workers to 0 for testing; for production set workers = (CPU * 2) + 1 as a baseline and tune.
Save and close the file. Then, set the appropriate permissions.
1sudo mkdir -p /opt/odoo/custom-addons2sudo chown odoo:odoo /opt/odoo/custom-addons34sudo mkdir -p /var/log/odoo5sudo chown odoo:odoo /var/log/odoo67sudo chown odoo: /etc/odoo-server.conf8sudo chmod 640 /etc/odoo-server.conf
- Create a Systemd Service File
1sudo nano /etc/init.d/odoo-server
To manage Odoo as a service, create a odoo service file that allows you to start, stop, and restart the application easily.
Add the following content to the file:
1#!/bin/sh2### BEGIN INIT INFO3# Provides: odoo-server4# Required-Start: $remote_fs $syslog5# Required-Stop: $remote_fs $syslog6# Should-Start: $network7# Should-Stop: $network8# Default-Start: 2 3 4 59# Default-Stop: 0 1 610# Short-Description: Enterprise Business Applications11# Description: ODOO Business Applications12### END INIT INFO131415PATH=/opt/odoo/venv/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin16DAEMON=/opt/odoo/odoo-server/odoo-bin17VENV=/odoo/venv/bin/python318NAME=odoo-server19DESC=odoo-server2021# Specify the user under which the Odoo service will run22USER=odoo2324# Path to the Odoo configuration file25CONFIGFILE="/etc/odoo-server.conf"2627# PID file location28PIDFILE=/var/run/${NAME}.pid2930# Additional options that are passed to the Daemon31DAEMON_OPTS="-c $CONFIGFILE"3233# Check if the DAEMON executable exists and CONFIGFILE is present34[ -x $DAEMON ] || { echo "DAEMON not found"; exit 1; }35[ -f $CONFIGFILE ] || { echo "CONFIGFILE not found"; exit 1; }3637# Function to check if the PID file exists and if the process is running38checkpid() {39[ -f $PIDFILE ] || return 140pid=$(cat $PIDFILE)41[ -d /proc/$pid ] && return 042return 143}4445case "${1}" in46start)47echo -n "Starting ${DESC}: "48start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER --background --make-pidfile --exec $VENV $DAEMON -- $DAEMON_OPTS49echo "${NAME} started."50;;51stop)52echo -n "Stopping ${DESC}: "53start-stop-daemon --stop --quiet --pidfile $PIDFILE --oknodo54echo "${NAME} stopped."55;;56restart|force-reload)57echo -n "Restarting ${DESC}: "58start-stop-daemon --stop --quiet --pidfile $PIDFILE --oknodo59sleep 560start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER --background --make-pidfile --exec $VENV $DAEMON -- $DAEMON_OPTS61echo "${NAME} restarted."62;;63status)64if checkpid; then65echo "${DESC} is running."66else67echo "${DESC} is not running."68fi69;;70*)71echo "Usage: $NAME {start|stop|restart|force-reload|status}" >&272exit 173;;74esac75exit 0
or you can copy the it from the Odoo source (/opt/odoo/odoo-server/debian/init). make sure to update the paths according to your environment.
1sudo chmod 755 /etc/init.d/odoo-server2sudo chown root: /etc/init.d/odoo-server34sudo update-rc.d odoo-server defaults
- Start Odoo Service
1sudo su root -c "/etc/init.d/odoo-server start"
at this point your odoo service will start and you will be able to access it from your IP address like http://your_server_ip:8069
Now we need to add the nginx reverse proxy to access Odoo from domain. make sure you have a domain/subdomain ready and DNS A record pointed to the server IP address.
- Nginx reverse proxy & HTTPS (Let’s Encrypt)
- Create an Nginx site that reverse proxies and forwards WebSocket/longpoll requests for chat / live features (if you use longpolling or an external bus).
- Use Certbot to obtain certificates:
1sudo apt install -y nginx23sudo apt-get install -y snapd4sudo snap install core; snap refresh core5sudo snap install --classic certbot6sudo ln -s /snap/bin/certbot /usr/bin/certbot
create the nginx configuration file
1sudo nano /etc/nginx/sites-available/odoo.conf
paste the below content (make sure to change the domain name)
1#odoo server2upstream odoo_server {3server 127.0.0.1:8069;4}5upstream odoo_server_chat {6server 127.0.0.1:8072;7}89map $http_upgrade $connection_upgrade {10default upgrade;11'' close;12}1314server {1516listen 80;17server_name yourdmoain.com www.yourdmoain.com;18proxy_read_timeout 900s;19proxy_connect_timeout 900s;20proxy_send_timeout 900s;21add_header X-Frame-Options "SAMEORIGIN";22add_header X-XSS-Protection "1; mode=block";23proxy_set_header X-Client-IP $remote_addr;24proxy_set_header HTTP_X_FORWARDED_HOST $remote_addr;2526# Add Headers for odoo proxy mode27proxy_set_header Host $host;28proxy_set_header X-Forwarded-Host $host;29proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;30proxy_set_header X-Forwarded-Proto $scheme;31proxy_set_header X-Real-IP $remote_addr;32underscores_in_headers on;3334# increase proxy buffer size35proxy_buffers 16 64k;36proxy_buffer_size 128k;3738# force timeouts if the backend dies39proxy_next_upstream error timeout invalid_header http_500 http_50240http_503;4142types {43text/less less;44text/scss scss;45}4647# log48access_log /var/log/nginx/odoo_access.log;49error_log /var/log/nginx/odoo_error.log;5051# Redirect longpoll requests to odoo longpolling port52location /longpolling {53proxy_pass http://odoo_server_chat;54}5556# Redirect requests to odoo backend server57location / {58proxy_redirect off;59proxy_pass http://odoo_server;60}6162location /websocket {63proxy_set_header Upgrade $http_upgrade;64proxy_set_header Connection $connection_upgrade;65proxy_set_header X-Forwarded-Host $host;66proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;67proxy_set_header X-Forwarded-Proto $scheme;68proxy_set_header X-Real-IP $remote_addr;69proxy_pass http://odoo_server_chat;70}7172# enable data compression73gzip on;74gzip_min_length 1100;75gzip_buffers 4 32k;76gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript application/pdf image/jpeg image/png;77gzip_vary on;78client_header_buffer_size 4k;79large_client_header_buffers 4 64k;80client_max_body_size 0;8182}
save and exit the file. now we need to create the symbolic link to the odoo reverse proxy file. and check the configuration
1ln -s /etc/nginx/sites-available/odoo.conf /etc/nginx/sites-enabled/odoo.conf2nginx -t
now we will acquire the ssl certificate using the certbot. (make sure to change the domain name)
1sudo certbot --nginx -d yourdmoain.com www.yourdmoain.com
at this point you should access the odoo from your configured domain. open your domain on the browser and you should see the odoo database selector initially.
Additional checklist
- Enable a firewall (UFW): Allow only essential ports — SSH (preferably on a custom port), HTTP (80), and HTTPS (443).
- Restrict database access: Disable remote PostgreSQL connections unless absolutely required. Bind PostgreSQL to localhost or limit access within your private network (VPC).
- Keep the system updated: Regularly apply OS and package updates to patch vulnerabilities and maintain stability.
- Rotate and manage logs: Set up log rotation for Odoo logs to prevent large file sizes from consuming disk space. Use logrotate or systemd journaling rules.
- Automate database backups: Schedule daily automated backups of both the PostgreSQL database and filestore. Test restores periodically to ensure data integrity.
- Optimize PostgreSQL for Odoo: Tune key parameters like shared_buffers, work_mem, and effective_cache_size based on available RAM. Monitor performance regularly and adjust as workload grows.
While this guide gives you a strong foundation for self-hosting Odoo, building a fully optimized business management system takes deeper expertise. For professional Odoo implementation, custom module development, smooth data migration, and reliable deployment, partner with a team that knows Odoo inside out.
Contact Heliconia Solutions to turn your Odoo instance into a powerful, tailored platform that truly fits your business.
Read Next

Learn to manually install Odoo 18 on Ubuntu 22.04 and above. This guide provides step-by-step instructions for a clean and controlled setup.

Confused by Odoo hosting options? Cloud, dedicated, or self-hosted? We explain Odoo Online, Odoo.sh, & On-Premise to find your perfect fit


