Step-by-step guide to install Odoo 17 on Ubuntu 22.04

Odoo ERP software

Odoo ERP is a widely-used open-source business management software suite that includes a comprehensive array of applications, such as customer relationship management (CRM), human resources, accounting, e-commerce, and more. The latest version, Odoo 17, brings significant improvements and new features designed to enhance business operations. In this blog, we will provide a step-by-step guide for installing Odoo 17 on an Ubuntu 22.04 LTS server.

Odoo 17 offers several upgrades and optimisations, including enhanced performance, a more intuitive user interface, and additional functionalities to streamline business processes. Whether you are a small business owner aiming to manage your operations more effectively or a developer keen on exploring the newest features of Odoo, this installation guide will help you get started.

Odoo is a powerful and flexible ERP system that many businesses use because it’s open-source and has many features. Installing Odoo on an Ubuntu 22.04 LTS server is essential to take full advantage of its capabilities. This guide will show you how to install Odoo 17 on Ubuntu 22.04 LTS step by step.

This blog provides detailed instructions for installing Odoo 17 on Ubuntu 22.04. You can also use it as a reference for installing other versions of Odoo on different versions of Ubuntu, though the required packages may vary.

  • A Linux server running Ubuntu 22.04 with minimum 2GB of RAM
  • User with root privileges or a non-root user with sudo privileges

Before starting, it is important to update all the packages on your fresh Ubuntu 22.04 installation to the latest versions. Run the following command to do this:

sudo apt-get update -y && sudo apt-get upgrade -y

Before you begin installing Odoo, you need to set up some stuff for PostgreSQL and Odoo itself.

sudo apt-get install -y python3-pip python3-dev python3-venv 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 -y

After setting up the necessary components, you will install a tool for managing JavaScript packages:

sudo apt-get install -y npm

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

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

sudo apt-get install -y node-less

Now, you will have to set up a tool called Wkhtmltopdf. It’s handy for changing web pages into PDF files. Follow these three commands one after the other:

sudo wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb

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

sudo apt install -f

You are now getting closer to installing Odoo. But before you do that, you will need to prepare the PostgreSQL service, which will store all of Odoo’s data.

sudo apt-get install postgresql -y 

Once that’s done, start and enable the PostgreSQL service. 

sudo systemctl start postgresql && sudo systemctl enable postgresql 

To see if everything’s running smoothly, use this command:

sudo systemctl status postgresql 

You should get this output below: 

root@host:/# sudo systemctl status postgresql

postgresql.service - PostgreSQL RDBMS

     Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset: enabled)

     Active: active (exited) since Thu 2023-11-23 03:42:11 CST; 18s ago

   Main PID: 20712 (code=exited, status=0/SUCCESS)

        CPU: 3ms

Nov 23 03:42:11 host.test.vps systemd[1]: Starting PostgreSQL RDBMS...

Nov 23 03:42:11 host.test.vps systemd[1]: Finished PostgreSQL RDBMS.

Next, you will have to create users for Odoo ERP and PostgreSQL. And, to create the Odoo ERP user, you will need to run the command below:

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

Set a strong password for the Odoo user: 

passwd odoo17

New password: YourStrongPasswordHere

Retype new password: YourStrongPasswordHere

passwd: password updated successfully

Ensure to replace YourStrongPasswordHere with a secure and strong password. And, to create a PostgreSQL user, you will need to execute:

sudo su - postgres -c "createuser -s odoo17"

First, log in as an Odoo user and then clone the most updated version of Odoo into the /opt/ directory:

su - odoo17

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

Then, you will need to activate the Python virtual environment and then start installing or setting up the Odoo ERP requirements.

cd /opt/odoo17

python3 -m venv odoo17-venv

source odoo17-venv/bin/activate

pip install --upgrade pip

pip3 install wheel

pip3 install -r odoo17/requirements.txt

After completion, you will need to deactivate the environment and then create the Odoo log file and the Odoo add-on directories.

Now, let’s create the configuration file for Odoo.

sudo touch /etc/odoo17.conf 

Open the configuration file using the text editor you like best, and add these lines of code. Just make sure to replace “YourStrongPasswordHere” with a password that’s really strong. 

[options]

admin_passwd = YourStrongPasswordHere

db_host = False

db_port = False

db_user = odoo17

db_password = False

xmlrpc_port = 8069

logfile = /var/log/odoo17/odoo17.log

addons_path = /opt/odoo17/odoo17/addons,/opt/odoo17/odoo17-custom-addons

Save and then close the file.

To easily control our Odoo instance, you will need the Systemd service unit file. This will enable you to start, stop, and set Odoo to run on system boot. Execute the following command to create the Odoo systemd unit file:

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

Open that systemd unit file using any text editor you prefer and then paste these following lines:

[Unit]

Description=odoo17

After=network.target postgresql@14-main.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

Reload the daemon and then start and then enable the Odoo ERP service:

sudo systemctl daemon-reload

sudo systemctl start odoo17 && sudo systemctl enable odoo17

To check the service’s status, execute:

sudo systemctl status odoo17

You should receive the following output:

root@host:~# sudo systemctl status odoo17

odoo17.service - odoo17

     Loaded: loaded (/etc/systemd/system/odoo17.service; enabled; vendor preset: enabled)

     Active: active (running) since Thu 2023-11-23 06:34:36 CST; 6s ago

   Main PID: 44663 (python3)

      Tasks: 4 (limit: 4558)

     Memory: 72.0M

        CPU: 2.406s

     CGroup: /system.slice/odoo17.service

             44663 /opt/odoo17/odoo17-venv/bin/python3 /opt/odoo17/odoo17/odoo-bin -c /etc/odoo17.conf

Nov 23 06:34:36 host.test.vps systemd[1]: Started odoo17.

The service is now up and running. To access your Odoo website, use your server’s IP address in your web browser on the port 8069.

So, you have successfully installed Odoo ERP 17 on Ubuntu 22.04. Now, you can customise your setup, install your required applications or modules, and input your business details to kickstart your operations using Odoo. 

Also read about this –

  • Flexible and Expandable: Odoo’s design allows for significant expansion of its capabilities without needing to rewrite much code or change its core structure.
  • No License Fees: Unlike many other ERP systems, Odoo doesn’t come with licensing costs for its base version. This means businesses can allocate their budget towards implementing and customising the software according to their needs.
  • Tailored Solutions: Businesses can customise Odoo to fit their specific needs. This tailor-made approach provides unique features tailored to each business’s requirements. With Odoo’s highly customisable nature, organisations of all sizes can adapt it to their strategies in a competitive market. 
  • Open Source: Odoo’s community edition is open source, meaning anyone can access its source code. This allows companies to customise the ERP system themselves, saving long-term costs.
  • Comprehensive Features: Odoo offers two editions: Community and Enterprise. The Community edition is open source, while the Enterprise edition’s code is only available to Odoo and its official partners. With approximately 30 core modules and 5000 community modules, Odoo covers a wide range of business management activities. These modules can be modified to suit specific requirements, ensuring that businesses have the functionality they need.
  • Continuous Technological Updates: Odoo regularly updates and upgrades its technologies, ensuring that the platform evolves alongside the latest advancements in technology.
  • Seamless Integration: Integrating Odoo with other ERPs is straightforward, enhancing overall efficiency. Additionally, integrating with e-commerce platforms provides businesses a competitive edge in the digital landscape.
  • Robust Security: Odoo prioritises data accuracy, consistency, and security, safeguarding all confidential business information.
  • User-Friendly Interface: Odoo boasts an intuitive interface that is easy to learn and navigate, ensuring a positive user experience.
  • Adaptability: With a wide array of modules available, Odoo allows users to tailor their system to meet specific business requirements. Furthermore, additional modules can be added as the business expands, ensuring flexibility and scalability. 
  • Odoo Studio: Odoo Studio empowers users to create and customise their own applications. It facilitates adding, removing, and modifying screens within the system, as well as designing impressive reports.
  • Responsive Design: While the Odoo community edition wasn’t responsive until version 11.0, the enterprise edition has been responsive. However, starting from version 12 onward, all three versions – Odoo Online, Odoo Enterprise, and Odoo Community, are responsive.

As an open-source ERP software, Odoo offers numerous advantages that position it as one of the best choices in the market. When selecting an ERP software, prioritise the platform and services that best suit your needs.

Alternatively, if you prefer a hassle-free setup, consider our managed Odoo ERP services. With us at Envertis, a certified Odoo gold partner in Australia, , you can simply request our support team to install Odoo 17 on Ubuntu 22.04 for you, and they will handle the rest. Our support team is available 24/7 to assist you not only with the installation but also with any additional requirements you may have. Give us a try, we are confident you won’t be disappointed.

Odoo provides a robust platform for managing diverse business functions, including CRM, accounting, project management, and more. By following the steps in this guide, you can successfully install Odoo 17 on your Ubuntu 22.04 system. For enhanced performance and reliability, consider deploying Odoo 17 now.