Do you plan on installing or upgrading to Odoo 20? In that case, it is very important that your server configuration meets all the prerequisites regarding software, database, and reporting engines. Correctly setting up your configuration will provide you with reliable performance and ease of use, which will also allow you to scale in the future. Here in this blog, I will discuss the prerequisites for Odoo 20.
1. Understanding Odoo 20 System Requirements
Odoo 20 demands some specific software versions to work properly. The key ones include: Python 3.12–3.14, PostgreSQL 16 or later version, and a correct PDF reporting engine.
Below is a short description of those modules:
| Component | Requirement |
| Python | 3.12 to 3.14 |
| PostgreSQL | Version 16 or later |
| pgvector | Required for Enterprise AI retrieval-augmented generation (RAG) |
| PDF reporting engine | wkhtmltopdf or paper-muncher 0.6+ |
| Python dependencies | Packages specified in the Odoo source's requirements.txt |
This should be confirmed prior to initiating a new installation or upgrading to production.
2. Python Versions Supported by Odoo 20
Python is one of the core dependencies for Odoo. Odoo 20 supports Python versions 3.12 to 3.14, where the version ranges are specified in the Odoo sources.
Unsupported versions of Python may prevent Odoo from starting and may cause dependency incompatibility issues.
Python recommendations
- Python versions older than 3.12 are unsupported.
- Python 3.12 is a suitable minimum for many currently existing long-term support Linux distributions.
- Python 3.13 and 3.14 belong to the supported version range; however, dependency compatibility must be checked.
- Python installation must be done in a separate virtual environment to keep Odoo dependencies separate from system dependencies.
Checking and creating a Python environment
Check the installed Python version:
python3 --version
Create a virtual environment:
python3 -m venv /opt/odoo/venv
Verify the interpreter:
/opt/odoo/venv/bin/python -c "import sys; print(sys.version)"
In case your OS comes with an older Python version, get yourself a compatible Python version from the right package source, including backports from the distribution, pyenv, or container images. Do not replace the Python version installed by the OS.
3. PostgreSQL Requirements
The PostgreSQL database management system is the one that Odoo uses to store the company data, including customer details, sales order data, invoice data, and inventory information, among other application data.
Odoo 20 needs PostgreSQL 16 or above. The minimum required version is set in Odoo source code using MIN_PG_VERSION.
While a PostgreSQL version below the required version could result in a warning rather than stop the startup process, it should not be used in production.
PostgreSQL configuration recommendations
For a reliable setup:
- Use PostgreSQL version 16 or later if possible.
- Create a special role in the PostgreSQL server for Odoo with CREATEDB permissions when needed.
- Don't use a PostgreSQL superuser role in ordinary cases for Odoo.
- Use UTF-8 encoding for your databases.
- Install PostgreSQL on the same server as Odoo or connect it with minimal latency from there.
A properly configured database system becomes vital in scenarios where the number of users and business transactions increases.
4. Installing pgvector for Enterprise AI Features
The pgvector is an extension that must be installed if you need to use RAG features provided by the Enterprise AI module.
In case you have a Community-only installation that does not utilize AI capabilities, the pgvector extension is not needed.
pgvector Installation
On Debian or Ubuntu systems where PGDG repositories are used for PostgreSQL installation, install the package according to your version of PostgreSQL:
sudo apt install postgresql-16-pgvector
Enable the extension in the required database:
psql -d mydb -c "CREATE EXTENSION IF NOT EXISTS vector;"
Verify the installed extension version:
sudo -u postgres psql -d mydb \
-c "SELECT extversion FROM pg_extension WHERE extname = 'vector';"
Use the correct version number and database name as per your own environment.
If you are using a managed database service such as AWS RDS, Google Cloud SQL, or Azure Database, then find out whether your provider supports this extension and enable it via configuration if required.
5. PDF Reporting Engine Dependencies
PDF is used in Odoo for generating various business documents like invoices, delivery slips, etc.
In Odoo 20, one of the two supported engines has to be installed and reachable by the Odoo process:
wkhtmltopdf: Needs a patched version with patched Qt to support header/footer capabilities.
paper-muncher: Needs 0.6 or higher version.
Executable should be available in the PATH of the OS user running Odoo.
Verify the installation
For wkhtmltopdf:
wkhtmltopdf --version
For paper-muncher:
paper-muncher --version
In case both engines are unavailable, PDF generation might use HTML engine, and Odoo may show a notification on the Settings page or in the report section. It is essential to test PDF generation before using it in production mode, since invoices, delivery orders, and other reports can be generated in this way.
6. Installing Python Dependencies
Python dependencies for Odoo are listed in the requirements.txt file at the root of the source code directory.
Install these dependencies within the virtual environment where Odoo will be running.
Installation steps
Activate the virtual environment:
source /opt/odoo/venv/bin/activate
Upgrade pip and wheel:
pip install --upgrade pip wheel
Install Odoo's requirements:
pip install -r /opt/odoo/odoo/requirements.txt
You can also verify the Odoo version using:
odoo --version
Please check the requirements.txt file of the Odoo 20 source code you have checked out for the correct names and version numbers of the packages.
7. Server Sizing and Performance Considerations
Server settings should vary based on different parameters like number of simultaneous users, modules installed, size of database, reporting, and background processes.
Please note that the following server configurations are just initial guides for planning and not Odoo's hardware restrictions.
| Concurrent users | Application server | PostgreSQL server | Suggested Odoo workers |
| Up to 10 | 2 vCPU, 4 GB RAM | Same host; approximately 2 GB shared-buffer budget | 2 |
| 10 - 50 | 4 vCPU, 8 GB RAM | 2 vCPU, 8 GB RAM; separate host may help | 5 |
| 50 - 150 | 8 vCPU, 16 GB RAM | 4 vCPU, 16 GB RAM with NVMe storage | 9 - 13 |
| 150+ | Multiple application servers behind a load balancer | Dedicated primary with a replica | Scale according to load |
Resource demands need to be determined via testing using your own modules and data.
Worker configuration
The basic starting rule is roughly 1 worker per six concurrent users, along with an additional cron worker.
The popular formula based on CPU is:
(CPU core count * 2) + 1
It is a general guideline and not applicable in all situations. The number of workers needs to take into account memory capacity and workload.
Memory management
Allocate 150-250 MB per user in case of regular jobs. Adjust limit_memory_soft and limit_memory_hard to minimize the possibility of running out of memory on the machine due to memory-consuming reports or processes.
Storage and networking
For production deployments:
- SSD/NVMe storage should be used for PostgreSQL.
- Consider allocating separate capacity for the Odoo filestore that consists of attachments and uploaded documents.
- Use a reverse proxy like Nginx or Traefik.
- Add more memory and storage capacity for AI vector indexes while using RAG.
Careful planning must also take place for backup storage. The initial estimate is between three and five times the size of the compressed database and file store, depending on how many backups are required.
8. Upgrading PostgreSQL Before Moving to Odoo 20
In case you have PostgreSQL 15 or below installed in your existing system, it is recommended that you upgrade to PostgreSQL 16 or above before, or as part of, migrating your Odoo 20.
Since major versions of PostgreSQL are not compatible, it is necessary for you to migrate the database using pg_dump, pg_restore, or pg_upgrade.
Upgrade instructions
Step 1: Backup database and filestore
Perform the following command to create a database backup in custom mode using pg_dump:
pg_dump -Fc -d mydb -f mydb.dump
Also back up the corresponding filestore from Odoo. Restore both in another environment to be sure that everything works fine.
Step 2: Install the new PostgreSQL version
Where possible, install the new version of PostgreSQL in parallel to the current one. Thus, you will have time to test and configure the new cluster before switching your Odoo.
Step 3: Install pgvector
Install pgvector where needed for the Enterprise AI module for the new PostgreSQL version and register the extension in the target database.
Step 4: Migrate the database
Select the migration strategy depending on the size of the database and downtime needs.
| Method | Downtime considerations | Suitable use case |
| pg_dump and pg_restore | Depends on database size and restore time | Small or medium databases, or when a clean copy is preferred |
| pg_upgrade | Can significantly reduce downtime for large databases | Large databases requiring a faster major-version transition |
The --link feature can be used to improve performance in pg_upgrade, though it should be done with care since both the old and new clusters might have the same data files.
Step 5: Change Odoo configuration
If the new PostgreSQL cluster runs on a different host or port, change db_host and db_port in odoo.conf.
Launch Odoo and check the logs for database version errors.
Step 6: Check the migration environment
Perform ANALYZE on all migrated databases:
ANALYZE;
Next, test the critical workflow, scheduled tasks, PDF generation, attachment handling, and database connection.
Step 7: Ensure Rollback Possibility
During the agreed rollback period, retain the original PostgreSQL database and its backups. The old environment may be discarded only after validation of the migrated application in a business cycle.
Significant point of differentiation: Upgrading PostgreSQL vs. Upgrading Odoo
A PostgreSQL upgrade will not, by itself, perform the upgrade of an Odoo database to Odoo 20.
Where the database is on an earlier Odoo version, the upgrade of the Odoo database must be done separately via the relevant upgrade service/OpenUpgrade process.
Consider these as two separate upgrades and test each phase prior to going into production.
9. Odoo 20 Pre-Installation Checklist
Before installation or upgrade of Odoo 20, the following should be checked.
- Python version 3.12 to 3.14 is supported, and a separate virtual environment has been created.
- PostgreSQL version 16 or above is installed and active.
- The Odoo database user has the appropriate privileges and is not a superuser.
- The database supports UTF-8 encoding.
- pgvector has been installed and activated if needed for Enterprise AI RAG functionality.
- wkhtmltopdf or paper-muncher version 0.6+ is available to the Odoo process.
- The installation of Python dependencies using requirements.txt is successful.
- pip check does not show any dependency conflicts.
- Number of workers, memory limit, and reverse proxy configuration are done based on the expected load.
- Database and filestore backup has been taken and validated by restoring the same.
- Important business workflows, scheduled tasks, reports, and attachments have been migrated in testing.
Creating a good server environment is a critical step towards deploying a stable Odoo 20 system. It is necessary to verify whether Python support, PostgreSQL versions, and PDF reporting are compatible, as well as allocating adequate resources prior to the installation or migration process.
In the case of production systems, it is recommended to take into account backup verification, testing of database migration, performance testing, and a rollback process to reduce any risks during the deployment process.
To read more about How to Set Up Odoo 20 Development Environment Using PyCharm on Windows, refer to our blog How to Set Up Odoo 20 Development Environment Using PyCharm on Windows.