Introduction
This guide is intended for developers who want to set up the latest Odoo 19.4 SaaS branch on Ubuntu 22.04 for local development. Unlike production deployment guides, this tutorial focuses on creating a development environment using Python virtual environments, PostgreSQL, Git, and custom addons.
Prerequisites
20 GB of disk space — for Odoo source, PostgreSQL data, and the filestore. Plan for more if you expect heavy attachment uploads.
Install System Dependencies
Odoo 19.4 SaaS requires Python 3.12. Since Ubuntu 22.04 ships with Python 3.10, we'll install Python 3.12 from the Deadsnakes PPA.
This guide uses PostgreSQL 16, which is fully compatible with Odoo 19.4 SaaS.
Update the system
sudo apt update && sudo apt upgrade -y
Install Python and build tools
Ubuntu 22.04 ships with Python 3.10, which is too old for Odoo19.4 Saas. If you are on 22.04, add the deadsnakes PPA:
sudo apt install -y software-properties-common
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt update
sudo apt install -y python3.12 python3.12-venv python3.12-dev
sudo apt install -y build-essential libxml2-dev libxslt1-dev \
libevent-dev libpq-dev libldap2-dev libsasl2-dev \
libssl-dev libjpeg-dev libfreetype6-dev zlib1g-dev \
libffi-dev git wget curl
Install PostgreSQL 16
# Add the official PostgreSQL repository
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt update
sudo apt install -y postgresql-16
sudo systemctl status postgresql
Create a PostgreSQL User
Create a new database user using the steps provided. Assign a password to this user and make sure to store it securely, as you’ll need it later when setting up the configuration file.
sudo su - postgres
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo19
psql
ALTER USER odoo19 WITH SUPERUSER;
\q
exit
Install wkhtmltopdf
# Download the patched wkhtmltopdf (0.12.6.1 for amd64)
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb
# Install it (will pull in dependencies automatically)
sudo apt install -y ./wkhtmltox_0.12.6.1-3.jammy_amd64.deb
wkhtmltopdf --version
# Expected: wkhtmltopdf 0.12.6 (with patched qt)
Install Node.js
sudo apt install -y nodejs npm
sudo npm install -g rtlcss
Install Odoo from Source
The Odoo 19.4 saas Community source code is available on Odoo's GitHub repository. Run the following command to clone the Odoo code into a directory named odoo19.4 in your home folder:
mkdir ~/odoo-dev
cd ~/odoo-dev
git clone https://www.github.com/odoo/odoo --depth 1 --branch saas-19.4 --single-branch odoo19.4
Create a virtual environment and install Python dependencies
Using a Python virtual environment isolates Odoo's dependencies from the system Python, making upgrades and multiple Odoo installations much easier to manage.
cd odoo19.4
python3.12 -m venv venv-odoo-19.4
source venv-odoo-19.4/bin/activate
Install Required Python Packages
Odoo requires multiple Python packages specified in the requirements.txt file within the odoo19.4 directory. Install them by running the following command in the terminal:
pip3 install -r requirements.txt
If there are no errors, you can run the following command to confirm that all dependencies specified in requirements.txt have been installed correctly.
pip3 list
Some packages may fail to build because of missing system libraries or temporary package conflicts. If this happens, note the package name, install any required system dependencies, and retry the installation.
pip3 install requirement_name
If you encounter errors during the installation of a package - psycopg2, run the following command to install a compatible alternative package.
pip3 install psycopg2-binary
Start Odoo and Create Your First Database
Add a configuration file
sudo nano odoo19.4.conf
Example configuration:
[options]
admin_passwd = admin
db_host = localhost
db_port = 5432
db_user = odoo19
db_password = your_password
addons_path = /home/username/odoo-dev/odoo19.4/addons
Note: Replace your_password with the PostgreSQL password you created earlier. If your Odoo directory is in a different location, update the addons_path accordingly.
Start Odoo
python3.12 odoo-bin -c odoo19.4.conf
Create Your First Database
- Open http://localhost:8069 in your web browser.
- Create a new database.
- Log in using the administrator account.
- Enable Developer Mode from Settings → Developer Tools.
- Install a sample application to verify the installation.
- Print a PDF report (such as a quotation or invoice) to confirm that wkhtmltopdf is working correctly.