How to Install Odoo 17 on Ubuntu 20.04 LTS Server

How to Install Odoo 17 on Ubuntu 20.04 LTS Server

ERP systems are rapidly becoming essential for business management across the globe. Odoo ERP stands out as one of the most widely adopted ERP solutions, boasting the largest global installation base. It is used by over 12 million users, ranging from small startups to large enterprises. A significant advantage of Odoo is that it is free and open-source, developed using Python and JavaScript, making it accessible and customisable for various business needs.

Odoo, also known as Open ERP, was founded by Fabien Pinckaers in 2005. The name Odoo stands for On-Demand Open Object. It offers a wide range of business applications and modules, including CRM, sales management, e-commerce, warehouse management, purchase management, accounting, manufacturing, and HRMS. These modules together form a comprehensive Enterprise Resource Planning (ERP) system.

In addition to its core modules, Odoo has over 14,000 third-party apps and plugins available in its app store, each tailored to meet specific user needs. Today, Odoo is one of the most widely used open-source ERP solutions in the market.

The increasing popularity of Odoo can be attributed to several key factors that make it stand out in the ERP market:

  • Open Source: Odoo’s open-source nature eliminates proprietary fees and recurring costs, making it accessible to businesses of all sizes. Its robust functionality makes it one of the top choices in the ERP market.
  • Flexibility: With Odoo, businesses can tailor their ERP system to their specific needs. Custom features and modules can be easily developed with the help of Odoo developers, ensuring that  the system aligns perfectly with business processes.
  • Scalability: Whether a business is small, medium, or large, Odoo can accommodate any number of users and adapt to changing organisational needs without compromising performance.
  • Rich App Ecosystem: Odoo boasts over 14,000 ready-made applications available in its app store, covering a wide range of business needs. This vast selection of apps allows businesses to quickly and easily enhance their ERP system with new functionalities.
  • Global Support: Odoo provides responsive support through its forum and mailing lists, ensuring that users have access to assistance and guidance whenever needed.
  • Proven Track Record: With over 12 million users worldwide, including renowned companies like Toyota, Hyundai, and PCI, Odoo has established itself as a trusted and reliable solution for business management.
  • User-Friendly Interface: Odoo offers a highly intuitive and user-friendly interface, allowing users to navigate the system with ease. Users can choose from standard themes or create custom themes to tailor the interface to their preferences.
  • Technological Innovation: Odoo stays up to date with the latest technological advancements, regularly releasing updates and upgrades to enhance performance and introduce new features. The latest versions, such as Odoo V16 and V17, incorporate the latest technological innovations to ensure optimal functionality. 
  • Modularity: Odoo’s modular architecture allows users to install only the modules they need, minimising resource usage and streamlining the system’s performance. Users can choose from a wide range of application modules to build a customised ERP solution tailored to their business requirements.
  • Seamless Integration: Odoo seamlessly integrates with third-party services, including SMS, social media, and e-commerce platforms, enabling businesses to connect and synchronise their ERP system with other essential tools and services.
  • Industry-Specific Modules: Odoo offers industry-specific modules tailored to the unique needs of various sectors, such as automotive, hospitality, healthcare, and retail. These specialised modules provide businesses with the tools they need to efficiently manage industry-specific processes and workflows.
  • Cost-Effective Implementation: Compared to traditional ERP systems, Odoo offers a lower implementation cost, making it an attractive option for businesses looking to maximise their return on investment.
  • Efficient Implementation Process: Odoo’s modular design and intuitive interface contribute to a faster implementation process, reducing the time frame required to deploy and configure the ERP system.
  • Overall, Odoo’s combination of flexibility, scalability, rich feature set, and user-friendly interface makes it a compelling choice for businesses seeking an effective and customisable ERP solution.

Now, let’s get started with the practical part. Here are the simple steps to install Odoo ERP 17 on an Ubuntu 20.04 LTS server, ensuring you can set up and run this powerful ERP system efficiently. 

Odoo 17 brings improved performance, an enhanced user interface, and new functionalities. It requires PostgreSQL and Python 3.10 for its database management system. This blog provides a step-by-step guide to installing Odoo 17 on an Ubuntu 20.04 LTS server. 

Now, connect through SSH to the server. 

You can prevent SSH attacks by using Fail2ban.

First, install pip3 for Python packages:

Next, install web dependencies and other required packages:

Install npm and configure node.js:

PostgreSQL is the preferred database server for Odoo. Install PostgreSQL:

Then, create a user to manage the Odoo database:

After creating the user, grant superuser access rights:

Exit PostgreSQL:

Create a system user specifically for Odoo:

This user will have limited access to Odoo’s files and directories for security purposes.

Now, we need to bring the Odoo source files to our server. First, we’ll make sure we have Git installed. Git is a tool that helps us manage and share code.

To install Git, we’ll run the following command:

Once Git is installed, switch to the Odoo17 system user. This user is created specifically for running Odoo and has limited access to system resources for security.

Use this command to switch to the Odoo17 user:

Now, you are in the Odoo17 user’s environment. Here comes the interesting part! You will have to use Git to fetch the Odoo source code. By running this command:

You are actually telling Git to grab the Odoo source code from its repository on GitHub. The –depth 1 option tells Git to only get the latest version, which helps save time and space. You need to specify the branch we want (17.0 for Odoo 17), and –single-branch ensures that only that branch is downloaded.

The dot . at the end of the command indicates that we want to clone the source code into the current directory, which is the home directory of the Odoo17 user (/opt/odoo).

Once the cloning process is complete, you are all set. We can now log out of the Odoo17 user’s environment:

Now, you are ready to move forward with the installation of Odoo 17 on our server. 

Now, you need to install the Python packages that Odoo relies on to work smoothly. These packages contain all the necessary tools and libraries that Odoo needs to run effectively. You can do this by running the following command:

This command tells the system to use pip3, the Python package manager, to install all the packages listed in the requirements.txt file located in the Odoo directory (/opt/odoo). Once the installation is complete, Odoo will have all the Python tools it needs to function properly.

In Odoo, you often need to generate PDF reports from our data. To do this, use a tool called Wkhtmltopdf. This tool converts HTML files into PDFs, making it easy to print reports directly from Odoo. Here’s how to install it:

These commands download the Wkhtmltopdf package from the internet and install it on our system. Once installed, Odoo will be able to generate PDF reports without any issues.

Odoo needs some essential information to run smoothly, such as the database user, password, and locations of add-ons. This information is stored in a configuration file. Let’s create and configure this file now:

First, copy the example configuration file provided by Odoo to the desired location (/etc):

Then, open the configuration file in a text editor:

Inside this file, you’ll need to update certain parameters according to your setup. Here’s an example of how the configuration file should look:

Make sure to replace the placeholder values with the actual information relevant to your setup.

After configuring the file, ensure that the Odoo17 user has access to it:

Finally, create a directory for Odoo logs and set the appropriate permissions:

These steps will ensure that Odoo has access to the necessary configuration and log files, enabling it to run smoothly on your system.

To ensure that Odoo runs smoothly and automatically starts up with your server, we need to create a service file. This file tells the system how to manage the Odoo process. Here’s how to create and configure the service file:

Open a text editor to create the service file:

Inside the editor, add the following lines to the newly created service file:

These lines specify the description of the service, its documentation, the user under which Odoo will run (in this case, ‘odoo17’), and the command to start Odoo using the configuration file we created earlier.

Save the file and exit the text editor.

Set the correct permissions for the service file:

This ensures that the system can read and execute the service file correctly.

Now that the service file is set up, you can start the Odoo service using the following command:

sudo systemctl start odoo17.service

To check the status of the service and ensure that Odoo is running properly, use:

You can access Odoo by entering the following URL in your web browser:

If you encounter any issues during installation or operation, you can examine the Odoo logs for troubleshooting. Use this command to view real-time logs in the terminal:

To ensure that Odoo starts automatically whenever the server restarts, enable the service with:

If you make any modifications to the Odoo add-ons, restart the Odoo service to reflect the updates:

So now you have successfully installed Odoo ERP and can now explore its capabilities. You can further get to know more about Odoo and its benefits for your business by getting in touch with our Odoo experts at Envertis, an official Odoo gold partner in Sydney.

Envertis - CTA