Running OpenProject on an external PostgreSQL server

Pointing OpenProject at a managed or shared PostgreSQL server moves database operations to your team's existing controls. This page covers the configuration paths, SSL modes, required extensions and the duties that come with them.

On this page

When an external PostgreSQL server fits your OpenProject deployment

An external PostgreSQL server fits when your organization already runs PostgreSQL under its own backup, monitoring and patching processes and wants OpenProject to use that service instead of a second database inside the application stack. In a Compose install, the external server replaces the bundled db service, which is removed from the stack. In a packaged install, it replaces the local database that the installer would otherwise create on the same host. Everything above the database layer stays the same: the web and worker processes, attachments, the proxy, and the application settings. What changes is where the data lives, who owns its backups and patches, and which connection and TLS settings the application must carry.

Before you commit to this path, confirm three prerequisites. First, the PostgreSQL major version must be 16 or later, because OpenProject officially supports PostgreSQL 16 or later since OpenProject 16.0.0. Check the current support window for your major version against the PostgreSQL versioning policy before you choose one, since 14 is the oldest version still listed as supported in the sources reviewed here and its end date is near. Second, the database must have the pg_trgm, btree_gist and unaccent extensions available and installed in the OpenProject database, as the OpenProject system requirements state. Your database team must be able to create these extensions, which often requires a privileged role on managed services. Confirm that with the provider before the migration plan is written.

Ask your database team to confirm the role that OpenProject will use, the network path from the application hosts, and the TLS mode the server enforces. Keep the connection settings in one place so that rotations and failover changes do not need edits across hosts. Plan the restore test and the upgrade calendar as part of the same change, because once OpenProject depends on the external server, its recovery time depends on that server's backup and failover design, not on the OpenProject host.

Connection options and when each one fits

This table compares the three ways to point OpenProject at an existing PostgreSQL server and the SSL modes that apply to each. Read each row against your install method, then confirm the SSL mode with the database team before the first connection test.

OptionHow it is setWhen it fitsWhat to confirm
Packaged installer, existing databaseChoose Use an existing PostgreSQL database in openproject reconfigurePackage installs on supported Linux distributions where you want the wizard to write the connection settingsHost, port, database name, role and password, and that the required extensions already exist
Packaged installer, DATABASE_URLSet DATABASE_URL, then select Skip in the wizardPackage installs managed through configuration as code or by a team that prefers one connection stringThat the URL is quoted correctly, the password is stored in a protected file, and the role can reach the server from the app host
Compose overrideSet DATABASE_URL in docker-compose.override.yml and remove the db serviceCompose installs that use a managed or shared PostgreSQL instance outside the stackNetwork route from the container to the database, firewall rules, and that the bundled db service is not started
SSL mode prefer (default)sslmode prefer through OPENPROJECT_DB_SSL variables or the defaultTest environments or links where encryption is wanted when available but a plain connection is acceptableWhether the database accepts encrypted connections, since prefer can silently fall back to unencrypted
SSL modes require and verify-ca or verify-fullsslmode set to require, verify-ca or verify-full, with certificate files suppliedProduction links that must be encrypted, with verify-ca or verify-full adding certificate checks for the serverRoot CA file, server certificate host name for verify-full, and certificate rotation dates
SSL modes disable and allowsslmode set to disable or allowOnly isolated links on a private network where the database team has accepted unencrypted trafficWritten approval from the database team and your security policy for data in transit

How to point OpenProject at an existing PostgreSQL database

This sequence prepares a PostgreSQL server you already run, creates a dedicated role and database for OpenProject, and points either a packaged or Compose install at it. Each step closes with a check, so the connection, extensions and migrations are confirmed before users depend on the instance.

  1. Confirm server version and extension support

    The platform team or database owner confirms that the PostgreSQL server runs version 16 or later, which OpenProject has officially supported since OpenProject 16.0.0. Ask the server administrator or managed service provider whether pg_trgm, btree_gist and unaccent can be installed, since some hosted services limit which extensions a tenant may create. Check the system requirements page for the current list before you start. The step is done when you have a written version number and a yes or no answer for each extension.

  2. Create a dedicated login role

    A database administrator creates a login role for OpenProject with a strong password and without superuser rights. Use SCRAM password authentication, since PostgreSQL 18 deprecates MD5 password authentication in favor of SCRAM. Store the password in your secrets manager, because it will go into the packaged installer or DATABASE_URL. The step is done when a test login as that role succeeds from the network where OpenProject will run.

  3. Create the OpenProject database

    As the administrator, create an empty database and make the OpenProject role its owner, so the application can create its schema without broader rights on the server. Keep the encoding and collation defaults unless your database standards require otherwise, and confirm with the DBA which backup policy and tablespace apply. The step is done when the OpenProject role can connect to the new database with psql and the database contains no objects yet.

  4. Install the required extensions

    Connect to the new database as the administrator, or as a role allowed to create extensions, and run CREATE EXTENSION IF NOT EXISTS once each for pg_trgm, btree_gist and unaccent. The IF NOT EXISTS clause lets you rerun the commands safely. OpenProject requires all three extensions. The check: query the extension catalog for the database and confirm that all three rows exist, then confirm the OpenProject role can see them.

  5. Configure the packaged install

    On a DEB or RPM install, run openproject reconfigure and choose the option to use an existing PostgreSQL database, then enter the host, port, database name, role and password when prompted. Alternatively, set DATABASE_URL in the environment and select Skip in the same menu. If the server requires encrypted connections, set the OPENPROJECT_DB_SSL variables, since the default SSL mode is prefer. The check: the wizard completes without database errors and does not offer to create a local database.

  6. Configure the Compose install

    In your Compose project, create or edit docker-compose.override.yml to set DATABASE_URL to the external server, then remove the bundled db service so no local PostgreSQL container starts. Add OPENPROJECT_DB_SSL variables with certificate files if your policy requires them, and choose an SSL mode from disable, allow, prefer, require, verify-ca or verify-full. The check: run docker compose config and confirm that no db service appears and that DATABASE_URL points to your server host and database name.

  7. Verify the connection and migrations

    Start OpenProject and read the web and worker logs from the first start. Look for connection errors, failed extension checks and migration failures, and resolve each one before opening the instance to users. When the logs are clean, sign in through the web interface as the administrator and open a project. The step is done when the login succeeds and the new database contains the OpenProject tables.

How the OpenProject components reach the external database

The diagram starts at the web and worker processes in the application network, which hold the connection settings from DATABASE_URL or the separate database variables. Traffic may pass through an optional PgBouncer pooler before reaching the external PostgreSQL primary, and an optional standby can be attached for read-only queries or failover planning. The trust boundary sits between the two networks, and TLS is negotiated on the connection, with certificate files read by the OpenProject containers or services through the OPENPROJECT_DB_SSL variables. Check that the SSL mode, certificate paths and firewall rules match on both sides.

Application processes reach the external PostgreSQL primary through an optional pooler across a trust boundary.

Choosing SSL modes and database authentication

The default SSL mode is prefer, which encrypts the connection when the server offers TLS but accepts an unencrypted connection when it does not. That default is convenient for a first test but weak for production, because a downgrade or a misconfigured server goes unnoticed. Stronger modes verify more. require encrypts the connection without checking the server certificate. verify-ca also checks that the certificate chains to a trusted authority. verify-full adds a check that the certificate matches the host name OpenProject connects to. Ask the database team which mode the managed service supports and choose the strongest one that works. Certificate files are supplied through the OPENPROJECT_DB_SSL variables, so the CA bundle and any client certificate must be present on every host that runs the web and worker processes, and the file paths must match in the Compose override or package configuration.

The database team decides which authentication method the server enforces, and OpenProject must connect with one it accepts. PostgreSQL documents several methods, including password, certificate, LDAP, GSSAPI and OAuth, and the server's pg_hba.conf rules decide which applies to the OpenProject role. PostgreSQL 18 deprecates MD5 password authentication in favor of SCRAM, so a role or cluster still using MD5 hashes should be moved to SCRAM before the upgrade and tested with the connection string OpenProject will use. Do not assume the managed service's default. Confirm the authentication method, whether password rotation is handled by the provider, and whether the service requires TLS for every connection.

Before go-live, run one connection test from each OpenProject host using the same DATABASE_URL and SSL settings the application uses, and confirm the server reports an encrypted session. Record the mode and method in the deployment runbook so a later certificate renewal or authentication change does not silently break the link. Also confirm with the vendor how certificates rotate and whether a rotation requires restarting OpenProject processes.

Security and operational duties that move with the database

Moving OpenProject onto an external PostgreSQL server shifts several duties from the application to the database side. Each card below is a separate duty, and together they decide whether the database stays as secure and recoverable as the rest of the stack.

Least-privilege database roles

Create a dedicated role for OpenProject that owns or can write only the database it uses, rather than reusing a superuser or a shared admin account. Confirm which role runs migrations during upgrades, since that role may need more rights than the day-to-day application role. Review who can log in as the owner of the extensions pg_trgm, btree_gist and unaccent, because those are installed into the database and need to be present before OpenProject starts.

PostgreSQL auth methods

Certificate lifecycle for verify-ca and verify-full

With verify-ca or verify-full, OpenProject checks the database server certificate against a CA you supply through the OPENPROJECT_DB_SSL certificate variables. Certificate renewal then becomes an application change: each renewal needs the new chain deployed to every OpenProject host and worker, and a restart. Record the expiry date, who renews the certificate, and how the new CA file reaches the containers or package hosts before the old one expires.

Network paths and firewall rules

Open only the path from OpenProject web and worker hosts to the PostgreSQL port, and restrict it by source address. If you use a connection pooler such as PgBouncer, decide whether it sits on the application side or the database side and open the path for it separately. Check that the managed or shared database accepts connections from the container network or host addresses your deployment actually uses, including after any change to NAT or load balancers.

Backups and point-in-time recovery

Database backups for OpenProject do not cover attachments, so the two must be restored to a consistent point together. Continuous archiving with a base backup and archived WAL segments is what allows point-in-time recovery. Ask the database owner whether PITR is enabled, where WAL archives are stored, and whether a restore has been tested against an OpenProject instance. Do not assume a recovery time until a restore test has measured it.

Continuous archiving docs

Credential storage in configuration or secrets

The database password appears in the DATABASE_URL value or in separate database variables, and it can leak through shell history, Compose files or process listings. Store it in a secrets manager or a protected environment file with restricted file permissions, and avoid committing it to version control. Plan rotation: changing the password requires updating every OpenProject host and restarting its services, so document the order of steps before rotating.

Patching ownership across the database

Define who applies PostgreSQL minor updates, who schedules major upgrades, and who approves them, because OpenProject's supported PostgreSQL versions and the PostgreSQL project's support windows are separate timelines. Minor releases replace executables and need a restart, while major upgrades use dump and restore, pg_upgrade or logical replication. Agree a written split between the database team and the OpenProject operator before the first incident forces the question.

PostgreSQL versioning policy

Keeping PostgreSQL versions supported while OpenProject moves forward

PostgreSQL 14 reaches end of support on November 12, 2026, so an external database on that version needs a planned major upgrade before the date, not after it. According to the PostgreSQL versioning policy, 15 through 18 are currently supported, with end dates of November 11, 2027 for 15, November 9, 2028 for 16, November 8, 2029 for 17 and November 14, 2030 for 18. OpenProject officially supports PostgreSQL 16 or later, so a server on 14 or 15 is already outside the supported OpenProject baseline. Confirm your current major version with SHOW server_version; and record the end-of-life date in your change calendar alongside the OpenProject release train.

Minor updates and major upgrades carry very different risk. A minor release never changes the internal storage format, so the work is replacing executables and restarting the server, and the PostgreSQL project publishes minor releases at least once every three months. A major upgrade is a different job: the PostgreSQL upgrading documentation describes three routes, a dump and restore with pg_dumpall, pg_upgrade, or logical replication. Logical replication works across major versions and can keep downtime to several seconds, but it needs replication configured and verified before cutover. For a managed service, ask the provider which of these routes it performs and what downtime it expects, because the provider often runs the work for you.

Plan each major upgrade as a joint change with OpenProject, not as a database-only task. Check the OpenProject release notes for the target release, confirm the PostgreSQL version and extensions it requires (pg_trgm, btree_gist and unaccent), and schedule the database move in a window that does not coincide with an OpenProject upgrade, so that a failure can be traced to one change. Test the full sequence on a copy of production, including migrations and a restore check, and keep a verified backup of the OpenProject database taken immediately before cutover.

Limits to confirm in your environment before you switch

Pointing OpenProject at a managed or shared PostgreSQL server moves part of the stack under someone else's control. The items below are the places where a provider's defaults, a pooler or a missing extension can break an install or leave you without a recovery path, so confirm each one before the first migration runs.

Extension availability on the service

OpenProject requires the pg_trgm, btree_gist and unaccent extensions. Managed services often allow only a list of approved extensions, and the install fails if any one of the three is missing. Ask the provider for the exact list of enabled extensions on your instance tier, and check that the database user can create them in the target database.

Required extensions
3
System requirements

Minimum PostgreSQL version

OpenProject officially supports PostgreSQL 16 or later. Check the major version your provider offers and whether it is still within its support window, since PostgreSQL 14 support ends in November 2026. Plan the upgrade path with the provider before you go live, not after the first unsupported version warning.

Versioning policy

Superuser restrictions during setup

Some managed services withhold the superuser role, which can block extension creation, role grants or schema changes that the installer or migrations expect. Ask which privileges the OpenProject database user receives, and whether an administrator must run the extension setup once before the installer starts. Record the answer in your runbook so the next upgrade does not repeat the surprise.

Connection pooling and session behavior

A pooler such as PgBouncer in transaction mode can change how session-level settings, prepared statements and advisory locks behave. Confirm with your application and DBA teams whether the pooler mode and the connection limit suit OpenProject's worker count, and whether any session settings set at connect time persist across pooled connections. Test background jobs and migrations through the same path you will use in production.

PgBouncer project

Failover tooling outside PostgreSQL

PostgreSQL does not detect a failed primary or notify a standby on its own, so automatic failover depends on external tooling or the provider's managed failover. Ask whether failover is automatic or manual, what the expected switchover behavior is for open connections, and how OpenProject reconnects afterward. Decide whether a restart of the web and worker processes is part of your runbook.

Failover docs

Restore testing with your own tooling

A provider's backup is not proof that you can restore OpenProject. Run a point-in-time restore into a separate instance, then start OpenProject against it and check attachments, work packages and user logins. Use the provider's backup tooling or your own pg_dump and continuous archiving setup, and record how long the restore takes so the recovery plan has real numbers behind it.

Continuous archiving docs

Questions teams ask before running OpenProject on external PostgreSQL

Can our team point OpenProject at an external PostgreSQL server without outside help?

Often yes, if your team already runs PostgreSQL and manages Linux services. The change itself is small: on a packaged install you choose Use an existing PostgreSQL database in openproject reconfigure or set DATABASE_URL and select Skip, and on Compose you override DATABASE_URL in docker-compose.override.yml and remove the db service. The effort sits in the surrounding work: confirming the PostgreSQL version is supported (OpenProject officially supports PostgreSQL 16 or later), creating the required extensions, setting SSL and network rules, and testing backups and restores. Teams without a DBA or without a tested rollback plan usually benefit from a written scope before they start.

What actually drives the effort of an external database setup?

The main drivers are the state of the existing database, the number of environments, and how strict your security rules are. Effort rises when the database is shared with other applications, when you need certificate-based SSL with verify-ca or verify-full, when backups and point-in-time recovery must be proven before cutover, or when the migration of existing data must happen with little downtime. Effort falls when a dedicated database already exists with a current supported version, the network path is open, and the team has a staging copy of the production instance to test against.

What does the work need from our database and security teams?

Database administrators need to create a dedicated role and database, install or confirm the pg_trgm, btree_gist and unaccent extensions, and decide how connections are authenticated. Security teams need to review the SSL mode (the default is prefer), the certificate files passed through the OPENPROJECT_DB_SSL variables, firewall rules between the application hosts and the database, and where database passwords are stored. Both teams should agree on backup scope, retention and who can run restores. Ask for these items to be listed as named tasks with owners in any proposal.

Does using an external PostgreSQL server give us high availability?

No. Moving the database outside the OpenProject host does not make it highly available by itself. PostgreSQL supports hot standby servers and both synchronous and asynchronous replication, but it does not detect a failed primary or promote a standby on its own, so automatic failover needs external tools. Your managed service or your existing database platform may already provide this. Confirm with your database owner what failover behavior exists, how long a failover takes in your environment, and whether OpenProject reconnects cleanly after it. Connection pooling with PgBouncer is a separate decision.

How should OpenProject and PostgreSQL upgrades be sequenced?

Plan the two upgrades as separate tracks and test their order in staging. PostgreSQL minor releases do not change the storage format, so they are a matter of replacing executables and restarting. Major PostgreSQL upgrades use pg_dumpall and restore, pg_upgrade, or logical replication, and logical replication can keep downtime to several seconds. PostgreSQL versions 14 and 15 are approaching end of support, so check your current version against the published policy. OpenProject release notes list the database requirements for each release, so confirm that the target OpenProject version supports your target PostgreSQL version before you change either system.

What should a quote for an external PostgreSQL setup include?

A useful quote lists the written scope, the target OpenProject version and installer type, the PostgreSQL version and hosting model, the extensions and SSL mode to be configured, the migration or cutover method, the backup and restore test, and the handover documentation. It should state what the client provides (database credentials, network access, certificates, staging hosts) and what the partner delivers. Ask which items are one-time work and which recur, such as ongoing support or upgrade retainers. DeployOpen does not publish a price list, and a quote follows from that written scope.

How does this differ for packaged installs and Compose installs?

The database target is the same, but the configuration path differs. Packaged installs use the openproject reconfigure wizard or the DATABASE_URL variable with Skip, and the database settings live in the package configuration. Compose installs override DATABASE_URL in docker-compose.override.yml and remove the bundled db service, so the container no longer starts PostgreSQL. In both cases the external server must meet the same extension and version requirements. Compose setups also need the volume for the bundled database removed from your backup plan, while packaged setups need the database backup scheduled outside the host. Confirm which path your environment uses before you write the scope.

How DeployOpen scopes an external database change

An external database change starts with a written review of the target database, not with a connection string. DeployOpen looks at the PostgreSQL server or managed service that will hold OpenProject's data and confirms that it runs a major version OpenProject supports, that the pg_trgm, btree_gist and unaccent extensions can be created by the account OpenProject will use, and that the instance is sized for the expected user count. Whether the database is dedicated to OpenProject or shared with other applications also changes the review, because shared servers bring extra questions about connection limits, maintenance windows and who may alter server settings. Teams should confirm the exact supported versions and extension availability with their provider or against the current system requirements before the review begins.

The review then covers roles, SSL and backups. DeployOpen expects a separate application role with the least privileges that installation and upgrades need, and a plan for which role runs migrations, since schema changes during upgrades can need more rights than daily operation. For SSL, the team should decide the sslmode value (the default is prefer, and stricter modes such as verify-full require certificate files supplied through the OPENPROJECT_DB_SSL variables), confirm the certificate chain its hosts will trust, and record who rotates those certificates. The backup arrangement is checked against recovery goals: whether the provider offers point-in-time recovery, where logical or physical backups are stored, and whether a restore has been rehearsed against an OpenProject instance rather than assumed to work.

Once these decisions are agreed, DeployOpen documents the configuration as a deliverable: the chosen connection method (the packaged installer option or DATABASE_URL with Compose overrides), the role and privilege model, the SSL settings, the backup and restore runbook, and the verification steps used to confirm the change. Most engagements are fixed-scope, so the scope, deliverables and timelines are agreed in writing before any work starts, and any change to the database layout after that is handled through a written change to that scope. Clients who want to compare options can ask for a written scope that separates the review, the configuration and the documentation, so each can be accepted on its own.

How DeployOpen works on this

DeployOpen plans and builds OpenProject against a PostgreSQL server you already run or have chosen, inside your own infrastructure. We confirm the database version, extensions, SSL policy and access model before any change, then document and hand over the result so your database and platform teams can operate it.

How we scope

  • Confirm the PostgreSQL version and support status against your database team's upgrade calendar before work starts.
  • Agree in writing whether the database is managed or shared, who holds the credentials and which SSL mode your policy requires.
  • Define the written scope, deliverables and timeline for the connection, the extensions and the cutover, which are fixed-scope by default.

How we build

  • Set up the connection with DATABASE_URL or the separate variables, using either a packaged install or a Compose override that removes the bundled database service.
  • Verify that the pg_trgm, btree_gist and unaccent extensions are present and that the OpenProject role can create and use them.
  • Test SSL modes, certificate files and failure behavior in a staging environment that mirrors your production network path.

How we hand over

  • Deliver the connection settings, role and privilege model, extension list and SSL configuration as documentation your team can review.
  • Walk through the rollback steps and the database backup and restore points that cover the OpenProject schema before go-live.
  • Record the decisions made on pooling, network access and maintenance windows so later changes start from a documented baseline.

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer if you want DeployOpen to handle OpenProject and database changes over time.
  • Plan OpenProject upgrades alongside PostgreSQL minor and major version changes, so each move is tested against the same connection setup.
  • Confirm with your database team which high availability, replication and point-in-time recovery arrangements sit outside the OpenProject scope.

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.