Zahid Anwar
September 8, 2025
Here’s a step-by-step guide to install Odoo 18 on Ubuntu Server – Version 24
sudo adduser --system --home=/opt/odoo18 --group odoo18
sudo usermod -s /bin/bash odoo18
sudo apt update && sudo apt upgrade -y
sudo apt install -y git python3 python3-pip python3-venv \
build-essential libpq-dev libxml2-dev libxslt1-dev \
libldap2-dev libsasl2-dev libtiff5-dev libjpeg-dev \
libopenjp2-7-dev zlib1g-dev libfreetype6-dev \
liblcms2-dev libwebp-dev libharfbuzz-dev libfribidi-dev \
libxcb1-dev libpq5 wkhtmltopdf
sudo apt install -y postgresql
sudo -u postgres createuser -s odoo18
#Switch to odoo18 user:
sudo -i -u odoo18
#Clone Odoo 18 source code:
cd /opt/odoo18
wget https://github.com/odoo/odoo/archive/refs/heads/18.0.zip -O odoo18.zip
#Unzip & remove extra content:
unzip odoo18.zip
mv odoo-18.0/* odoo-18.0/.[!.]* .
rm -rf odoo-18.0 odoo18.zip
#Inside /opt/odoo18:
cd /opt/odoo18
python3 -m venv venv
source venv/bin/activate
#Upgrade pip:
pip install --upgrade pip wheel setuptools
#Install Python dependencies:
pip install -r requirements.txt
#Deactivate venv & exit from odoo18 user:
deactivate
exit
sudo nano /etc/odoo18.conf
[options]
; Database
admin_passwd = 12345
db_host = False
db_port = False
db_user = odoo18
db_password = False
xmlrpc_port = 8069
addons_path = /opt/odoo18/addons
sudo chown odoo18:odoo18 /etc/odoo18.conf
sudo chmod 640 /etc/odoo18.conf
sudo -i -u odoo18
cd /opt/odoo18
source venv/bin/activate
python3 odoo-bin -c /etc/odoo18.conf
http://localhost:8069
- Try to read the error text
- If it is some dependancey issue than install it by using "pip install dependancy_name
- If it is port related issue, than try to kill the servic which is using the same port
- If it is permission like issue than try to grant access to 'odoo18' user
- If it is database related issue than fix it by edit postgres config file