Installing Odoo 18 on Ubuntu 24.04 LTS (Noble Numbat) provides a rock-solid foundation for your business management system. This guide will walk you through a production-ready installation that leverages the stability and long-term support of Ubuntu's latest LTS release.
Why Ubuntu 24.04 LTS for Odoo 18?
Ubuntu 24.04 LTS, released in April 2024, offers:
- 5 years of free security updates (until April 2029)
- Enhanced performance with the latest kernel optimizations
- Improved security features out of the box
- Better hardware compatibility for modern servers
- Long-term stability perfect for production environments
Combined with Odoo 18's powerful features, this creates an ideal business management platform.
Prerequisites
Before we begin, ensure you have:
- Ubuntu 24.04 LTS Server (fresh installation recommended)
- Root or sudo access to your server
- Minimum 4GB RAM (8GB+ recommended for production)
- At least 20GB free disk space
- A stable internet connection
Step 1: Update Your Ubuntu 24.04 System
Start by ensuring your system is fully updated:
sudo apt update && sudo apt upgrade -y sudo apt autoremove -y
Step 2: Install PostgreSQL Database Server
Odoo requires PostgreSQL as its database backend. Ubuntu 24.04 comes with PostgreSQL 16, which is perfect for Odoo 18:
sudo apt install postgresql postgresql-contrib -y
Verify PostgreSQL is running:
sudo systemctl status postgresql
You should see "active (running)" in the output.
Step 3: Create PostgreSQL User for Odoo
Create a dedicated database user for Odoo:
sudo su - postgres createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo18
When prompted, enter a strong password for the database user. Remember this password!
Exit the postgres user:
exit
Step 4: Install Python 3 and Dependencies
Ubuntu 24.04 comes with Python 3.12, which is compatible with Odoo 18. Install Python and required packages:
sudo apt install python3-dev python3-pip python3-wheel python3-venv -y
Install essential build dependencies:
sudo apt install build-essential libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev \ libssl-dev libffi-dev libmysqlclient-dev libjpeg-dev libpq-dev libjpeg8-dev \ liblcms2-dev libblas-dev libatlas-base-dev libopenjp2-7 libtiff6 \ libfreetype6-dev libharfbuzz-dev libfribidi-dev libxcb1-dev -y
Step 5: Install Node.js and npm
Odoo requires Node.js for processing frontend assets. Install Node.js 20.x (LTS):
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - sudo apt install nodejs -y
Install required npm packages:
sudo npm install -g rtlcss sudo npm install -g less less-plugin-clean-css
Step 6: Install wkhtmltopdf
For PDF report generation, install wkhtmltopdf:
sudo apt install wkhtmltopdf -y
Step 7: Create Odoo System User
Create a dedicated system user for running Odoo:
sudo useradd -m -d /opt/odoo18 -U -r -s /bin/bash odoo18
Step 8: Install Odoo 18 from Source
Switch to the odoo18 user and clone the repository:
sudo su - odoo18 git clone https://www.github.com/odoo/odoo --depth 1 --branch 18.0 /opt/odoo18/server exit
Step 9: Create Python Virtual Environment
Set up a Python virtual environment for Odoo:
sudo su - odoo18 cd /opt/odoo18 python3 -m venv odoo-venv source odoo-venv/bin/activate
Upgrade pip and install wheel:
pip install --upgrade pip pip install wheel
Install Odoo dependencies:
pip install -r /opt/odoo18/server/requirements.txt deactivate exit
Step 10: Create Odoo Configuration File
Create the configuration directory:
sudo mkdir /etc/odoo18 sudo nano /etc/odoo18/odoo.conf
Add the following configuration (adjust passwords):
[options] ; Security admin_passwd = StrongAdminPassword2024! ; Database db_host = False db_port = False db_user = odoo18 db_password = your_postgresql_password ; Paths addons_path = /opt/odoo18/server/addons,/opt/odoo18/custom_addons data_dir = /opt/odoo18/.local/share/Odoo ; Logging logfile = /var/log/odoo18/odoo.log log_level = info ; Performance (adjust based on your server) workers = 4 max_cron_threads = 2 limit_memory_hard = 2677721600 limit_memory_soft = 2147483648 limit_time_cpu = 600 limit_time_real = 1200 ; Network xmlrpc_port = 8069 longpolling_port = 8072
Important: Replace passwords with your own secure passwords!
Step 11: Create Required Directories
Create directories for logs and custom addons:
sudo mkdir /var/log/odoo18 sudo chown odoo18:odoo18 /var/log/odoo18 sudo su - odoo18 mkdir /opt/odoo18/custom_addons exit
Step 12: Create Systemd Service
Create a systemd service file for automatic startup:
sudo nano /etc/systemd/system/odoo18.service
Add the following content:
[Unit] Description=Odoo 18 Enterprise Resource Planning Documentation=https://www.odoo.com/ After=network.target postgresql.service [Service] Type=simple User=odoo18 Group=odoo18 ExecStart=/opt/odoo18/odoo-venv/bin/python3 /opt/odoo18/server/odoo-bin -c /etc/odoo18/odoo.conf KillMode=mixed KillSignal=SIGTERM StandardOutput=journal+console [Install] WantedBy=multi-user.target
Step 13: Set File Permissions
Ensure correct ownership and permissions:
sudo chown -R odoo18:odoo18 /opt/odoo18/ sudo chmod -R 755 /opt/odoo18/ sudo chown odoo18:odoo18 /etc/odoo18/odoo.conf sudo chmod 640 /etc/odoo18/odoo.conf
Step 14: Start and Enable Odoo Service
Start the Odoo service:
sudo systemctl daemon-reload sudo systemctl enable odoo18.service sudo systemctl start odoo18.service
Check the service status:
sudo systemctl status odoo18.service
Step 15: Configure Ubuntu 24.04 Firewall
Ubuntu 24.04 uses UFW (Uncomplicated Firewall). Configure it:
sudo ufw allow 22/tcp sudo ufw allow 8069/tcp sudo ufw allow 8072/tcp sudo ufw enable
Step 16: Access Your Odoo Installation
Open your web browser and navigate to:
http://your_server_ip:8069
You'll see the Odoo database creation page. Fill in:
- Master Password: The admin password from your configuration
- Database Name: Choose a name (e.g., "mycompany")
- Email: Your admin email
- Password: Your user password
- Language: Select your preferred language
- Country: Your country
- Phone Number: Optional
Click "Create Database" and wait for the process to complete.
Troubleshooting Common Issues
Issue 1: Service Won't Start
Check the logs:
sudo journalctl -u odoo18.service -n 50 sudo tail -f /var/log/odoo18/odoo.log
Issue 2: Database Connection Error
Verify PostgreSQL user and password:
sudo -u postgres psql \du \q
Issue 3: Module Import Errors
Ensure all dependencies are installed:
sudo su - odoo18 source /opt/odoo18/odoo-venv/bin/activate pip install -r /opt/odoo18/server/requirements.txt
Issue 4: Permission Denied Errors
Reset permissions:
sudo chown -R odoo18:odoo18 /opt/odoo18/ sudo chown -R odoo18:odoo18 /var/log/odoo18/
Performance Optimization Tips
1. Calculate Workers
For production, use this formula:
- Workers = (CPU cores * 2) + 1
- Example: 4 CPU cores = 9 workers
2. Monitor Resource Usage
Check Odoo's resource consumption:
htop sudo systemctl status odoo18
3. Database Maintenance
Run monthly maintenance:
sudo su - postgres vacuumdb --all --analyze-in-stages reindexdb --all
Security Best Practices
1. Change Default Passwords
Always use strong, unique passwords for:
- Master password (admin_passwd)
- Database user password
- System user password
2. Restrict Database Manager
For production, add to configuration:
list_db = False
3. Regular Updates
Keep your system updated:
# System updates sudo apt update && sudo apt upgrade -y # Odoo updates sudo systemctl stop odoo18 sudo su - odoo18 -c "cd /opt/odoo18/server && git pull" sudo su - odoo18 -c "source /opt/odoo18/odoo-venv/bin/activate && pip install -r /opt/odoo18/server/requirements.txt --upgrade" sudo systemctl start odoo18
Next Steps
Now that Odoo 18 is running on Ubuntu 24.04 LTS:
- Configure Email: Set up outgoing mail servers in Settings
- Install Apps: Browse and install the modules you need
- Create Users: Set up user accounts with appropriate permissions
- Customize: Configure company details, accounting settings, etc.
- Set Up Backups: Implement a regular backup strategy
- Consider Nginx: For production, set up Nginx as a reverse proxy (see our next guide)
- Implement SSL: Secure your installation with HTTPS (covered in our SSL guide)
Conclusion
Congratulations! You've successfully installed Odoo 18 on Ubuntu 24.04 LTS. This setup provides a solid foundation for your business management needs. The combination of Ubuntu's LTS stability and Odoo's powerful features creates a reliable platform that can grow with your business.
Remember to:
- Keep your system updated
- Monitor performance regularly
- Implement proper backups
- Follow security best practices
In our next guides, we'll cover setting up Nginx as a reverse proxy and implementing SSL certificates for secure HTTPS access.
Happy Odoo-ing!
Last updated: July 2025 | Tested on Ubuntu 24.04 LTS with Odoo 18.0