Choose a different version or distribution
Introduction
Before we begin talking about how to install Odoo 16 on Ubuntu 24.04, let's briefly understand – What is Odoo 16?
Odoo 16 is a powerful, all-in-one business management software solution designed to streamline operations for companies of all sizes. This latest version comes packed with upgraded features to enhance user experience and efficiency.
From seamless integration of modules for sales, inventory, accounting, and HR to a user-friendly interface, Odoo 16 offers a comprehensive suite of tools for businesses to thrive. With its customizable nature and scalability, Odoo 16 is a versatile solution that can adapt to the specific needs of various industries.
In this tutorial, you will install Odoo 16 on Ubuntu 24.04. We will also address a few FAQs on how to install Odoo 16 on Ubuntu 24.04.
Advantages of Odoo 16
- All-in-One Solution: Odoo offers a comprehensive suite of business applications, including CRM, accounting, inventory, and more.
- Customizable: Tailor Odoo to fit your business's unique needs with its flexible and modular design.
- User-Friendly: With an intuitive interface, Odoo is easy to navigate and use.
- Cost-Effective: Odoo's open-source model allows for affordable implementation and customization.
- Scalable: Grow your business with Odoo's ability to scale up to meet increasing demands seamlessly, making it a versatile solution for businesses of all sizes.
Prerequisites
- A VPS running Ubuntu 24.04 with at least 2GB of RAM is needed.
- SSH root access or a user with
sudo
privileges is required.
Installation of Odoo 16 on Ubuntu 24.04
After our discussion of the advantages of Odoo 16 and Ubuntu, let's move on to the installation and configuration of Odoo 16 ERP on Ubuntu 24.04.
Step 1: Update Package Manager
Use the instructions listed below to update and install any upgrades on your Ubuntu package management before installing Odoo:
sudo apt-get update
sudo apt-get upgrade -y
Step 2: Create an Odoo User
Create an administrator-level user for Odoo by creating the following account:
sudo adduser -system -home=/opt/odoo -group odoo
Step 3: Install PostgreSQL and Create an Odoo User for PostgreSQL
We'll be using PostgreSQL as our database server for Odoo. For database access, install and create an Odoo user as follows:
sudo apt install postgresql -y
sudo su – postgres -c "createuser -s odoo" 2> /dev/null || true
sudo chmod 700 -R /var/lib/postgresql/16/main/
sudo systemctl restart postgresql
Step 4: Installation of Python and Python PIP Dependencies
The procedures to install Python and Python PIP dependencies for Odoo are listed below:
sudo apt-get install git python3 python3-pip build-essential wget python3-dev python3-venv python3-wheel libxslt-dev libzip-dev libldap2-dev libsasl2-dev python3-setuptools node-less libjpeg-dev gdebi -y
sudo apt-get install libpq-dev python3-dev libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev libffi-dev python3-psutil python3-polib python3-dateutil python3-decorator python3-lxml python3-reportlab python3-pil python3-passlib python3-werkzeug python3-psycopg2 python3-pypdf2 python3-gevent -y
Step 5: Additional Packages Required
Node.js is required for Odoo 16. Use the following command to install it:
sudo apt-get install nodejs npm -y
There is no right-to-left CSS or language support in Odoo. The following command can be used to add this, but only if RTL is necessary.
sudo npm install -g rtlcss
Step 6: Installation of wkhtmltox
For Odoo 16 to generate PDF reports, wkhtmltopdf
is necessary. Installing them enables Odoo to generate reports successfully because PDF reports are a crucial component of any organization.
We must first install the xfonts
dependency before installing wkhtmltopdf
by using the command:
sudo apt-get install xfonts-75dpi xfonts-base -y
Use the following sequence of commands to install the wkhtmltox
after the dependency is installed.
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb
sudo dpkg -i wkhtmltox_0.12.6.1-2.jammy_amd64.deb
Step 7: Create a Log Directory and Provide Permissions
Odoo will continue to audit and record audit trails. Create an Odoo log directory and provide it the required write permissions.
sudo mkdir /var/log/odoo
sudo chown odoo:odoo /var/log/odoo
Step 8: Installation of Odoo 16
After completing the aforementioned requirements, we are now prepared to install Odoo 16. With the following instructions, download the Odoo 16 code from the git repository and install it:
sudo apt-get install git
sudo git clone https://www.github.com/odoo/odoo /opt/odoo/odoo-server -b 16.0 --depth 1
Step 9: Setup Required Permissions
After installing Odoo 16, grant it the required permissions so that it can function properly.
sudo chown -R odoo:odoo /opt/odoo/
Step 10: Creation of a Server Configuration File
We've finished setting up a basic version of Odoo 16 at this time. The correct configurations must now be put up in order to operate the Odoo 16 instance. It is preferable to first establish a configuration file, then add the configurations to it for clarification or adjustment.
sudo touch /etc/odoo-server.conf
sudo su root -c "printf '[options] \n; This is the password that allows database operations:\n' | sudo tee /etc/odoo-server.conf"
sudo su root -c "printf 'admin_passwd = admin\n' | sudo tee /etc/odoo-server.conf"
sudo su root -c "printf 'xmlrpc_port = 9080\n' | sudo tee /etc/odoo-server.conf"
sudo su root -c "printf 'logfile = /var/log/odoo/odoo-server.log\n' | sudo tee /etc/odoo-server.conf"
sudo su root -c "printf 'addons_path=/opt/odoo/odoo-server/addons\n' | sudo tee /etc/odoo-server.conf"
sudo vim /etc/odoo-server.conf
Make changes as given header.
[DEFAULT]
addons_path = /opt/odoo/odoo-server/addons
...
Give the configuration file the appropriate permissions:
sudo chown odoo:odoo /etc/odoo-server.conf
sudo chmod 640 /etc/odoo-server.conf
The installation and execution of a programme can be separated using a Python virtual environment. Use the following instructions to build a virtual environment:
we must switch to the Odoo user by executing the command below:
sudo su -l odoo -s /bin/bash
cd odoo-server
python3 -m venv odoo-venv
source odoo-venv/bin/activate
We must use the commands listed below to install the Python requirements into this virtual environment, which was made for our Odoo installation:
pip3 install wheel
pip3 install -r requirements.txt
Using the deactivate command allows us to leave the virtual environment after installing Python dependencies:
deactivate
Step 11: Start the Odoo Instance
Now that everything is set up
Execute the odoo-bin file pointing to the Odoo configuration file to activate the virtual environment before starting the Odoo service.
cd /opt/odoo/odoo-server
source odoo-venv/bin/activate
./odoo-bin -c /etc/odoo-server.conf
Step 12: Login and Access the Odoo Application
We can customize the database after finishing the Odoo installation by going to the administrator page. Open any web browser and type http://localhost:8069
or http://_ip_or_domain:8069
into it to do this. A master password used during installation, a database name, a username, a password of your choice, and some basic information for account creation will then be required.
You will be sent to the Odoo login page at the same address, http://localhost:8069
or http://_ip_or_domain:8069
, when the account has been created. Here, you can log in with the username and password you provided in the previous steps. You will then be able to access the home page. The Odoo setup is now finished, and you can add the applications of your choosing to the dashboard.
FAQs to Install Odoo 16 on Ubuntu 24.04
Is Odoo 16 compatible with Ubuntu 24.04?
Yes, Odoo 16 can be installed on Ubuntu 24.04, leveraging its performance and security features.
How do I configure Odoo to connect to PostgreSQL?
Edit the Odoo configuration file located at /etc/odoo.conf
to include your database connection details.
How do I access Odoo after installation?
Open a web browser and navigate to http://localhost:8069
.
Can I access Odoo remotely?
Yes, you need to configure your firewall and possibly set up a reverse proxy.
What should I do if a user forgets their password?
Use the "Reset Password" feature on the login page to send a reset link to the user.
Can I limit user access to certain modules?
Yes, you can configure access rights for users.
Conclusion
We hope this tutorial helped you understand how to install Odoo 16 on Ubuntu 24.04.
If you have any queries, please leave a comment below, and we’ll be happy to respond to them for sure.