Welcome, Odoo enthusiasts and Linux users! Are you ready to deploy the latest and greatest version of Odoo on a rock-solid, long-term support Ubuntu release? This guide will walk you through the entire Odoo 19 Ubuntu 24.04 Install process, ensuring you have a robust and functional enterprise resource planning (ERP) system up and running in no time. With Odoo 19 officially released and Ubuntu 24.04 LTS offering unparalleled stability, there’s never been a better time to get started.
This detailed tutorial is designed to be both persuasive, highlighting the benefits of a well-configured Odoo system, and a clear, step-by-step walkthrough. We’ll cover everything from essential package installations to database setup, virtual environments, dependency management, and even crucial PDF reporting configuration. By the end, you’ll have a fully operational Odoo 19 instance, ready to power your business operations.
For a visual walkthrough of this process, you can refer to the source video: https://www.youtube.com/watch?v=e-V1_Dm-BWc
Why Choose Odoo 19 on Ubuntu 24.04 LTS?
Odoo 19 represents the cutting edge of open-source ERP solutions, packed with new features, performance enhancements, and an even more intuitive user experience. Pairing it with Ubuntu 24.04 LTS (Noble Numbat) offers significant advantages:
- Stability and Security: Ubuntu LTS releases are known for their long-term support, providing five years of security updates and maintenance. This ensures your Odoo deployment remains stable and secure for an extended period.
- Performance: Both Odoo 19 and Ubuntu 24.04 come with optimizations that contribute to a faster, more responsive ERP environment.
- Community Support: Both platforms boast massive, active communities, meaning you’ll always find resources and help if you encounter any challenges.
- Flexibility: Odoo’s modular design allows you to customize and scale your system to fit specific business needs, from CRM and sales to accounting and manufacturing.
Embarking on an Odoo 19 Ubuntu 24.04 Install is an investment in a powerful, adaptable, and future-proof business management system. Let’s dive into the practical steps.
Prerequisites for a Smooth Odoo 19 Ubuntu 24.04 Install
Before we begin the installation, ensure you have the following ready:
- A Fresh Ubuntu 24.04 LTS Installation: While Odoo can be installed on existing systems, a clean installation minimizes potential conflicts and ensures a predictable environment.
- Root or Sudo Privileges: You’ll need administrative access to install packages and configure system settings.
Step 1: Prepare Your System – Essential Packages and PostgreSQL
The first crucial step in any Odoo 19 Ubuntu 24.04 Install is preparing the underlying operating system. Odoo relies on several core components, most notably PostgreSQL for its database and Git for source code management. Python’s package manager, pip, is also essential for handling Odoo’s Python dependencies.
Open your terminal and execute the following commands to update your package lists and install these fundamental tools:
sudo apt update
sudo apt install git postgresql python3-pip -y
sudo apt update: Refreshes your local package index, ensuring you’re getting the latest versions of software available in Ubuntu’s repositories.sudo apt install git postgresql python3-pip -y: Installs Git (for cloning Odoo’s source code), PostgreSQL (Odoo’s primary database server), andpython3-pip(Python’s package installer, crucial for Odoo’s libraries). The-yflag automatically confirms prompts, making the installation process smoother.
Step 2: Acquire the Odoo 19 Source Code
With Git installed, we can now download the Odoo 19 source code directly from GitHub. This is the official and recommended way to get the latest Odoo version.
Navigate to your home directory (or any preferred location for your Odoo projects) and clone the Odoo 19 repository:
cd ~
git clone --depth 1 --branch 19.0 https://github.com/odoo/odoo odoo
cd ~: Changes your current directory to your home directory.git clone ... odoo: This command instructs Git to download the Odoo source code.--depth 1: This optimizes the download by only fetching the latest commit history, making the cloning process much faster.--branch 19.0: Specifies that we want to clone the19.0branch, which contains the Odoo 19 codebase.https://github.com/odoo/odoo: The official GitHub repository for Odoo.odoo: This creates a new directory namedodooin your current location and places all the source code inside it.
You should now have an odoo directory in your home folder, containing all the necessary files for your Odoo 19 Ubuntu 24.04 Install.
Step 3: Configure PostgreSQL for Odoo 19
PostgreSQL is a powerful, open-source relational database system, and it’s the database of choice for Odoo. For Odoo to interact with PostgreSQL, we need to create a dedicated database user (role) that matches your Ubuntu system’s username. This simplifies authentication and avoids credential mismatches.
First, switch to the postgres user, which is the default administrative user for the PostgreSQL server:
sudo su - postgres
Next, access the PostgreSQL interactive terminal:
psql
Inside the psql prompt, create a new PostgreSQL role. Crucially, replace your_ubuntu_user with your actual Ubuntu username. This is vital for Odoo to automatically connect to the database later without needing explicit username/password configuration.
CREATE ROLE your_ubuntu_user WITH LOGIN SUPERUSER CREATEDB CREATEROLE;
CREATE ROLE your_ubuntu_user: Initiates the creation of a new database role with your specific Ubuntu username.WITH LOGIN: Allows this role to log in to the PostgreSQL server.SUPERUSER: Grants the role all database administrative privileges. While not strictly necessary for day-to-day Odoo operations, it simplifies the initial setup and database creation.CREATEDB: Allows the role to create new databases.CREATEROLE: Allows the role to create other roles.
After creating the role, exit the psql terminal and then exit the postgres user session to return to your normal Ubuntu user:
\q
exit
exit
To verify your PostgreSQL setup, you can try logging in with your new user:
psql -U your_ubuntu_user
If you see the psql prompt, your user is correctly configured. Type \q and press Enter to exit.
Step 4: Establish a Python Virtual Environment
A Python virtual environment is a best practice for any Python development or application deployment, including your Odoo 19 Ubuntu 24.04 Install. It creates an isolated environment where Odoo’s Python dependencies can be installed without conflicting with your system’s global Python packages or other Python projects. This prevents “dependency hell” and ensures Odoo runs with its specific requirements.
Navigate back to your home directory:
cd ~
Now, create the virtual environment. We’ll name it odoo19-env, but you can choose any name you prefer:
python3 -m venv odoo19-env
python3 -m venv: Uses Python’s built-invenvmodule to create a virtual environment.odoo19-env: The name of the directory where your virtual environment will be created.
Once created, you need to activate it. Activating the environment modifies your shell’s PATH variable so that python and pip commands refer to the executables within your virtual environment, not the system-wide ones:
source odoo19-env/bin/activate
You’ll notice your terminal prompt changes, usually displaying (odoo19-env) before your username, indicating that the virtual environment is active. You are now isolated and ready to install Odoo’s Python dependencies.
Step 5: Install Odoo’s Python Dependencies
Odoo, being a large application, relies on numerous Python libraries. These are listed in a file called requirements.txt within the Odoo source code directory. Installing these is a critical phase of the Odoo 19 Ubuntu 24.04 Install.
First, navigate into the Odoo source code directory:
cd ~/odoo
Now, use pip (which refers to the pip within your active virtual environment) to install all the dependencies listed in requirements.txt:
pip install -r requirements.txt
pip install -r requirements.txt: Reads therequirements.txtfile and installs each specified Python package and its sub-dependencies.
Troubleshooting Package Installation:
The installation process can sometimes hit a snag due to specific package versions or build requirements. The original tutorial notes issues with packages like xlwt and xlrd. If pip encounters errors:
- Check
requirements.txt: Open~/odoo/requirements.txtwith a text editor. If certain packages are causing issues, you might temporarily comment them out (by adding#at the beginning of the line) or remove them, especially if they are optional or have complex system-level dependencies. - Install
wheel: Thewheelpackage is often needed forpipto install pre-compiled binary packages efficiently. Runpip install wheelbefore retryingpip install -r requirements.txt. - Fix Broken System Packages: Sometimes underlying system-level issues can prevent
pipfrom installing correctly. Trysudo apt --fix-broken installto resolve any unresolved dependencies in your Ubuntu system.
Remember, patience and careful reading of error messages are key here. Once all dependencies are installed, your Odoo virtual environment is almost complete.
Step 6: Install the Essential psycopg2 Package
While many Python database connectors exist, psycopg2 is the robust and recommended Python adapter for PostgreSQL. It enables your Odoo application to effectively communicate with the PostgreSQL database. This step is particularly important for your Odoo 19 Ubuntu 24.04 Install to function correctly.
Even if requirements.txt lists it, sometimes installing it separately ensures all its underlying C libraries are properly linked.
pip install psycopg2-binary
psycopg2-binaryis often preferred for simpler installation as it includes pre-compiled binaries, avoiding the need for a C compiler and PostgreSQL development headers on your system.
After this, your Python environment should be fully prepared.
Step 7: Launch Odoo for the First Time
You’re now ready for the moment of truth: starting your Odoo 19 instance! This initial launch will allow Odoo to perform some self-configuration and set up the default database schema.
Make sure you are still in the ~/odoo directory and your virtual environment is active. Then, run the Odoo executable:
python odoo-bin
python odoo-bin: Executes the main Odoo server script.
The terminal will fill with logs as Odoo starts up. By default, Odoo runs on port 8069. Once the logs settle, indicating that the server is listening, open your web browser and navigate to:
http://localhost:8069
You should be greeted by the Odoo database creation screen. Congratulations! You’ve successfully initiated your Odoo 19 Ubuntu 24.04 Install.
Step 8: Configure Odoo with a Configuration File (Recommended)
While running Odoo directly from the command line is fine for initial tests, a configuration file (odoo.conf) offers a persistent and organized way to manage your Odoo server’s settings. It allows you to specify database parameters, addon paths, log file locations, and crucially, the admin password.
First, stop the currently running Odoo server by pressing Ctrl+C in your terminal.
Next, generate a default configuration file. The --stop-after-init flag is useful here as it starts Odoo, creates the file, and then immediately shuts down, without requiring you to manually stop it.
python odoo-bin --stop-after-init -c odoo.conf
This command creates an odoo.conf file in your ~/odoo directory. You can now open this file with a text editor (e.g., nano odoo.conf or code odoo.conf if you have VS Code) to review and modify its contents. Key parameters to look for include:
admin_passwd: The default isadmin. It is highly recommended to change this to a strong, unique password for security.db_host,db_port,db_user,db_password: Database connection details. For a local install, defaults are usually fine.addons_path: Specifies where Odoo should look for modules.
Once you’ve made your desired changes (especially the admin password), save the odoo.conf file.
Now, to run Odoo using this configuration file, execute:
python odoo-bin -c odoo.conf
This command tells Odoo to load its settings from the specified odoo.conf file.
Step 9: Configure Odoo in PyCharm (Optional, but Great for Developers)
For developers, integrating Odoo into an Integrated Development Environment (IDE) like PyCharm significantly enhances productivity through features like debugging, code completion, and version control integration. If you’re planning to customize or develop Odoo modules, this step is invaluable.
Assuming you have PyCharm Community Edition installed:
- Open Your Odoo Project:
- Launch PyCharm.
- Go to
File>Open...and select your~/odoodirectory. ClickTrust Projectif prompted.
- Configure Python Interpreter:
- Go to
File>Settings(orPyCharm>Preferenceson macOS). - Navigate to
Project: [Your Project Name]>Python Interpreter. - Click the gear icon (⚙️) and select
Add.... - Choose
Existing environment. - Browse to the Python executable within your virtual environment:
~/odoo19-env/bin/python. - Click
OKand thenApplyin the settings window. PyCharm will index the installed packages.
- Go to
- Create a Run Configuration:
- Go to
Run>Edit Configurations.... - Click the
+icon to add a new configuration and selectPython. - Name:
Odoo 19 Server(or similar). - Script path: Browse to
~/odoo/odoo-bin. - Parameters:
-c odoo.conf(This tells Odoo to use your configuration file). - Working directory: Browse to
~/odoo. - Click
Applyand thenOK.
- Go to
Now you can start, stop, and debug your Odoo server directly from PyCharm using the run/debug buttons, making the Odoo 19 Ubuntu 24.04 Install a developer-friendly setup.
Step 10: Create Your Odoo Database
After launching Odoo, whether via the command line or PyCharm, you’ll reach the database creation screen in your web browser (http://localhost:8069). This is where you finalize your Odoo 19 Ubuntu 24.04 Install by creating the actual database instance.
On this screen, you’ll need to provide:
- Database Name: Choose a unique and descriptive name (e.g.,
odoo_production_19). - Email: An administrator email (e.g.,
admin@yourcompany.com). - Password: The administrator password for this specific database. This is separate from the
admin_passwdinodoo.conf, which is for server-level access. Choose a strong password. - Country: Select your country.
- Load Demo Data: Check this box if you want sample data to explore Odoo’s features immediately. For a production environment, leave it unchecked.
- Click “Create database.”
The process will take a few minutes as Odoo initializes the database and installs core modules. Be patient, and avoid clicking multiple times, as this can lead to corrupted or duplicate database creation attempts, as noted in the source context. If you encounter issues like a “corrupted” database (often indicated by a yellow icon if it’s already there), you might need to drop the database via psql and try again. For developers, you might use -d <dbname> -i base (to install base modules) or -d <dbname> -i all (to install all modules).
Once complete, you’ll be redirected to the Odoo login page. Use the email and password you just set for your database.
Step 11: Resolve the WKHTMLtoPDF Issue (Crucial for Reporting)
One of the most common challenges during an Odoo 19 Ubuntu 24.04 Install is configuring WKHTMLtoPDF. This command-line tool is indispensable for Odoo to generate professional-looking PDF reports (like invoices, sales orders, and purchase orders). Without it, you’ll encounter errors when trying to print any document in Odoo.
The trickiest part is installing the correct version of wkhtmltox (the package name) that is compatible with your specific Ubuntu 24.04 LTS version. The Odoo documentation recommends a specific version, but sometimes an older, patched version works best.
- Download WKHTMLtoPDF:
Visit the official WKHTMLtoPDF download page: https://wkhtmltopdf.org/downloads.html.- IMPORTANT: Look for a version compatible with Ubuntu 24.04 (Noble Numbat). If 24.04 isn’t directly listed, a version for
jammy(22.04) orbionic(18.04) might work, but prioritizenobleif available. Choose theamd64.debpackage for 64-bit systems. For example, you might downloadwkhtmltox_0.12.6-1.jammy_amd64.debif a 24.04 specific one isn’t yet stable.
- IMPORTANT: Look for a version compatible with Ubuntu 24.04 (Noble Numbat). If 24.04 isn’t directly listed, a version for
- Install the .deb Package:
Navigate to yourDownloadsdirectory (or wherever you saved the file) and install it usingdpkg:cd ~/Downloads sudo dpkg -i wkhtmltox_0.12.6-1.jammy_amd64.deb # Replace with your downloaded filenameYou might encounter dependency errors during this step. If so, fix them with:
sudo apt --fix-broken install - Install Missing Fonts:
Often, WKHTMLtoPDF requires specific font packages to render reports correctly. Install these:sudo apt install fontconfig xfonts-75dpi -y - Verify Installation:
Check ifwkhtmltopdfis correctly installed and accessible:wkhtmltopdf --versionYou should see version information, ideally including “patched QT” indicating full functionality.
- Restart Odoo:
Stop your Odoo server (Ctrl+Cin the terminal or PyCharm) and restart it:python odoo-bin -c odoo.confNow, try printing a report from Odoo (e.g., go to Sales > Create a Sales Order > Confirm > Print > Order). The PDF should generate successfully! This marks a major victory in your Odoo 19 Ubuntu 24.04 Install.
Step 12: Increase Cron Job Limit (Optional, for Background Tasks)
Odoo uses “cron jobs” (scheduled actions) for various background tasks, like sending automated emails, processing tasks, or updating data. Sometimes, these tasks can be resource-intensive and exceed default time limits, causing Odoo to restart or tasks to fail with “limit exiting errors.”
To prevent this, you can increase the limit_time_real parameter in your odoo.conf file. This parameter defines the maximum real time (in seconds) a cron job is allowed to run.
Open ~/odoo/odoo.conf and add or modify the following line:
limit_time_real = 3600
limit_time_real = 3600: Sets the real-time limit for cron jobs to 3600 seconds (1 hour). You can adjust this value based on your server’s capacity and the complexity of your background tasks. Setting it to0would mean no limit, but this is generally not recommended as a runaway process could consume all resources.
Save the file and restart your Odoo server for the change to take effect. This small adjustment can significantly improve the stability of your Odoo 19 Ubuntu 24.04 Install for long-running operations.
Final Thoughts on Your Odoo 19 Ubuntu 24.04 Install
You have now successfully completed a comprehensive Odoo 19 Ubuntu 24.04 Install! From setting up the foundational Linux environment to configuring the database, managing Python dependencies in a virtual environment, and ensuring critical PDF reporting functionality, your Odoo 19 instance is ready to serve.
This robust setup provides a powerful platform for your business:
- Scalability: Odoo’s modular architecture allows you to add features as your business grows, from CRM to accounting, inventory, and more.
- Customization: The open-source nature means you can tailor Odoo to your exact workflows and business logic.
- Efficiency: Automate processes, streamline operations, and gain valuable insights from your data.
Remember to keep your system updated, regularly back up your database, and explore the vast array of Odoo modules available. For further learning on Odoo development and advanced configurations, consider checking out our other in-depth guides (simulated internal link) or the official Odoo documentation.
Your journey with Odoo 19 on Ubuntu 24.04 has just begun. Embrace the power of open-source ERP and transform your business operations today!
Discover more from teguhteja.id
Subscribe to get the latest posts sent to your email.

