Skip to Content

Odoo 19 Install in Ubuntu 24.04 LTS

Check the Ubuntu version

lsb_release -a


STEP 1: Update packages

sudo apt-get update


STEP 2: Upgrade Packages

sudo apt-get upgrade


STEP 3: To enable remote management , install OpenSSH Server package

sudo apt-get install openssh-server -y


STEP 4: Fail2Ban is a security tool that defends your server against brute-force attempts. It works by monitoring authentication logs for repeated failed login attempts and temporarily blocking the offending IP addresses. Install it with:

sudo apt-get install fail2ban -y


STEP 5:  Start Fail2Ban and enable it for start automatically when system boot, Check status of fail2ban

sudo systemctl start fail2ban

sudo systemctl enable fail2ban 

sudo systemctl status fail2ban


STEP 6: Install python Packages

Pip is the official package manager for Python and is necessary for installing and managing Python libraries


sudo apt-get install -y python3-pip


Odoo requires several development libraries and dependencies to build and run properly


sudo apt-get install -y python3-dev libxml2-dev libxslt1-dev zlib1g-dev libsasl2-dev libldap2-dev build-essential libssl-dev libffi-dev libmysqlclient-dev libjpeg-dev libpq-dev libjpeg8-dev liblcms2-dev libblas-dev libatlas-base-dev


STEP 7: TO install node js ,NPM is its package manager,first install its package manager.


sudo apt-get install -y npm


Install Node.js


sudo ln -s /usr/bin/nodejs /usr/bin/node


When run the above command ,It shows like this "ln: failed to create symbolic link '/usr/bin/node': File exists" 

If the system already created symbolic link , it shows the above content.


STEP 8: Install Less as a CSS preprocessor and Clean-CSS plugin


sudo npm install -g less less-plugin-clean-css


Install node less package to integrate node less and less css with Node.js


sudo apt-get install -y node-less


STEP 9: Install Postgresql


sudo apt-get install -y postgresql


Create a database user and password for odoo in postgresql


sudo su - postgres


createuser --createdb --username postgres --no-createrole --superuser --pwprompt odoo19


    [ createdb: allows the user to create new databases.

    username postgres: specifies that the PostgreSQL superuser will execute the command.

    no-createrole: prevents the user from creating additional roles.

    superuser: grants the user full superuser privileges.

    pwprompt: prompts you to enter a password for the new user.

​odoo19 : the name of the new PostgreSQL user you are creating for Odoo. ]

   then exit.


STEP 10: Create a system user(odoo19) for odoo and also sets the home directory for new user.


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


STEP 11: Install Git

sudo apt-get install -y git


login as the dedicated odoo system user ,it makes all odoo files are owned by user.

sudo su - odoo19 -s /bin/bash


STEP 12: Clone the odoo19 repository

git clone https://www.github.com/odoo/odoo --depth 1 --branch 19.0 --single-branch


exit


STEP 13: Install Python3 Virtual Environment packages


sudo apt install -y python3-venv


STEP 14: Create a Python virtual environment

sudo python3 -m venv /opt/odoo19/odoo/venv


STEP 15: Activate the virtual environment

Switch superuser,go to inside odoo19 folder,activate venv file


sudo -s     

cd /opt/odoo19/odoo/

source venv/bin/activate


STEP 16: Install Python dependencies ,inside the activated virtual environment itself.

pip install -r requirements.txt


STEP 17: Install WKhtmltopdf

sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb


STEP 18: Odoo requires SSL support, Install OpenSSL library

sudo wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb


sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb


STEP 19: Install additional Font packages for Wkhtmltopdf

sudo apt-get install -y xfonts-75dpi


STEP 20: Install WKhtmltopdf packages

  sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb


STEP 21: Fix Dependency issues

  sudo apt install -f


Deactivate the virtual environment

  deactivate

  

STEP 22: Copy the default configuration file

  sudo cp /opt/odoo19/odoo/debian/odoo.conf /etc/odoo19.conf

  

  Edit the configuration File

  sudo nano /etc/odoo19.conf

  

  [options]

; This is the password that allows database operations:

; admin_passwd = admin

db_host = localhost

db_port = 5432

db_user = odoo19

db_password = vv123

addons_path = /opt/odoo19/odoo/addons                   

logfile = /var/log/odoo/odoo19.log


STEP 23: Set file permissions

sudo chown odoo19: /etc/odoo19.conf

sudo chmod 640 /etc/odoo19.conf


Create a Log directory


sudo mkdir /var/log/odoo

sudo chown odoo19:root /var/log/odoo


STEP 24: Create a service file

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


write content


[Unit]

Description=Odoo19

Documentation=http://www.odoo.com

[Service]

# Ubuntu/Debian convention:

Type=simple

User=odoo19

ExecStart=/opt/odoo19/odoo/venv/bin/python3.12 /opt/odoo19/odoo/odoo-bin -c /etc/odoo19.conf

[Install]

WantedBy=default.target


Set Permission for the service file

sudo chmod 755 /etc/systemd/system/odoo19.service

sudo chown root: /etc/systemd/system/odoo19.service


STEP 25: Start the odoo service

sudo systemctl start odoo19.service


Check service status

sudo systemctl status odoo19.service


If the status shows active: running

now we can see in the browser : http://<your_domain_or_IP_address>:8069


STEP 26: Monitor the odoo log

sudo tail -f /var/log/odoo/odoo19.log


Enable the odoo service at boot

sudo systemctl enable odoo19.service


Restart

sudo systemctl restart odoo19.service


stop

sudo systemctl stop odoo19.service


# Odoo