Zalino Logo white

How to Install Odoo 19 on Ubuntu | Step by Step Guide (Using Virtual Environment Setup)

How to Install Odoo 19 on Linux/Ubuntu Server Using Virtual Environment

Here’s a step-by-step guide to install Odoo 19 on Ubuntu Server – Version 24

Step 1: Create System User

sudo adduser --system --home=/opt/odoo19 --group odoo19
sudo usermod -s /bin/bash odoo19

    
Step 2: Install Required Packages

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

    
Step 3: Install PostgreSQL and Create User

sudo apt install -y postgresql
sudo -u postgres createuser -s odoo19


    
Step 4: Get Odoo Source Code

#Switch to odoo19 user:

sudo -i -u odoo19

#Clone Odoo 19 source code:

cd /opt/odoo19
wget https://github.com/odoo/odoo/archive/refs/heads/19.0.zip -O odoo19.zip

#Unzip & remove extra content:

unzip odoo19.zip
mv odoo-19.0/* odoo-19.0/.[!.]* .
rm -rf odoo-19.0 odoo19.zip

    
Step 5: Create Python Virtual Environment

#Inside /opt/odoo19:
cd /opt/odoo19
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 odoo19 user:
deactivate
exit

    
Step 6: Create Odoo Configuration File
Create & edit a file witn name 'odoo19.conf' inside etc:

sudo nano /etc/odoo19.conf

    
Add the following content in 'odoo19.conf':

[options]
; Database
admin_passwd = 12345
db_host = False
db_port = False
db_user = odoo19
db_password = False
http_port = 8069

addons_path = /opt/odoo19/addons

    
Grant access to user odoo19 to the file:

sudo chown odoo19:odoo19 /etc/odoo19.conf
sudo chmod 640 /etc/odoo19.conf

    
Step 7: Verify Installation
Run the odoo server by command:

sudo -i -u odoo19
cd /opt/odoo19
source venv/bin/activate 
python3 odoo-bin -c /etc/odoo19.conf

    
Odoo should be running at:

http://localhost:8069

    
If you face an error:

- 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 'odoo19' user
- If it is database related issue than fix it by edit postgres config file

    
Step 8: Access Odoo 19
Open your browser and navigate to http://localhost:8069.
If you are using a remote server, replace localhost with your server's IP address.
Optional: Nginx as a Reverse Proxy
If you want to serve Odoo behind a domain name, you can install and configure Nginx as a reverse proxy.

Leave a Reply

Your email address will not be published. Required fields are marked *