Odoo is a powerful and versatile open-source ERP (Enterprise Resource Planning) platform that offers a wide range of business applications, from CRM and inventory management to accounting and human resources. With the release of Odoo 18, users can expect improved features, performance enhancements, and new tools to streamline business operations.
In this guide, we’ll walk you through the step-by-step process of installing Odoo 18 Community Edition (CE) on Ubuntu 24.04 LTS. Ubuntu’s Long-Term Support (LTS) version ensures a stable and secure foundation for hosting your ERP system. We’ll also show you how to configure Odoo with Nginx as a reverse proxy and SSL encryption via Let's Encrypt to secure your platform for production use.
Whether you’re setting up Odoo for your internal business needs or deploying it for a client, this guide will help you with every step—from preparing your server to troubleshooting common issues.
By the end of this guide, you will have a fully functional Odoo 18 CE instance running on Ubuntu, accessible via a secure HTTPS connection. This ensures a modern, scalable, and efficient environment that can grow with your business. Let’s get started!/
Prerequisites
Before starting the installation of Odoo 18 CE on Ubuntu 24.04 LTS, make sure you have the following prerequisites in place:
Server Requirements
- Operating System: Ubuntu 24.04 LTS (64-bit)
- CPU: At least 2 vCPUs (4+ vCPUs recommended for production)
- RAM: Minimum 2 GB (4-8 GB recommended for smooth performance)
- Storage: At least 20 GB free disk space
User Access
- A non-root user with sudo privileges.
- SSH access to the server if working remotely.
- A domain/subdomain if you want to access your Odoo instance via the web.
- Point the domain/subdomain to your server’s IP address (A or CNAME DNS record).
- Python 3.10+
- PostgreSQL (version 15 or higher) as the database backend.
- Nginx as the reverse proxy (for production setup).
- pip and Python virtual environment tools.
- Certbot (for obtaining SSL certificates from Let's Encrypt).
- Git for pulling Odoo source code.
SSL Certificate (for HTTPS)
- Use Let’s Encrypt SSL certificates (free) or purchase an SSL certificate from a trusted provider for your domain.
- Ensure port 80 (HTTP) and 443 (HTTPS) are open for SSL setup.
- Port 8069: Default Odoo web interface port.
- Port 80: HTTP (for Let’s Encrypt SSL challenge).
- Port 443: HTTPS (for secure access).
- Familiarity with the Linux command line.
- Basic understanding of PostgreSQL for database management.
- Knowledge of web servers (Nginx) and SSL configuration.
Step 1: Update the Package List and Upgrade Installed Packages
Ensure you have the latest packages installed.
Step 2: Install Python 3 and Required Development Libraries
Odoo is a Python-based application, and its installation requires certain Python libraries and development tools to ensure it functions properly. This step focuses on installing Python 3, the package manager pip, and the essential libraries required for Odoo.
Step 3: Install Node.js and Less Plugins
Odoo uses Node.js for managing assets and stylesheets, which are essential for the front-end of the application. This step ensures that Node.js and the necessary Less plugins are installed and properly configured.
Some software may expect Node.js to be accessible via the command node. This command ensures that when the software calls node, it points to the correct executable.
Before running this command, it is recommended to check if npm is already installed by running npm -v. If npm is not found, proceed to install it.
Installing Less and its plugins allows Odoo to compile and optimize stylesheets, which enhances the front-end performance and appearance of the application:
The node-less package allows Odoo to process Less files during the asset management phase, ensuring that the styles are correctly applied to the web interface.
Step 4: Install PostgreSQL and Create a Database User
In this step, we will install PostgreSQL, the relational database management system (RDBMS) required by Odoo to store and manage data. We’ll also create a new database user that Odoo will use to connect to PostgreSQL.
First, we need to install PostgreSQL using the package manager. Run the following command:
To manage PostgreSQL databases and users, we need to switch to the dedicated system user, postgres. This user is automatically created during PostgreSQL installation.
We need to create a new PostgreSQL user specifically for Odoo. This user will be used by Odoo to connect to the database. Use the following command to create the user:
Once you run this command, you will be prompted to enter and confirm a password for the odoo18 user. Ensure you remember the password, as it will be required when configuring Odoo later in step 8.
After creating the new PostgreSQL user, exit the postgres session and return to your regular user by typing:
Step 5: Create a System User and Install Git
We’ll create a user to manage Odoo and install Git to download the source code.
This command establishes a dedicated user account to manage Odoo. Using a separate user for applications enhances security and ensures that the application has the appropriate permissions to access its files.
Git is essential for downloading the Odoo source code from its GitHub repository. It allows for easy updates and version management.
Switching to the odoo18 user allows us to perform operations with the permissions and environment settings associated with that user, which is necessary for managing Odoo.
This command downloads the latest version of Odoo's source code, which is necessary for installation and setup.
After cloning the repository, this command exits the odoo18 user shell, returning to the previous user session.
Step 6: Set up a Python Virtual Environment for Odoo
This command installs the python3-venv package, which is necessary for creating virtual environments in Python 3. By isolating dependencies, we can prevent conflicts with other Python projects or system packages.
Installing the Python Virtual Environment Package:
Creating a Python Virtual Environment:
Activate the virtual environment and install the required dependencies.
Switching to Root User
Changing to the Odoo Directory: Navigating to the Odoo directory ensures that the next commands are executed in the correct context, particularly for activating the virtual environment.
Activating the Virtual Environment: Activating the virtual environment modifies the shell's prompt and sets the Python interpreter to the one in the virtual environment. This means that any Python packages installed while this environment is active will only affect this environment.
Installing Required Python Packages: This command installs all the necessary dependencies required for Odoo to function correctly, as specified in the requirements.txt file. This file typically contains a list of libraries that Odoo depends on. Make sure you have the requirements.txt file in the /opt/odoo18/ folder. If not you can change the directory and run the command:
Deactivating the Virtual Environment
Step 7: Install wkhtmltopdf for PDF Reports
In this step, we will install wkhtmltopdf, a tool that allows Odoo to generate PDF reports. This is essential for generating printable documents like invoices, quotations, and other reports within Odoo. The installation involves downloading necessary packages and resolving dependencies.
Download wkhtmltopdf Package: This command downloads the wkhtmltopdf package, which is required for generating PDF reports in Odoo.
Download OpenSSL Dependency: This command downloads the OpenSSL library package, which is a necessary dependency for wkhtmltopdf to function correctly.
Install OpenSSL Dependency: This command installs the OpenSSL library, resolving the dependency required by wkhtmltopdf.
Install Additional Font Packages: This command installs the xfonts-75dpi package to ensure that wkhtmltopdf has access to the necessary font resources for rendering PDFs properly.
Install wkhtmltopdf Package: This command installs the wkhtmltopdf package, enabling Odoo to generate PDF reports.
Fix Missing Dependencies: This command resolves any missing dependencies that may not have been installed during the previous steps. It ensures that all necessary packages are properly configured, allowing wkhtmltopdf to function as intended.
Step 8: Configure Odoo 18
In this step, we will configure Odoo by creating a configuration file that specifies various settings needed for the application to run correctly. Proper configuration ensures that Odoo can connect to the database, manage add-ons, and log activity.
Copy the Default Configuration File: This command copies the default Odoo configuration file to a new location where Odoo will read its settings.
Edit the Configuration File: This command opens the copied configuration file for editing, allowing you to customize the settings based on your requirements.
Sample Configuration Settings
This section configures Odoo to connect to the PostgreSQL database with the specified user and password, manages add-ons, and sets up logging.
After opening the file in Nano, you will add the following configuration options:
Set Correct Permissions on the Configuration File: This command ensures that only the odoo18 user has ownership of the configuration file, enhancing security.
Restrict Access to the Configuration File: This command secures the configuration file by restricting access to only the odoo18 user and the group, preventing unauthorized access.
Create a Directory for Odoo Logs: This command creates a dedicated directory for Odoo log files, helping to organize logs and maintain system clarity.
Set Ownership of the Log Directory: This command ensures that the odoo18 user has ownership of the log directory, allowing Odoo to write logs without permission issues.
Step 9: Create a Systemd Service for Odoo 18 CE
In this step, we will create a Systemd service file for Odoo 18. This service file allows Odoo to run as a service on the system, making it easier to manage its lifecycle, such as starting, stopping, and enabling the service to start on boot.
Create and open the service file in nano editor: This command creates a new service configuration file for Odoo, which will define how the Odoo application is managed as a service.
In the opened Nano editor, you will enter the following configuration: This configuration defines how Odoo will run as a service, including the user under which it runs, the command to start it, and the context in which it operates.
Reload the Systemd Daemon
Start the Odoo Service: This command starts the Odoo service, allowing it to run in the background.
Enable the Odoo Service to Start on Boot: This command ensures that the Odoo service will start automatically whenever the server boots up, allowing for continuous operation without manual intervention.
Step 10: Verify Odoo Service
In this step, we will confirm that the Odoo service we configured and started in the previous steps is running correctly. This verification ensures that Odoo is operational and accessible through the web interface.
Check if Odoo is running correctly.
Output Information
When you run the command, you will see output similar to the following:
After verifying that the service is running, you can access Odoo through your web browser at: http://your_IP_address:8069
Accessing Odoo
- Open a Web Browser: Use any web browser (e.g., Chrome, Firefox).
- Enter the URL: Type the full URL (e.g., http://192.168.1.100:8069) into the browser's address bar and press Enter.
- Odoo Login Page: If everything is configured correctly, you should see the Odoo login page. Here, you can enter your credentials (such as the admin password specified in the configuration) to access the Odoo interface.
Troubleshooting Tips
If the Odoo service is not running or you cannot access the web interface, consider the following steps:
- Check Logs: Review the Odoo log file specified in the configuration (/var/log/odoo/odoo18.log) for error messages or warnings that may indicate what went wrong.
Restart the Service: If the service is inactive or not running, you can try restarting it:
Recheck Configuration: Ensure that the configuration file (/etc/odoo18.conf) contains the correct settings and that the database user has the necessary permissions.
Firewall Settings: If you cannot access the web interface, check the server's firewall settings to ensure that port 8069 is open:
Step 11: Install and Configure Nginx
In this step, we will install and configure Nginx as a reverse proxy for Odoo. This setup allows Nginx to manage incoming web requests, route them to the Odoo application, and handle various web server functionalities like SSL termination and load balancing.
This command installs Nginx, which will serve as a web server and reverse proxy for Odoo.
Allow Nginx through the Firewall: This command configures the firewall to allow traffic to and from the Nginx web server, enabling users to access Odoo over the internet.
Create a server block for your domain: This command creates a new Nginx configuration file for your specific domain, allowing you to set up a server block.
Nginx Configuration: Once you have the configuration file open, you will need to add the following code:
This configuration allows Nginx to act as a reverse proxy, directing traffic from your domain to the Odoo application while maintaining important header information.
Enable the configuration and test Nginx: This command enables the server block by linking it from the available sites directory to the enabled sites directory, making it active.
Test Nginx Configuration: This command checks the Nginx configuration to ensure there are no syntax errors or issues before reloading the server.
Output
Restart Nginx:
Secure Nginx with SSL (Optional): For production environments, it is highly recommended to secure your Nginx server with SSL certificates. You can use tools like Let's Encrypt to obtain free SSL certificates for your domain.
Check Logs: After setting up and restarting Nginx, you can check the access and error logs to verify that requests are being processed correctly:
Step 12: Set Up SSL with Certbot
In this step, we will secure your Odoo instance by installing an SSL certificate using Certbot. SSL encrypts the connection between the user’s browser and your server, making it safe to transmit sensitive data. Certbot is a free and open-source tool that automates the process of obtaining and installing SSL certificates from Let's Encrypt.
Install Certbot and its Nginx plugin: This command installs Certbot along with the Nginx plugin, which simplifies the process of applying SSL certificates to websites hosted by Nginx.
Obtain and install the SSL certificate: This command requests a new SSL certificate from Let's Encrypt for your domain and automatically configures Nginx to use it.
Follow the Prompts
During the Certbot process, you will be prompted to:
- Agree to the Terms of Service: Certbot will ask if you accept Let's Encrypt’s terms.
- Provide a Contact Email: Certbot uses this email to send reminders when your certificate is about to expire.
- Enable HTTPS Redirection: You will be asked whether you want to redirect all HTTP traffic to HTTPS.
- Choosing Yes ensures that any user accessing your site via http:// will be automatically redirected to https://.
Additional Steps
Renewal of Certificates:
Let's Encrypt certificates are valid for 90 days. Certbot installs a renewal cron job by default, which checks for renewal twice daily. You can also manually test the renewal process:
View Certificate Information:
You can see the installed certificates with:
Step 13: Access Odoo via Domain
You can now access your Odoo instance via: https://your_domain_here
If you come till here then Congratulations! You’ve successfully installed Odoo 18 Community Edition on Ubuntu 24.04 LTS with a web server and SSL. You are now ready to configure your Odoo instance, create databases, and start managing your business with Odoo’s powerful ERP features.
Feel free to contact us if you face any issue with the installation process. We help business to successfully implement Odoo ERP and customize it for their business needs.
In Ariyes Online, we implement Odoo ERP and streamline your business processes with customized solutions, seamless integrations, and ongoing support to ensure your success.
Contact us for a personalized meeting