Odoo upgrade prerequisites: PostgreSQL and Python versions

Before an Odoo upgrade on your own servers, confirm PostgreSQL, Python, wkhtmltopdf and OS packages meet the target version's requirements, and plan any database upgrade as its own step.

On this page

Odoo upgrade prerequisites: what your servers must meet before you start

Run the infrastructure checks before any database or code work starts. Your target version sets the minimum PostgreSQL and Python versions your servers must run, so the first task is to read those minimums for the release you plan to reach and compare them with what is installed on each host, including the staging server that will hold the upgraded test database. The deadline behind this work comes from Odoo's support calendar: standard support for Odoo 18.0 runs until September 2027 and for Odoo 19.0 until September 2028. A server that fails a check late in the project pushes the cutover toward the end of a support window, which is the situation you want to avoid.

Be clear about which upgrade path applies to you. The Enterprise upgrade service moves a database to a newer supported version through an upgraded test database that you test before production, and on-premise use of that service requires an Enterprise subscription. Activation on an on-premise install depends on the subscription code being entered, so confirm the subscription is current before you schedule the work. Community edition users have no access to the upgrade service and follow a different route, covered in the OpenUpgrade section of this group. The checks in this section still apply to Community servers, but the upgrade method does not.

Ask your Odoo partner or your platform team to confirm three things in writing before the plan is fixed: the exact PostgreSQL and Python versions the target release requires, the operating system packages and wkhtmltopdf build your reports depend on, and the window in which your current PostgreSQL major version receives community support. Check the current minimums in Odoo's own documentation for the release you choose, because the figures change between versions. Record the results per server so the upgrade rehearsal runs on the same stack as production.

Which infrastructure changes affect an Odoo upgrade

This table lists each infrastructure requirement that affects an Odoo upgrade, the impact it has on your plan and the action to take before the upgrade starts. Read it as a checklist: confirm the target version's exact requirements in Odoo's source installation documentation before you order or change any server component.

ChangeImpact on the upgradeAction needed
PostgreSQL 13 minimum for Odoo 19Odoo 19 needs PostgreSQL 13 or later, so a server on an older release cannot host the upgraded database as it standsCheck your current PostgreSQL version and confirm the minimum for your target release in the official Odoo source installation docs
PostgreSQL 13 and earlier unsupportedPostgreSQL 13 and earlier no longer receive community support, so security fixes stop reaching these serversPlan a PostgreSQL major upgrade as a separate project and schedule it before the Odoo cutover
PostgreSQL 14 supported until November 12, 2026PostgreSQL 14 is inside its support window only until that date, so a new build on it would need replacing soon afterTarget PostgreSQL 15 or later for any new server, and confirm the release plan with your database team
Python 3.10 or laterOdoo's Python requirement sets which operating system packages and interpreter builds your servers needConfirm the Python minimum for your target version and check that your OS provides it or that a supported build is installed
Odoo 19 standard support windowOdoo 19 standard support runs until September 2028, so it is the window that covers security updates and bug fixesRecord the end date in your upgrade calendar and check it against your infrastructure change timeline
PostgreSQL major upgrades are separate from Odoo upgradesUpgrading PostgreSQL does not upgrade Odoo, and upgrading Odoo does not upgrade PostgreSQL, so each change needs its own test and rollback planChoose a PostgreSQL upgrade method (dump and restore, pg_upgrade or logical replication) and test it on a copy before the Odoo test database

How to inventory servers, OS packages and wkhtmltopdf before the build

Four checks run in parallel before the upgrade build starts: the database engine, the Python runtime, PDF rendering and the operating system base. Each one produces a record that the build team can compare against Odoo's installation requirements, and a test server that mirrors production lets you confirm every item before anything touches live data.

PostgreSQL version and support end date

Record the exact PostgreSQL server version, the cluster layout and any replicas, then compare the major version against PostgreSQL's support calendar. The Odoo 19 requirement is PostgreSQL 13 as a minimum, but that is only the floor, and a version that is already past its support end date will need a planned major upgrade anyway. Confirm the current minimum with Odoo's installation documentation before you set the target version.

PostgreSQL versioning policy

Python interpreter and virtual environment

Record which Python interpreter runs Odoo, where its virtual environment lives, and every pinned package in it. Odoo 19 requires Python 3.10 or later, so an older system interpreter on the server is a blocker, not a warning. Keep the environment's package list in version control so you can rebuild it on the target OS, and confirm the exact interpreter range with Odoo's source installation documentation.

Odoo source installation docs

wkhtmltopdf and PDF reports

Record the installed wkhtmltopdf build, its patched Qt status and the path Odoo uses to call it. Invoices, quotations and other PDF reports depend on it, so a missing or mismatched binary often shows up only when someone prints a document after go-live. Generate a sample of each report type on the test server and keep the output as evidence, and confirm the supported wkhtmltopdf build with Odoo's installation documentation.

Odoo on-premise docs

Operating system packages and libraries

Record the distribution and release, the system packages Odoo depends on, and the shared libraries that Python packages compile against, such as fonts, image and XML libraries. Note which packages were installed by hand and which came from the base image or configuration management, because those are the ones that drift. Compare the list with the installation requirements for the target release, and confirm any package names with Odoo's documentation rather than assuming them from older guides.

Test server that mirrors production

Build a test server with the same OS release, PostgreSQL major version, Python interpreter, wkhtmltopdf build and package set as production, then restore a neutralized copy of the production database onto it. Use it to prove each item in the inventory before the build starts, and to rehearse the upgrade later. A test server that differs from production in any of these four areas can pass checks that production would fail, so record every difference as an open item.

When to upgrade PostgreSQL before or during the Odoo upgrade

Treat the PostgreSQL upgrade as a separate change from the Odoo upgrade, and decide its timing before the Odoo test database is built. A PostgreSQL minor update only replaces executables and restarts the server, because minor releases never change the internal storage format. A major upgrade is different: it changes the on-disk format and needs one of three routes, namely a pg_dumpall and restore, pg_upgrade, or logical replication. Which route fits depends on how long your Odoo database can stay read-only and how much rollback you need. The PostgreSQL upgrading documentation describes each route and its trade-offs, and your DBA should confirm the steps against your exact versions.

Logical replication is the route that most reduces the outage window. The PostgreSQL documentation states that it works between different major versions and allows a major upgrade with only several seconds of downtime. That benefit has a cost: you need to plan the replication setup, confirm that the Odoo schema and sequences are carried across, and test the cutover on a copy first. If you use pg_upgrade on PostgreSQL 18, note that it keeps planner statistics across the upgrade and adds parallel jobs and a --swap option, which can shorten the rebuild. Confirm the exact flags against the release announcement and your own disk and downtime limits before choosing it.

Keep the PostgreSQL step and the Odoo step in separate change windows so each can be rolled back alone. If the database engine upgrade fails, you can return to the previous PostgreSQL version without also reverting Odoo code and modules, and if the Odoo migration fails, the database engine stays where it was. Record the PostgreSQL version before and after, keep a tested backup of the cluster, and run the Odoo upgrade against the upgraded engine only after the engine has passed its own checks.

How to sequence the prerequisite upgrade and check each step

The sequence turns a loose list of infrastructure checks into an ordered path where each step produces a verified result and a point you can roll back to before production is touched.

  1. Confirm the target version and its requirements

    Start by fixing the target Odoo version, then read its requirements against your current environment. For Odoo 19, the minimum PostgreSQL version is 13, and Python must be 3.10 or later. Your team or DeployOpen records the target version, the PostgreSQL and Python minimums, and the Odoo support dates for that release. Done means a signed-off requirements sheet exists, and the upgrade is confirmed as Enterprise (with a subscription for on-premise use) or OpenUpgrade for Community. Rollback point: nothing has changed yet, so the decision can be revisited without cost to production.

  2. Inventory the current stack and modules

    Record the current Odoo version, PostgreSQL version, Python interpreter, wkhtmltopdf build, operating system release, installed custom and OCA modules, and any external integrations that call Odoo. Confirm which of these components are on versions that are still supported upstream. Your administrator or DeployOpen produces a written inventory, and the check is that every server and module in production appears on it. Rollback point: the inventory is documentation only, so nothing is altered at this stage.

  3. Take a full backup and a restorable copy

    Create a full database dump and a copy of the filestore, then restore both to a separate machine to prove they work. Keep the production backup retained until the upgraded system has passed review. The check is a successful restore with logins and a sample of records readable. Ask your team or partner to confirm where backups are stored and who can restore them. This copy is your rollback point for every later step.

  4. Upgrade PostgreSQL on a test server

    If the current PostgreSQL version is below the minimum for the target Odoo version, upgrade it first on a test server built from the restored backup. PostgreSQL's supported versions are listed in its versioning policy, and its major upgrade methods include pg_dumpall with restore, pg_upgrade and logical replication. Confirm the PostgreSQL version still receives updates before choosing a path. Check that Odoo connects, that the database loads, and that the restored data matches the inventory. Rollback point: the untouched production database and the restored backup remain available.

  5. Verify Python, wkhtmltopdf and OS packages

    On the same test server, confirm the Python interpreter meets the minimum (3.10 or later for Odoo 19), that the Odoo Python dependencies install cleanly into a virtual environment, and that the wkhtmltopdf build renders a sample PDF report, such as an invoice, with correct headers, footers and fonts. Confirm operating system packages, locales and system libraries the Odoo source installation expects are present. Check the results against the official source installation documentation for the target version. Rollback point: the test server can be rebuilt from the restored backup without affecting production.

  6. Run a neutralized test copy of the database

    Upgrade a copy of the production database on the prepared test server, using the upgrade path that applies to your edition. Neutralize the copy so that outgoing email, scheduled actions, payment providers and external integrations cannot reach live systems. Run the upgrade and record any errors, migration warnings and modules that fail to load. Done means the upgraded test database opens, module loading completes and the log is clean enough to review. Odoo's upgrade documentation states that the upgraded test database should be tested before production.

  7. Validate the test database before production

    Test the upgraded copy against a written checklist: key business flows, reports and PDFs rendered through wkhtmltopdf, integrations and API calls, scheduled actions, email and payment settings, data totals and performance on common screens. Record who approved each area. Do not proceed to production until every failed item has a fix and a retest result. This validation is the gate for the cutover, and its record is the evidence your compliance and security reviewers will ask for.

  8. Cut over production and keep the rollback path

    Schedule the production cutover once the test database has passed validation. Freeze changes, take a final backup, run the upgrade on production, confirm the same checks as the test run, and reopen access only after sign-off. Keep the pre-upgrade backup and the restored PostgreSQL environment available for an agreed period. The cutover is complete when production passes the validation checklist and the rollback route has been tested or documented.

How the server components depend on each other during an upgrade

The diagram starts at the Odoo server and its Python environment, which must pass the target version's checks before anything else moves. The server calls wkhtmltopdf for PDF output and depends on the operating system packages underneath both. The database side runs from PostgreSQL to a backup and then a test copy, which is where the upgraded Odoo is rehearsed first. Each component can be rolled back on its own, so check the database backup before changing the server runtime.

Component dependencies and rollback points on a self-hosted Odoo server.

What makes prerequisite work take longer

Prerequisite work rarely fails on one large item. It grows with how many databases you run, how far the PostgreSQL and Python baselines have to move, and how many dependencies and servers each database touches. Check these drivers early, because they decide how much of the work is inventory and how much is actual change.

Number and size of databases

Every database on a server needs its own compatibility check, test copy and sign-off, so a server with many databases multiplies the prerequisite work. Size matters too, because a large database takes longer to duplicate, neutralize and test. List each database with its Odoo version, module set, filestore size and owner before estimating. Ask any partner to price the work per database, not per server.

Gap between PostgreSQL versions

The distance between your current PostgreSQL major version and the target is the main driver of the database upgrade. Supported versions today are 14 through 18, and 13 and earlier are unsupported, so an older cluster needs more steps. A gap of one version usually means a simpler pg_upgrade run, while a larger gap adds testing of extensions, collations and planner behavior. Confirm the exact path with the PostgreSQL upgrading documentation before you schedule downtime.

PostgreSQL upgrade docs

Custom and third-party Python dependencies

Odoo's own Python requirements are the easy part. Custom modules, OCA modules and third-party libraries often pin packages that do not install cleanly on the newer Python interpreter. Each pinned package needs a check against the target Python version, and any compiled extension may need build tools on the server. Record every dependency in a requirements file so the test environment and production run the same set.

PDF report volume and wkhtmltopdf

Odoo renders many documents, including invoices, sales orders and labels, to PDF through wkhtmltopdf. The volume of reports your teams print or email, and any custom report layouts, determine how much of the output you must test after the change. Confirm the wkhtmltopdf version your target release requires, and compare rendered PDFs for margins, fonts and headers on the upgraded test database. Unusually high report volume also argues for load testing the rendering step.

Replica and high availability servers

Each PostgreSQL server in a primary and standby setup must be upgraded or rebuilt in step with the primary, and the replication configuration has to be checked against the new version. PostgreSQL does not detect a failed primary or promote a standby on its own, so any failover tooling you run also needs testing on the new cluster. Plan the order of work so the standby is not left on an incompatible version. Confirm with your database team which tools handle detection and promotion.

PostgreSQL failover docs

Operating system packages and access

Odoo, PostgreSQL, Python and wkhtmltopdf depend on operating system packages, system libraries and service accounts that the upgrade may change. Patching the host, updating the OS repositories and checking the package versions against your target are separate tasks that must be scheduled and recorded. Confirm which operating system releases your target Odoo version supports, and whether your change process allows OS updates in the same window as the database move.

How Community and Enterprise users differ on infrastructure checks

The edition you run decides which upgrade route is open to you, and that choice comes before any server check. Odoo's upgrade service moves a database to a newer supported version through an upgraded test database that you should test before production. On-premise use of that service requires an Enterprise subscription, and the Community edition has no access to it. Enterprise databases on your own servers are activated with the subscription code, so confirm your licence status before you size PostgreSQL or the Python runtime for a target version.

If you run Community, plan a different path. The usual route is OpenUpgrade, which migrates one major version at a time, so the infrastructure you prepare may need to support several intermediate releases in sequence. Ask whether your target versions and their PostgreSQL and Python requirements differ from what your current servers already run. The Enterprise source code is not publicly available and needs a subscription or partner access, so Enterprise users cannot review or rebuild the code themselves in the way Community users can. Confirm with Odoo which edition and hosting type your organization is licensed for.

Read the upgrade pages for your route before you start the infrastructure work: the Odoo Community upgrades with OpenUpgrade page covers the Community path, and the Odoo 18 to 19 upgrade page covers the Enterprise-side version requirements. Use the Odoo upgrade documentation to confirm eligibility for the upgrade service, and the Odoo standard and extended support page to check support windows for your current version.

Questions buyers ask about Odoo upgrade prerequisites

Which PostgreSQL version does Odoo 19 need and how do I confirm it?

Odoo 19 requires PostgreSQL 13 as a minimum, but PostgreSQL 13 is already past end of support, so plan for a supported release instead. PostgreSQL's versioning policy lists 14 through 18 as supported at the time of writing. To confirm your version, connect to the server with psql and run SHOW server_version; or SELECT version();. Check the server that holds the Odoo database, not the client binary, because the two can differ. Include managed database services, standby servers and any replica Odoo reads from. Confirm the minimum against Odoo's documentation for your exact target release before you build anything.

Does PostgreSQL have to be upgraded before the Odoo upgrade?

Not always, but if your current server is below the minimum for the target Odoo release, the database server has to move first or in the same change window. The order is a decision you confirm against Odoo's upgrade documentation for your path. PostgreSQL offers three routes: dump and restore with pg_dumpall, pg_upgrade, or logical replication. Logical replication works between major versions and can keep downtime to several seconds, according to PostgreSQL's upgrade documentation. Whichever route you choose, run the Odoo upgrade test on a database hosted on the new PostgreSQL version so the rehearsal matches production.

What does the prerequisite work need from our internal team?

The work needs people who control the systems involved. Typically that means:

  • Shell access with sudo rights on each Odoo and database server, plus the ability to install OS packages.
  • A recent database backup and a copy of the filestore, so a test restore is possible.
  • A staging environment that matches production closely enough to rehearse the upgrade.
  • A named owner for custom modules and integrations, who can say which code paths matter.
  • A change window and sign-off from the people who own service availability.
  • For Enterprise databases, the subscription code needed to activate the installation.

Agree on who holds each item before the checks start, because missing access is a common cause of delay.

What drives the cost and time of the infrastructure checks?

The main drivers are scope and the number of environments. Each Odoo database, staging copy, worker host and PostgreSQL server adds inventory, testing and sign-off work. Self-managed PostgreSQL usually takes more effort than a managed service, because the team must handle packages, replication and backups directly. Custom modules that depend on external libraries, and the number of PDF reports that depend on wkhtmltopdf, lengthen testing. High availability, replicas and tight downtime limits add rehearsal cycles. The checks are a one-time cost per upgrade, but PostgreSQL's support cycle means the work repeats on a schedule. Ask any quote to break these items out separately.

Can our internal team run these checks without a partner?

Yes, a team with Linux and PostgreSQL administration skills can run the checks alone, provided it has time for them. Most of the risk sits in two places: the test restore and the rendering of reports on the new stack. Someone must run the upgrade against a neutralized copy, compare key documents and reports, and record what changed. If nobody has done a major PostgreSQL upgrade on production-like data, a partner's experience with the sequence can shorten the learning curve. Decide early whether the team will own the rehearsal, the cutover and the rollback plan, because those are the parts that fail under time pressure.

What should we ask a partner to include in a quote?

Ask for a written scope that lists each server, database and environment in the engagement, along with the versions found and the target versions. The quote should name the PostgreSQL route and state what downtime it assumes, to be confirmed in testing. It should cover Python, wkhtmltopdf and OS package checks, a test restore on a neutralized copy, and a findings report with fixes and a retest. Ask what is excluded, such as custom module porting, data checks or performance testing. DeployOpen works on fixed scope agreed in writing before work starts, does not publish a price list, and gives a quote that follows the written scope.

How do I check wkhtmltopdf, Python and OS packages before upgrading?

Start with the requirements in Odoo's installation documentation for your target release, then compare them with what runs on each server. Run python3 --version and check it against the minimum Odoo lists for that release. Run wkhtmltopdf --version and confirm with Odoo's documentation which build it needs, because PDF output depends on it. Check the OS package list for the target Odoo release on your distribution, and record any packages that need updating. Verify that the PostgreSQL client tools match the server version. Keep the outputs in the change record, so reviewers can see what was checked and when.

Where to confirm the current requirements for your target version

Treat every version number in this plan as a starting point to confirm, not a fact to copy forward. Before a plan is approved, check the PostgreSQL, Python, wkhtmltopdf and operating system requirements against the exact Odoo version you are moving to, using the official Odoo source installation documentation for that release. The Odoo documentation is versioned, so the page for your target version, not the page you bookmarked for an older release, is the one that governs your build. Record the version and the date you checked it in the plan, so the approval reflects what was confirmed.

Next, confirm the database side separately. PostgreSQL publishes its own versioning policy, which lists the major versions still receiving fixes and the date each one reaches end of life. Check whether your current server's major version is still supported on the date your upgrade is expected to finish, and whether the Odoo release you are targeting still lists it as a minimum. Then read the PostgreSQL upgrading documentation to choose between dump and restore, pg_upgrade and logical replication, because each has different downtime and rollback behavior. Ask your team to note which method they expect to use so the rehearsal tests the same path.

Requirements can change between Odoo releases, and supported PostgreSQL versions move on their own schedule, so a figure that was correct for one release can be wrong for the next. Ask your implementation partner to show, in writing, the source page and version used for each requirement in the quote, and re-check those sources again on the day you approve the target version and before production cutover. Any difference between the documented minimums and your servers should become a named work item with an owner, not an assumption carried into the build.

How DeployOpen works on this

DeployOpen plans and checks the PostgreSQL, Python, wkhtmltopdf and operating system layers before an Odoo upgrade touches production, on servers you control. The work is written up as a fixed scope, tested on an upgraded copy, and handed over with the runbooks your team needs to keep the stack current.

How we scope

  • Inventory the current Odoo version, PostgreSQL major version, Python runtime, wkhtmltopdf build and operating system packages on each server
  • Map the target Odoo version's minimum PostgreSQL and Python requirements against what each environment runs today
  • Agree the written scope, deliverables and timeline before work starts, with a quote following from that scope

How we build

  • Prepare a staging host with the target operating system packages, Python runtime and PostgreSQL major version before touching production
  • Choose the PostgreSQL major upgrade method (dump and restore, pg_upgrade or logical replication) and rehearse it on a copy of the database
  • Verify wkhtmltopdf output and report rendering on the staging stack, then record each version pin and package source

How we hand over

  • Deliver a version matrix listing Odoo, PostgreSQL, Python, wkhtmltopdf and operating system versions for every environment
  • Document the rehearsed upgrade steps, rollback points and the checks run on the upgraded test database
  • Walk your administrators through the runbook so they can repeat minor PostgreSQL updates and future prerequisite checks

How we support

  • Ongoing support, upgrades and continuous testing are available as a retainer after handover
  • Track PostgreSQL and Odoo support end dates so prerequisite work starts well before standard support ends
  • Confirm with your team which Odoo edition and subscription you hold, since on-premise upgrades depend on it

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.