Odoo 18 Installation on Ubuntu 24.04
Step-by-Step Guide to Installing Odoo 18 on Ubuntu 24.04. You can use it as a reference for installing other Odoo versions as well.

Source: Odoo.com
Odoo 18 Installation on Ubuntu 24.04
This blog is a step by step guide on installing Odoo 18 on Ubuntu 24.04. It can be used as a reference to installing other Odoo versions on other Ubuntu versions as well. However packages might differ based on the version.
- Login to Ubuntu Server through SSH
To set up Odoo on a remote server, you must connect to that server. This can be done using ssh. However, if you’re installing it on a local system, you can skip this step.
ssh username@remote_server -i ~/.ssh/id_rsa
2. Update Server Packages
Next, we need to update and upgrade packages to the newer versions. This can be done with following commands
sudo apt update
sudo apt upgrade -y
You can use either apt or apt-get during this installation process. Here I have used apt only but either can be used.
3. Secure the Server
Next, we will add the security by installing openssh-server and fail2ban packages. Installing openssh-server ensures secure remote access to your server, while fail2ban adds an extra layer of protection by actively detecting and blocking potential security threats, making your server more resilient against unauthorised access attempts.
sudo apt install openssh-server fail2ban
After installation, start the fail2ban service and enable it to start automatically on boot.
sudo systemctl start fail2ban
sudo systemctl enable fail2ban
Verify fail2ban Status: To ensure that fail2ban is running correctly, you can check its status with:
sudo systemctl status fail2ban
Securing your server with these steps will help protect it from common threats and unauthorized access. Once your server is secured, you can proceed with the Odoo 18 installation.
4. Install Packages and Libraries
Since Odoo is built on Python, we need to install some dependencies and to proceed further with Odoo installation on the server. We can install them running the following commands
*Install Python 3 pip*: Pip is the package installer for Python, and it’s required to manage Python libraries.
sudo apt install python3-pip
Install Development Libraries and Dependencies: These libraries are necessary for building and running Odoo and its dependencies.
sudo apt install -y git python3-venv 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
The required packages, libraries, and their versions for Odoo installation may vary depending on the Odoo and Ubuntu versions. To prevent issues during installation and operation, ensure that you install the correct versions.
Install node.js and npm: node.js is required for various frontend tasks, and NPM is its package manager.
sudo apt install -y npm
Create a Symlink for node.js: Sometimes, Node.js is installed as nodejs but some applications expect node. Create a symlink to ensure compatibility.
sudo ln -s /usr/bin/nodejs /usr/bin/node
Install less and less-plugin-clean-css: Less is a CSS pre-processor, and the clean CSS plugin helps minify CSS files.
sudo npm install -g less less-plugin-clean-css
Install node-less: This package integrates Less with node.js.
sudo apt install -y node-less
5. Install and Configure PostgreSQL
Odoo uses PostgreSQL as database back-end, so we need to install it. Also, we will create a PostgreSQL user named odoo18.
Install PostgreSQL: This command installs the PostgreSQL database server.
sudo apt install postgresql -y
Switch to the PostgreSQL User: PostgreSQL uses its user account for database management. Switch to this account to create a new database user.
sudo su - postgres
Create a new Database User: Create a user for Odoo with permission to create databases. You’ll be prompted to enter a password for this user.
createuser --createdb --username postgres --no-createrole --superuser --pwprompt odoo18
— createdb: Allows the user to create databases.
— username postgres: Specifies the PostgreSQL superuser.
— no-createrole: Prevents the user from creating roles.
— superuser: Grants superuser privileges.
— pwprompt: Prompts for a password for the new user.
odoo18: The name of the new user.
The username and password are needed on configuration file. The postgres uses a distinct system user to perform tasks.
psql
ALTER USER odoo18 WITH SUPERUSER;
\q
exit
6. Install Wkhtmltopdf
For generating PDF reports, Odoo 18 requires a wkhtmltopdf version higher than 0.12.2. Wkhtmltopdf is an open-source command line tool to render HTML data into PDF format using Qt webkit. To install wkhtmltopdf on your Ubuntu 24.04 server, follow the steps below;
sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
Sometimes running the above command right throw below error as some dependencies (eg. libssl1.1 ) could not be installed. In this case, we need to install those dependent packages separately and then run above command.
dpkg: dependency problems prevent configuration of wkhtmltox:
wkhtmltox depends on libssl1.1; however:
Package libssl1.1 is not installed.
wkhtmltox depends on xfonts-75dpi; however:
Package xfonts-75dpi is not installed.
wkhtmltox depends on xfonts-base; however:
Package xfonts-base is not installed.
If this error is not encountered, below commands can be skipped. Else run below commands to install dependencies and then wkhtmltopdf
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo apt --fix-broken install
sudo apt install xfonts-75dpi xfonts-base
sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
7. Create an Odoo User
We will create a new user named odoo18 with home directory /home/odoo. This prevents the security risks posed by running Odoo under the root user. You can name your user whatever you want but be careful to name same as PostgreSQL user.
sudo useradd -m -d /home/odoo -U -r -s /bin/bash odoo18
— system: Creates a system user with a lower UID.
— home=/home/odoo: Specifies the home directory for the user.
— group odoo18: Creates a group with the same name and assigns the user to it.
This setup ensures that Odoo has a dedicated user and database for managing its operations securely. You’re now ready to proceed with the Odoo installation and configuration.
8. Install Odoo
We will clone version 18.0 from Odoo repository. This will be done with odoo17 and inside /home/odoo directory
sudo su - odoo18
cd ~/home/odoo
git clone --branch=18.0 --depth=1 --single-branch https://www.github.com/odoo/odoo
In this blog, we will install Odoo using python virtual environment. Run the below commands to create a virtual environment and connect to it
python3 -m venv odoo18-venv
source odoo18-venv/bin/activate
Install the necessary Python packages for Odoo 18 by using the requirements.txt file located within the odoo directory.
pip3 install wheel
pip3 install -r odoo/requirements.txt
deactivate
9. Create a Directory for Custom Modules
mkdir /home/odoo/custom_addons
This directory should later be added to the addons_path parameter that defines a list of directories where Odoo searches for modules. After this step, we will switch back from odoo user
exit
10. Setup Configuration File for Odoo
For Odoo to operate effectively, it needs specific information like the database user, password, addons locations, and more. While these details can be supplied when running Odoo via the command line, creating a configuration file streamlines the process, eliminating the need to provide them with each run.
sudo nano /etc/odoo.conf
A sample of the configuration file can be found inside the odoo folder, or you can copy the content from the section below. You can find more information about the above parameters and more here
[options]
addons_path = /home/odoo/odoo/addons,/home/odoo/custom_addons
data_dir = /home/odoo/.local/share/Odoo
admin_passwd = "your_admin_password"
db_host = False
db_name = False
db_filter=False
db_password = False
db_port = 5432
db_user = odoo18
list_db = True
log_db = False
log_db_level = warning
log_handler = :INFO
log_level = info
logfile = /var/log/odoo/odoo.log
Next, grant system user odoo18 access to this config file.
sudo chown odoo18: /etc/odoo.conf
sudo chmod 640 /etc/odoo.conf
Now, create a log directory for Odoo and set necessary permissions for odoo18 to access it.
sudo mkdir /var/log/odoo
sudo chown odoo18: /var/log/odoo
11. Create Odoo Service File
Next, we will create a systemd service file for Odoo which will help in start/stop/restart Odoo server
sudo nano /etc/systemd/system/odoo-server.service
Copy and paste the above content. However make sure all the information are correct in case you have made changes while following this blog.
[Unit]
Description=Odoo18
Requires=postgresql.service
After=network.target postgresql.service
[Service]
Type=simple
SyslogIdentifier=odoo18
PermissionsStartOnly=true
User=odoo18
Group=odoo18
ExecStart=/home/odoo/odoo18-venv/bin/python3 /home/odoo/odoo/odoo-bin -c /etc/odoo.conf
StandardOutput=journal+console
[Install]
WantedBy=multi-user.target
Finally, set the necessary permissions and start the Odoo server
sudo chmod 755 /etc/systemd/system/odoo-server.service
sudo chown root: /etc/systemd/system/odoo-server.service
sudo systemctl start odoo-server.service
The above command will start the odoo-server. To check the status of the odoo-server, you can use below command.
systemctl status odoo-server.service
12. Create and Access Odoo Database
If Odoo installation was successful, status will be active. Now, you can access Odoo with the following URL. It will redirect you to database create page where you can create Odoo database
Odoo runs on port 8069 by default. However this can be configured from configuration file.
http://localhost_or_ip_address:8069
You can use below command to access odoo log file.
tail -f /var/log/odoo/odoo.log
You can use below command to stop odoo server
sudo service odoo-server stop
You can use below command to start odoo server
sudo service odoo-server start
You can use this command to restart odoo server
sudo service odoo-server restart
Following these steps, Odoo 18 should be running on your Ubuntu 24.04 server, accessible via your browser, and configured to start automatically on boot.
Having successfully installed Odoo 18, this guide not only serves as a reliable reference for future Odoo 18 installations but also provides insights into installing other Odoo versions. Understanding the necessary libraries and packages, and their roles, equips you with valuable knowledge for troubleshooting related issues in the future.
I hope this blog has facilitated a smooth Odoo installation and deployment for you! You can checkout Install and Manage Odoo for more blogs regarding installing Odoo on cloud server, manage multiple Odoo versions, configure Odoo with nginx as reverse proxy.
메타데이터
- post_id
- b568ce099fa5
- slug
- odoo-18-installation-on-ubuntu-24-04-b568ce099fa5
- url
- https://medium.com/@karan.bk/odoo-18-installation-on-ubuntu-24-04-b568ce099fa5
- canonical_url
- https://medium.com/@karan.bk/odoo-18-installation-on-ubuntu-24-04-b568ce099fa5
- author_url
- https://medium.com/@karan.bk
- status
- ok
- fetched_at
- 2026-07-22 09:41:37