HomeHOWTOSHow to Install Odoo 17 On Ubuntu 24.04

How to Install Odoo 17 On Ubuntu 24.04

In this guide, we walk you through How to Install Odoo 17 On Ubuntu 24.04. But first, you have to understand what is Odoo. Since it is open-source and incredibly flexible, Odoo is one of the most widely used ERP platforms. CRM, eCommerce, accounting, inventory, manufacturing project management, and other features are just a few of the many modules and applications that are included to meet all of your business’s needs. This includes more than 10,000 third-party apps or plug-ins that are offered as Odoo community application modules, along with more than 30 primary applications (functional business sectors). Its modular design allows users to begin with simple apps and add the components they require to create a unique system.

This program, which is easy to use and is written in Python, manages everything from the front end to the back end and provides a completely integrated suite of apps. The program is highly customizable because it is open-source. This implies that programmers can alter the code to precisely match the needs of any given company. Furthermore, it is capable of being integrated with external shipping systems or payment processors.

It is entirely cloud-based, simple to use and integrate into your business, and easy to expand and improve. All of these features are combined into a single solution when utilizing Odoo, which lowers expenses, increases productivity, and decreases errors. You can also see release notes about Odoo 17.

How to Install Odoo 17 On Ubuntu 24.04

Check the installation steps provided below:

1. Install Required Dependencies

Since Odoo 17 uses Python, the current version is Python 3.12 and unfortunately, Odoo 17 does not support this version. So we shall install phyton 3.11 and its dependencies by running the command below.

$ sudo apt install build-essential wget git python3-dev python3-venv  \
    libfreetype-dev libxml2-dev libzip-dev libsasl2-dev python3-wheel \
    node-less libjpeg-dev zlib1g-dev libpq-dev python3-setuptools \
    libxslt1-dev libldap2-dev libtiff5-dev libopenjp2-7-dev libcap-dev

Now add PPA and install python 3.11.

sudo add-apt-repository ppa:deadsnakes/ppa 
sudo apt install python3.11

Create System User

We have to create a new system user because we will be using the Python virtual environment for the installation and the regular system user will be in charge. For this demo, we use odoo17 as the user alternate usernames are acceptable as long as they match the PostgreSQL user and the information in the configuration file.

sudo useradd -m -d /opt/odoo17 -U -r -s /bin/bash odoo17 

Set the password for odoo17.

$ sudo passwd odoo17
New password: <password>
BAD PASSWORD: The password is shorter than 8 characters
Retype new password: <Re-type password>
passwd: password updated successfully

2. Install PostgreSQL On Ubuntu 24.04

Odoo supports PostgreSQL primarily for data storage. Thus run the command below to set it up.

sudo  apt install postgresql

Once PostgreSQL is installed, you must create a PostgreSQL user which should be the same as the system user you already created.

su - postgres -c "createuser -s odoo17"

The database administration in Odoo will be handled by a PostgreSQL user called “odoo17.”

3. Install wkhtmltopdf On Ubuntu 24.04

Wkhtmltopdf will be installed at this stage. A command line utility called Wkhtmltopdf is available for free and can convert HTML files into PDFs and many image formats. To create PDF reports in Odoo, it is required. Since the .DEB package is not available on Ubuntu24.04, hence we shall install the default.

sudo apt install wkhtmltopdf

Sample Output:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libdouble-conversion3 libmd4c0 libpcre2-16-0 libqt5core5t64 libqt5dbus5t64
  libqt5gui5t64 libqt5network5t64 libqt5positioning5 libqt5printsupport5t64
  libqt5qml5 libqt5qmlmodels5 libqt5quick5 libqt5sensors5 libqt5svg5
  libqt5waylandclient5 libqt5waylandcompositor5 libqt5webchannel5
  libqt5webkit5 libqt5widgets5t64 libxcb-xinerama0 libxcb-xinput0
  qt5-gtk-platformtheme qttranslations5-l10n qtwayland5
Suggested packages:
  qgnomeplatform-qt5 qt5-image-formats-plugins qt5-qmltooling-plugins
The following NEW packages will be installed:
  libdouble-conversion3 libmd4c0 libpcre2-16-0 libqt5core5t64 libqt5dbus5t64
  libqt5gui5t64 libqt5network5t64 libqt5positioning5 libqt5printsupport5t64
  libqt5qml5 libqt5qmlmodels5 libqt5quick5 libqt5sensors5 libqt5svg5
  libqt5waylandclient5 libqt5waylandcompositor5 libqt5webchannel5
  libqt5webkit5 libqt5widgets5t64 libxcb-xinerama0 libxcb-xinput0
  qt5-gtk-platformtheme qttranslations5-l10n qtwayland5 wkhtmltopdf
0 upgraded, 25 newly installed, 0 to remove and 0 not upgraded.
Need to get 29.9 MB of archives.
After this operation, 116 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

The wkhtmltopdf from the Ubuntu 24.04 repository is not built against a forked version of Qt, which is why some settings aren’t allowed. At https://wkhtmltopdf.org/downloads.html, you can verify and obtain the.DEB package for Ubuntu 24.04 as soon as it becomes accessible. Another option is to download and set up the Ubuntu 22.04 version.

4. Install Odoo 17

Using the sudo su command, change to the odoo17 user which we have already created.

su - odoo17

Next, we shall download the Odoo 17 source code by cloning the Github repository.

git clone https://www.github.com/odoo/odoo --depth 1 --branch 17.0 odoo17

Once you’ve downloaded the Odoo source code, build a virtual environment for Python.

sudo apt install python3.11-venv
python3.11 -m venv odoo17-venv

After running the above command, the virtual environment for Python is ready so let’s activate it.

source odoo17-venv/bin/activate

Finally, install Odoo by running:

(odoo17-venv) odoo17@ubuntu24:~$ pip3 install wheel setuptools pip --upgrade
(odoo17-venv) odoo17@ubuntu24:~$ pip3 install -r odoo17/requirements.txt

If you encounter this error:

ERROR: Failed building wheel for psycopg2
  Running setup.py clean for psycopg2
Failed to build psycopg2
ERROR: Could not build wheels for psycopg2, which is required to install pyproject.toml-based projects

Fix by running this command:

sudo apt install python3.11-dev libpq-dev

Hence re-run:

pip3 install -r odoo17/requirements.txt

That is all. The installation of Odoo is located in the directory /opt/odoo17/odoo17. We may now make a new directory to hold our custom Odoo extensions.

mkdir /opt/odoo17/odoo17/custom-addons
exit

5. Set Up Odoo Configuration File

To create odoo configuration file, open the following file with your best editor and paste the content below.

$ sudo vim  /etc/odoo17.conf
[options]
admin_passwd = nixOdoo17
db_host = False
db_port = False
db_user = odoo17
db_password = False
addons_path = /opt/odoo17/odoo17/addons,/opt/odoo17/odoo17/custom-addons

Replace admin_passwd with your strong password which is Odoo’s master password.

Create Odoo Systemd Unit file

Make a Systemd unit file to facilitate the effective management of Odoo services and to allow for its automated startup upon boot. To begin, create and modify a new file called odoo17.service:

 sudo vim /etc/systemd/system/odoo17.service

Add the following lines:

[Unit]
Description=odoo17
Requires=postgresql.service
After=network.target postgresql.service

[Service]
Type=simple
SyslogIdentifier=odoo17
PermissionsStartOnly=true
User=odoo17
Group=odoo17
ExecStart=/opt/odoo17/odoo17-venv/bin/python3 /opt/odoo17/odoo17/odoo-bin -c /etc/odoo17.conf
StandardOutput=journal+console

[Install]
WantedBy=multi-user.target

Now reload and enable systemd service.

sudo systemctl daemon-reload
sudo systemctl enable --now odoo17

Check Odoo status it should be running now.

$ sudo systemctl status odoo17
● odoo17.service - odoo17
     Loaded: loaded (/etc/systemd/system/odoo17.service; enabled; preset: enabled)
     Active: active (running) since Mon 2024-05-20 18:58:55 EAT; 16s ago
   Main PID: 14516 (python3)
      Tasks: 4 (limit: 5674)
     Memory: 120.4M (peak: 120.8M)
        CPU: 2.648s
     CGroup: /system.slice/odoo17.service
             └─14516 /opt/odoo17/odoo17-venv/bin/python3 /opt/odoo17/odoo17/odoo-bin -c /etc/odoo17.conf

6. Access Odoo 17 on Web Interface

Open your browser and type Http://<server-ip or localhost:8069. Remember 8069 is the default port for Odoo 17and you should be greeted with the following page.

How To Install Odoo 17 On Ubuntu 24.04

You will be asked for the master password whenever you interact with an Odoo database. The value admin_passwd in your Odoo configuration file is the master password. Make sure your Odoo master password is a strong one.

  • Put your email and password you set in the above page and click Login button.
How To Install Odoo 17 On Ubuntu 24.04
  • Upon a successful login you will see the following dashboard.
How To Install Odoo 17 On Ubuntu 24.04

You’re ready to go!

End

Well done! After reading this guide, you have successfully installed Odoo 17 on your Ubuntu 24.04 server. You should now be able to add several plugins according to your business needs, such as accounting, inventory, invoicing, and many more. Enjoy using Odoo 17.

Check also these guides:

- Advertisment -

Recent posts

LEAVE A REPLY

Please enter your comment!
Please enter your name here