Why run Zammad on an external PostgreSQL server
Running Zammad on an external PostgreSQL server means the helpdesk database sits under the same backup, patching, monitoring and access controls your team already applies to shared or managed PostgreSQL. For a regulated team, this is usually the main reason to separate the database from the application host: ticket content, customer records and audit history end up in a database your database administrators already govern, rather than in a local instance that the support team maintains alone. Zammad stores its content in PostgreSQL 15 or newer, so the external server must meet that floor before anything else is planned.
The package installation sets up PostgreSQL on the same machine only when it does not detect a PostgreSQL server, so a team that wants an external database has to make that choice deliberately during installation rather than discover it afterward. The supported PostgreSQL major versions at the time of the topic research were 14 through 18, with 15 supported until November 11, 2027 and 18 until November 14, 2030. Confirm the version your database platform offers against the PostgreSQL versioning policy before you commit, because a Zammad installation on an end-of-life database major version will inherit that exposure. PostgreSQL is released under the PostgreSQL License, which is permissive, so the database itself carries no license fee; any cost sits with the hosting, managed service or support contract you choose.
The decision to externalize the database also changes who owns recovery. Zammad's own backup approach does not replace the database team's point-in-time recovery and restore testing, so agree in writing which team owns backups of the Zammad schema, how restores are tested and where the recovery objectives are recorded. Confirm with your database platform whether managed PostgreSQL offers the replication and failover options your availability target needs, since PostgreSQL itself does not detect a failed primary and automatic failover depends on external tooling. Before the build starts, ask your database team to confirm the server version, the TLS settings they require, the role that will own the Zammad database, and whether a connection pooler such as PgBouncer already sits in front of the server.
Which database option fits your environment
When you install Zammad from packages, the installer sets up PostgreSQL on the same host automatically, but only when it does not detect an existing PostgreSQL server. This keeps the first deployment small and leaves the database work with the same team that runs the application server. The trade-off is that database maintenance shares a host, a maintenance window and an operating system with Zammad, so a database problem and an application problem can become the same incident.
- Patching: Your team applies operating system and PostgreSQL package updates on the same host as Zammad.
- Backups: Your team must add database backups to the Zammad backup plan, because the bundled setup does not make that decision for you.
- Zammad configuration: No database settings are needed beyond the defaults the installer writes.
- Scaling: Moving the database later means a planned migration of data and configuration.
- Recovery: A single host failure takes the application and the database down together.
Confirm which PostgreSQL major version your distribution installs and whether it meets the PostgreSQL 15 or newer requirement before you rely on it.
A separate PostgreSQL server on its own host or virtual machine gives the database its own lifecycle, resources and access rules. Your platform or database team owns it, and the Zammad host only holds connection settings. This is the most common choice when the database team already runs PostgreSQL for other systems and wants one standard for patching, backups and monitoring.
- Patching: Your database team applies PostgreSQL minor and major updates on its own schedule.
- Backups: Your database team owns backup and point-in-time recovery design, which must be tested separately from Zammad.
- Zammad configuration: Set the connection values in the database configuration file, and create the Zammad database user and database with the permissions the Zammad documentation describes.
- Network: Open only the port from the Zammad application host to the database, and restrict access by host and user.
- Trade-off: You gain clear ownership, but the handoff between the Zammad team and the database team must be written down for upgrades and incidents.
Ask who is on call for the database, which backup tool and retention apply, and how a database restore is coordinated with a Zammad restore.
A managed PostgreSQL service from a cloud provider moves much of the operating work to the provider. The provider runs the database host, and your team connects Zammad to an endpoint and credentials. The features available differ by provider, so the operational promises you can rely on are the ones in the provider's written service terms, not the ones in marketing material.
- Patching: The provider performs maintenance under its own schedule and rules. Confirm which major versions it offers and whether they include PostgreSQL 15 or newer.
- Backups: Confirm what backup and restore options the provider offers, how long they are kept and how a restore is tested. Do not assume point-in-time recovery is available without checking.
- Zammad configuration: Point the database configuration at the managed endpoint, and check whether the provider requires TLS and which connection pooling it offers.
- Connection limits: Managed services often limit concurrent connections, so plan the connection count with PgBouncer in mind.
- Trade-off: Less patching work, but less control over the server, its extensions and the network path.
Ask the provider for written answers on version support, backup retention, restore procedure, encryption and the region where data is stored.
The Docker Compose stack for Zammad can run its own PostgreSQL container, but you can also point the Zammad containers at a database that lives outside the stack. This separates data from container lifecycle, so you can rebuild or upgrade the Zammad containers without touching the database. Support boundaries matter here, because container problems and database problems need different owners.
- Patching: Your team updates the database server, and the container image updates are handled separately.
- Backups: The database backup lives outside the container volumes, so confirm that it is not tied to the Compose host.
- Zammad configuration: Set the external connection values in the Compose environment or scenario files, and remove or disable the bundled database service so the two do not conflict.
- Networking: The database must be reachable from the container network, and firewall rules must allow only the Zammad containers.
- Trade-off: Clean separation of data and containers, with more configuration to keep consistent between the Compose files and the database.
Confirm which party supports the database when a container update and a database issue appear at the same time, and check the Zammad Docker Compose documentation for the current external database settings.
Database configuration options and when each fits
This table compares the database layouts a Zammad team can choose, from the local package PostgreSQL to a replicated cluster with connection pooling and TLS. Read each row for the conditions where it fits, the operating work it adds, and the questions to settle with whoever owns the database before the install begins.
| Option | When it fits | Operational cost added | Confirm with the database owner |
|---|---|---|---|
| Local package PostgreSQL | Single-host installs where the helpdesk team also runs the server and no central database service exists | Backups, minor updates and major upgrades fall to the Zammad team, on the same host as the application | Who owns backups and restore tests, and whether the host meets the PostgreSQL 15 or newer requirement |
| Separate PostgreSQL host | Organizations that run a central database service or need Zammad data isolated on its own server | Network path, firewall rules and a database user with creation rights must be set up and kept working | Server version, the database name and user to create, allowed client addresses and the backup schedule |
| PgBouncer in front of PostgreSQL | Multi-instance Zammad deployments or environments where many client connections compete for the same server | Another service to patch and monitor, and the pool mode must be session pooling, not transaction pooling | Whether the pooler is already in use for other applications and the pool size agreed for Zammad |
| TLS to the database | Any deployment where database traffic crosses a network segment the team does not fully control | Certificate issuance, renewal and trust store management on both ends of the connection | Which certificate authority signs the server certificate, the renewal process and whether client certificates are required |
| PostgreSQL high availability with hot standby and replication | Helpdesks where database downtime stops customer contact and the organization already runs a replicated database service | Standby servers, replication monitoring and failover tooling, since PostgreSQL does not detect a primary failure or promote a standby by itself | Synchronous or asynchronous replication, who performs failover, how Zammad reconnects after promotion and how restores are tested |
| Standalone server with point-in-time recovery | Teams that need recovery to a chosen moment after data errors or ransomware, not only nightly dumps | Archive storage for write-ahead logs and periodic restore tests, which recur for the life of the system | Archive location, retention period and the recovery time the business expects |
How to point Zammad at an external PostgreSQL database
This sequence moves Zammad's content store from a bundled or local database to a PostgreSQL server you manage, with a verified connection, encrypted traffic and a tested write path. Each step ends with a check you can record before moving on.
Confirm the PostgreSQL version and support window
The platform team confirms that the target server runs PostgreSQL 15 or newer on a major version that is still supported. The PostgreSQL versioning policy lists PostgreSQL 15 as supported until 11 November 2027, and 14 ends on 12 November 2026, so a newer major version may be the better choice for a new deployment. Done when the server reports its version and the support end date is recorded in your change ticket.
Create the Zammad role and database
A database administrator creates a dedicated login role and an empty database for Zammad on the external server, separate from administrative and other application accounts. Use a strong, unique password stored in your secrets manager. Done when you can log in as the new role from the Zammad host with the network path your firewall rules allow, and the database appears in the server's database list.
Grant the privileges Zammad needs
Grant the Zammad role the rights needed to create and change its schema, tables, indexes and sequences in its own database, and nothing on other databases. Check the Zammad database server documentation for the exact privileges required by the version you are installing, since they can change between releases. Done when a test session as the Zammad role can create and drop a temporary table in that database, and cannot connect to unrelated databases.
Set the connection in the database configuration file
On the Zammad host, the administrator edits the database configuration file described in Zammad's database server documentation, setting host, port, database name, role and password for the external server. Keep the file readable only by the service account that runs Zammad. Done when the file parses without errors and the values match the server you prepared in the earlier steps.
Choose session pooling if PgBouncer is in the path
If you place PgBouncer between Zammad and PostgreSQL, configure it for session pooling, not transaction pooling. Confirm this choice against the current Zammad documentation before you go live, because transaction pooling can break features that rely on session state. Done when PgBouncer shows the Zammad database and role, and a test connection through it completes and returns the expected session settings.
Enable and verify TLS to the database
Enable TLS on the PostgreSQL server with a certificate from your internal authority, then configure Zammad and any PgBouncer hop to require encrypted connections and, where your policy asks, to verify the server certificate. Confirm the exact client settings in the Zammad documentation. Done when a connection from the Zammad host reports an encrypted session, and a connection without TLS is refused by the server.
Start Zammad and confirm migrations finish
Start the Zammad services and watch the application logs during first startup. The database schema is created or updated at this point, so the administrator checks that the migration output ends without errors and that the web application loads in a browser. Done when the logs show a clean start, no database connection errors appear, and the login page responds through your reverse proxy.
Verify that Zammad writes and reads data
Create a test customer and a test ticket with an article, then confirm the records appear in the Zammad interface after a page reload and in the database tables on the external server. Delete the test records afterward and log the results with the PostgreSQL version and connection settings used. Done when the ticket and its article are present in both places, which shows the application is reading and writing through the new server.
How Zammad, PgBouncer and PostgreSQL connect
Requests start at users, pass through the reverse proxy to the Zammad application, and reach the database only through PgBouncer in session pooling mode over TLS. PgBouncer forwards to the PostgreSQL primary, which streams changes to a standby for replication. The dashed boundary marks where the application network ends and the database network begins, so check that the only traffic crossing it is the encrypted PgBouncer connection and the replication stream. Redis and attachment storage are left out to keep the focus on the database path.
Request path from users to PostgreSQL, with the trust boundary between the application and database networks.
Why session pooling is required for PgBouncer
Session pooling is the pool mode to plan for when PgBouncer sits between Zammad and PostgreSQL. PgBouncer keeps a set of server connections open to PostgreSQL and lends them to Zammad's client connections. In session pooling, a server connection stays assigned to one client for as long as that client remains connected, so anything tied to that session, such as session-level settings, prepared statements and temporary objects, stays available to the client. In transaction pooling, PgBouncer returns the server connection to the pool after each transaction. That lets more clients share fewer servers, but session state cannot be relied on between transactions. The PgBouncer documentation explains each mode and its limits, and the pool_mode setting in the PgBouncer configuration selects one of them.
Before you set the mode, confirm with the Zammad version you run whether its database access depends on session state or on features that transaction pooling restricts. Check the release notes and the database server documentation for that exact version, and ask Zammad to confirm the pool mode in writing if your documentation leaves any doubt. Record the chosen pool_mode value in your change record, so that a later upgrade, pooler rebuild or new host does not change it without review. If you run a different Zammad version after an upgrade, repeat this check, because the requirement is tied to the application release rather than to PgBouncer alone.
Test the pool mode under load and failover before go-live. Run a load test that matches your agent count and typical activity, including ticket writes, search and attachment uploads, and then repeat the test while the PostgreSQL primary is switched to a standby. PostgreSQL does not detect a primary failure or notify a standby on its own, so the path to the new primary depends on external failover tools and on how PgBouncer is pointed at the database. Watch for connection errors, stalled sessions and ticket writes that fail or duplicate after the switch. Keep the results in your operations runbook, because they become the baseline for every later change to the pooler or the database.
Securing the database connection
A Zammad database connection carries every ticket, customer record and credential Zammad stores, so it needs the same care as the application itself. The cards below cover transport, identity, network, authentication, secrets and logging, and each one names a decision your team should make before the external server goes live.
Encrypt the connection and verify the server
Enable TLS between Zammad and PostgreSQL so ticket content and passwords are not sent in clear text across your network. Encryption alone does not prove who you are talking to, so configure Zammad to verify the server certificate against your internal certificate authority. Confirm the certificate names the hostname or address Zammad uses, and plan renewal before it expires.
PostgreSQL auth docsUse a dedicated least-privilege role
Create a login role for Zammad that is separate from the role that owns the database and its tables. Schema changes during installs and upgrades need elevated rights, so decide who runs those steps and when the owner role is used. The application role should only read and write data, which limits the damage of a compromised application credential.
Restrict network paths to PostgreSQL
Allow connections to the PostgreSQL port only from the Zammad application hosts, and from the PgBouncer host if you use one. Block administrative access from user networks and let database administrators reach the server through a bastion or VPN. Confirm the rules on both the database firewall and any cloud security group, because managed services often apply their own network policy.
Choose a strong authentication method
Set password authentication to SCRAM rather than MD5, since PostgreSQL 18 has deprecated MD5 in favor of SCRAM. Check the pg_hba.conf rules so that the Zammad role is matched only to its own database and source addresses. Certificate or LDAP authentication can fit organizations that already run those systems, so confirm the Zammad side supports the method you pick before you commit.
Keep database credentials out of plain files
The database configuration file holds the username and password Zammad uses to connect, so restrict its file permissions to the service account that runs Zammad. Avoid copying the file into shared repositories, container images or tickets, and rotate the password through your secrets process. Ask your vendor or the Zammad documentation which configuration keys the database settings expect before you move them into a secrets manager.
Log database connections and changes
Turn on PostgreSQL logging for connection attempts, failed authentications and privileged statements so that you can trace who connected and when. Send these logs to a system your security team monitors, and set a retention period that matches your policy. Logs of this kind help confirm whether a connection failure is a network fault or a credential problem, and they support later investigations.
Operating the database after go-live
Once Zammad points at an external PostgreSQL server, the database becomes a separate operational system with its own update and recovery cycle, and that cycle has to be planned before go-live. PostgreSQL 15 is supported until November 11, 2027 according to the PostgreSQL versioning policy, so the first decision is which major version you will move to and when. Minor releases are different: they do not change the internal storage format, so applying one means replacing the executables and restarting the server. Schedule these inside a maintenance window and confirm with your Zammad release notes that the minor version you pick is compatible with the Zammad version you run. For major upgrades, compare dump and restore, pg_upgrade and logical replication against your tolerance for downtime. Logical replication allows a major upgrade with only several seconds of downtime, but it needs a rehearsal against a copy of your data and a check that Zammad's database settings still match after cutover.
Backups need the same planning. Continuous archiving with point-in-time recovery gives you the ability to restore to a moment before a bad change, but it only counts once you have restored a copy from it and timed the result. Document where the database backups are written and confirm that they are taken at the same point as the attachment store. If attachments live on the filesystem or in S3 instead of the database, a database restore alone will leave ticket records pointing at files that no longer match. Elasticsearch is a separate question: its index is derived data, so after a restore you should expect to rebuild the search index from the database, and the time that takes grows with ticket volume. Ask your Zammad administrator to confirm the rebuild procedure and its expected duration on a copy of your instance before you rely on it for recovery.
Questions buyers ask about external PostgreSQL for Zammad
What work is involved in connecting Zammad to an external PostgreSQL server?
The work is creating a PostgreSQL role and database for Zammad with the permissions it needs, pointing the Zammad database configuration at the external host, and verifying that the application starts, migrates and runs its scheduled jobs against it. Zammad documents a separate page for configuring the database server, and the package installation only installs a local PostgreSQL when no server is detected, so the external server must be in place before the install or the configuration must be changed afterward. Further work covers connection pooling with PgBouncer in session mode, TLS to the database, and testing backups and restores. DeployOpen plans and implements this work in your infrastructure, and the written scope shows which of these steps are included.
Can an internal team connect Zammad to PostgreSQL without outside help?
Often yes, if the team already runs PostgreSQL and can operate Zammad on Linux. The configuration itself is short, but the risk sits in the details: the required PostgreSQL version (Zammad needs PostgreSQL 15 or newer), role permissions, PgBouncer settings that break Zammad when transaction pooling is used, TLS certificate trust, and how the database is included in backups. Check whether your team has done a restore test against the new database, not only a backup job. A partner adds value when the team lacks PostgreSQL operations experience, when the database must meet internal standards, or when the deployment has to be reviewed by security or compliance staff before go-live.
What makes the effort for an external PostgreSQL setup larger or smaller?
The main drivers are your existing database standards, the availability target, and whether data must move. If your organization already has a managed or supervised PostgreSQL platform with approved roles, backup tooling and monitoring, the Zammad work is mostly configuration and testing. Effort rises with high availability requirements, because PostgreSQL does not detect a failed primary or promote a standby on its own, so automatic failover needs external tools. Effort also rises with mandatory TLS, certificate rotation, session pooling through PgBouncer, and migration of an existing Zammad database from a bundled server. Ask the partner which of these drivers the quote assumes and what would change the estimate.
What recurring work follows an external PostgreSQL connection for Zammad?
The recurring work is applying PostgreSQL minor releases, planning major upgrades, and keeping the database within a supported version. PostgreSQL releases minor updates at least once every three months, and minor updates replace executables and require a restart without changing the storage format. Major versions are supported for 5 years after release, and the currently supported list includes 14 (to November 12, 2026) and 15 (to November 11, 2027). Recurring work also covers monitoring connections, checking PgBouncer behavior after Zammad upgrades, rotating TLS certificates, and running restore tests. Ask the partner whether these tasks are in a retainer or handed over as runbooks.
Does a managed PostgreSQL service work with Zammad?
A managed PostgreSQL service can work if it provides PostgreSQL 15 or newer, the role and database permissions Zammad needs, TLS to the endpoint, and a connection path that fits your pooling choice. Confirm with the provider whether the service allows the privileges used during Zammad setup, whether it exposes the session-level behavior PgBouncer must preserve, and how it handles maintenance windows and major upgrades. Also confirm where the data is stored and who can access backups, because this affects your compliance review. The managed service does not remove the need to configure Zammad, test restores or document the connection for your security team.
What should a fixed-scope quote for this work include?
A fixed-scope quote should list the PostgreSQL version and hosting model, the Zammad version and install method, and the exact steps covered, such as role creation, configuration, PgBouncer in session pooling mode, TLS setup and a restore test. It should state what is excluded, including high availability tooling, data migration from an existing database, and ongoing upgrades. Ask for the acceptance tests, the handover documents, and the named responsibilities for your team and the partner. Request the assumptions behind the price, such as the number of environments and whether a staging system is included. DeployOpen agrees scope, deliverables and timelines in writing before work starts, and provides a quote from that written scope.
Why use session pooling instead of transaction pooling with PgBouncer for Zammad?
Use session pooling because Zammad depends on session-level behavior that transaction pooling can break. PgBouncer offers several pool modes, and the choice determines whether a server connection stays with a client for the whole session or only for one transaction. Configure the pool mode in the PgBouncer settings, then test a full Zammad workflow, including background jobs and login, under the pool you chose. Confirm the exact requirement against the Zammad documentation for your version, since the database configuration page is the right reference before you change the pool mode. Record the setting in your runbook so a later PgBouncer upgrade does not silently change it.
How DeployOpen works on this
DeployOpen plans and builds the external PostgreSQL connection for Zammad inside your own infrastructure, so your database, network and security teams can review each decision before it goes live. The work follows a written scope, with the database configuration, permissions, pooling and TLS settings documented and tested against your environment.
How we scope
- Confirm your PostgreSQL platform, version and whether it is managed or self-run, against the PostgreSQL 15 or newer requirement for Zammad.
- Agree in writing which parts of the database setup are in scope, such as the Zammad database configuration file, creation permissions and TLS.
- Record whether PgBouncer is in the path, which pooling mode applies and who owns the database servers, backups and failover.
How we build
- Prepare the database user and permissions so Zammad can create and maintain its schema without broader rights than the setup needs.
- Configure the Zammad database settings, then place PgBouncer in session pooling mode, since transaction pooling is not the mode to use with Zammad.
- Enable TLS between Zammad and the database and test connections, failover behavior and restarts in a non-production environment first.
How we hand over
- Deliver a written record of the configuration, permission model, pooling mode and TLS settings, with the reasons behind each choice.
- Provide a verification checklist your team can rerun after upgrades, certificate renewals or changes to the database server.
- Walk your database, network and Zammad administrators through the runbook so they can operate the connection without DeployOpen.
How we support
- Engagements are fixed-scope, so scope, deliverables and timelines are agreed in writing before the work starts.
- Ongoing support, upgrades and continuous testing are available as a retainer, including planned Zammad or PostgreSQL version changes.
- Ask for a quote based on the written scope, which covers your database platform, number of environments and any PgBouncer or TLS work.

