X-Road Security Server with a remote or managed PostgreSQL database

Moving the Security Server's serverconf, messagelog and opmonitor databases to a separate or managed PostgreSQL service, and what that changes for operations, security and migration.

On this page

When a remote PostgreSQL database fits an X-Road Security Server

A remote PostgreSQL database fits an X-Road Security Server when the member organization wants database operations, backup and availability handled by a dedicated database platform rather than by the Security Server host itself. The Security Server requires PostgreSQL, whether that database runs locally or on a separate server, and remote deployments include managed services such as AWS RDS and Azure Database for PostgreSQL. The decision therefore concerns where the database runs and who operates it, not whether a database is needed at all.

The Security Server uses three databases: serverconf for its configuration, messagelog for the log of exchanged messages, and opmonitor for operational monitoring data. Each of them must be reachable from the Security Server, and the choice of local or remote placement applies to all three together. Teams should check whether their database standards, backup regime and retention needs for the message log can be met by the chosen service, and confirm with the current installation guide which connection settings and database users the installer expects before they commit to a design.

Before choosing a remote service, ask the managed provider and your own platform team a few concrete questions: which PostgreSQL major version is offered and how long it will be supported, how backups and point-in-time recovery are configured, how network access is restricted to the Security Server hosts, and who performs minor and major upgrades. The X-Road Security Server installation guide is the natural next read for the supported database setup. Migrating an existing local database later is a separate exercise, which this page covers in its later sections.

Local, separate server or managed service: which option fits

This table compares three places to run the serverconf, messagelog and opmonitor databases: local PostgreSQL on the Security Server host, a self-managed separate PostgreSQL server, and a managed service such as AWS RDS or Azure Database for PostgreSQL. Read each row as a question to answer for your environment, and use the last row to list what to confirm before committing to a design.

FactorLocal on the Security Server hostSeparate self-managed PostgreSQL serverManaged service (AWS RDS or Azure Database for PostgreSQL)
Who patches PostgreSQLYour team, on the same host as the Security ServerYour database team, on a host you controlProvider applies platform maintenance, but your team must confirm the maintenance window and PostgreSQL major version schedule
Who runs backups and restoresYour team, usually on the same host as X-Road backupsYour database team, with backups kept separate from the Security Server hostProvider offers automated backups, but retention, restore testing and copy location are set by your team
Network placementNo database network path; database traffic stays on the hostPrivate network path from the Security Server to the database host, restricted by firewall rulesPrivate endpoint or VPC/VNet connectivity to the Security Server network, with access restricted by security groups or firewall rules
Operational controlFull control of configuration, but shares resources with the Security ServerFull control of PostgreSQL settings and host resourcesLimited access to host-level and some server parameter settings, set by the provider's service model
Resource sharing and growthMessage log growth competes with the Security Server for disk and memoryDatabase storage and memory are dedicated, but you size and expand themStorage and compute are changed through the provider console or API, which may need a planned maintenance step
Support for X-Road database setupMatches the default local setup described in the installation guideRequires the database to be reachable, with the correct role and database created before installationRequires confirming that the service version, extensions and authentication settings meet the Security Server requirements
Confirm with the vendor or platform teamLocal disk, backup schedule and whether the host can carry message log growthSupported PostgreSQL version, TLS and SCRAM authentication settings, and HA designSupported PostgreSQL versions, required parameters, backup retention, private connectivity options and any cost terms for the chosen tier

How to point the Security Server at a remote database

This sequence takes a Security Server from a local database to a separate PostgreSQL server or managed service, with the serverconf, messagelog and opmonitor databases each confirmed to read and write. The result is a server whose state lives outside the host and can be reviewed, backed up and monitored with the rest of your database estate.

  1. Confirm the PostgreSQL version and support dates

    Before any change, confirm that the PostgreSQL major version you plan to use is supported and check its end date. The supported versions are 18 (final release November 14, 2030), 17 (to November 8, 2029), 16 (to November 9, 2028), 15 (to November 11, 2027) and 14 (to November 12, 2026). Versions 13 and earlier are unsupported. Confirm the exact PostgreSQL version against the Security Server installation guide for the X-Road release you run, since compatibility is set by X-Road, not only by PostgreSQL. The step is done when you have a written version choice and its end-of-support date in your change record.

  2. Prepare roles and databases on the server

    A database administrator creates one login role for the Security Server and the three databases it uses: serverconf, messagelog and opmonitor. Give the role ownership of its own databases only, and use a strong password stored in your secrets manager. For managed services, create the role and databases through the provider's console or CLI, and confirm that the role can connect from the Security Server's address. Authentication should use SCRAM rather than MD5, since PostgreSQL 18 deprecated MD5 password authentication. The step is done when a test login with the new role succeeds and lists the three empty databases.

  3. Open network and TLS access from the Security Server

    Allow the Security Server host to reach the PostgreSQL port, usually 5432 unless your service uses another, through your firewall, security groups or private endpoints. Keep the database off public networks. Enable TLS for the connection and, where your policy requires it, verify the server certificate against a trusted CA on the Security Server. Confirm the route from the Security Server host with a client tool before touching X-Road configuration. The step is done when a TLS-encrypted session opens from the Security Server host to the database and the server certificate is validated.

  4. Point the three databases at the remote server

    Using the database connection settings in the installation guide, set the host, port, role, database names and TLS options for serverconf, messagelog and opmonitor. Confirm the exact configuration keys against the X-Road version you run, because the names and file locations change between releases. Store the password in the location the guide specifies and restrict file permissions to the service account. Restart the Security Server services in the order the guide describes. The step is done when the configuration files for all three databases reference the remote host and no local database is used for them.

  5. Verify the server starts and reads and writes each database

    Start the Security Server and check the service status and logs for connection errors. Then confirm that each database receives data: serverconf should reflect a configuration change made in the admin UI, and messagelog and opmonitor should show new rows after test exchanges or monitoring activity. Run this check on a test server first where you can. The step is done when the server runs, each database shows writes that match the activity you generated, and the logs contain no repeated connection or authentication failures.

  6. Check monitoring, backups and connection limits

    Confirm that the monitoring add-ons and operational checks still report correctly with the databases remote, and that the database host is covered by your database monitoring, backups and point-in-time recovery. Review connection counts against the server's limits, and decide whether a connection pooler such as PgBouncer is needed for your load. Ask your managed service provider which backup and recovery features apply to your plan. The step is done when monitoring shows all three databases, a backup or recovery test has been recorded, and the connection headroom is documented.

How to migrate an existing Security Server off its local database

Moving a running Security Server off its local PostgreSQL database is a planned maintenance task, and the first decision is the window in which the server stops accepting and sending messages. Schedule that window with the members who consume your services and publish services through the server, because message exchange pauses while the databases are copied and the Security Server is repointed. Before the window opens, confirm that the remote PostgreSQL server meets the version and connectivity requirements for your X-Road release, and that the Security Server can reach it on the database port from its internal network. Record the current database connection settings and the names of the serverconf, messagelog and opmonitor databases so you can reverse the change if needed.

The data move itself uses the same three approaches PostgreSQL documents for major upgrades: a dump and restore with pg_dumpall, pg_upgrade, or logical replication. A dump and restore is the simplest to reason about, but it requires the most downtime for the message log, which often holds the largest share of data. Logical replication can shorten the cutover, yet it depends on the table and version compatibility your release supports and must be tested first. Whichever method you choose, take a fresh backup of all three databases, restore it into the remote server, and compare row counts and the latest timestamps in each database against the source before you change anything on the Security Server. The exact procedure, including which database user and privileges X-Road expects and how the backup and configuration files are handled, must be confirmed in the installation and backup documentation for your version.

After repointing the Security Server to the remote database, verify the result before retiring the local copy. Confirm that the admin UI shows the expected configuration, that a test service call and a test consumer exchange complete, and that new entries appear in the message log on the remote server. Check the operational monitoring data as well, since the opmonitor database must also be reachable. Keep the local database intact but stopped for a period you agree with your operations team, so a rollback to the original settings stays possible. Only after that period and a documented sign-off should you remove the local copy. Plan a rollback procedure in advance, and confirm with NIIS or your upgrade partner that your release supports this migration path.

Security controls for a remote database connection

Moving the serverconf, messagelog and opmonitor databases off the Security Server host puts a network connection between the two, and that connection becomes part of the trust boundary. The controls below cover how the Security Server authenticates to PostgreSQL, how the traffic is protected, which roles and networks can reach the data, and how the message log is kept safe once it leaves the host.

Choose the authentication method

PostgreSQL documents password, GSSAPI, SSPI, LDAP, RADIUS, certificate, PAM and OAuth authentication. For a password login, require SCRAM rather than MD5, because PostgreSQL 18 deprecated MD5 password authentication in favor of SCRAM. Confirm which method your database service offers, since managed services may limit the options available to you. Ask the X-Road installation team which method the Security Server's database connection is configured to use.

PostgreSQL authentication methods

Encrypt the database connection

Database traffic carries configuration and message log data between the Security Server and PostgreSQL, so it should be encrypted in transit even on a private network. Confirm that the Security Server's connection settings require TLS to the database, and that the database server presents a certificate the Security Server trusts. For managed services, confirm the TLS mode the provider enforces by default and whether it can be made mandatory.

Separate roles for each database

Create a dedicated login role for each of serverconf, messagelog and opmonitor, each with rights only on its own database. A single shared superuser account gives an attacker who obtains the Security Server's database credentials access to all three stores, including the message log that serves as evidence. Ask the installer to document which role connects to which database, and keep the superuser credentials away from the Security Server host.

Restrict network access to the Security Server

Allow inbound connections to PostgreSQL only from the Security Server's address, on the PostgreSQL listening port, and deny everything else at both the database firewall and the network layer. Managed services usually offer network rules or private endpoints that serve this purpose. Confirm that the database is not reachable from the internet and that no other application shares the same database login.

Protect messagelog database backups

The messagelog database holds the exchanged message records that X-Road relies on as evidence, so its backups need the same protection as the live data. Encrypt backups at rest, restrict who can restore or download them, and test restores periodically. Point-in-time recovery depends on archived WAL files, which need the same controls. Confirm with your managed service provider how its automated backups are encrypted and who can access them.

Continuous archiving docs

Apply host account and SSH controls

The Security Server host still needs the hardening guide's baseline even when the data lives elsewhere, because the database credentials are stored on it. The guide recommends locking accounts for 15 minutes after 3 failed logins, passwords of at least 16 characters, and key-only SSH. Keep the database connection secrets readable only by the service account, and make sure the host's access controls are reviewed together with the database rules.

Hardening guidelines

How the Security Server connects to its databases

Traffic from other members arrives on TCP 5500 and 5577 at the Security Server, which terminates it on the internal side of the firewall. The Security Server then opens its own connections to PostgreSQL, one database each for serverconf, messagelog and opmonitor, whether the server is local, on a separate host, or a managed service. The database port is reachable only from the Security Server, never from external member networks. Check that the database endpoint, TLS settings and firewall rules match the path shown before you cut over.

External member traffic ends at the Security Server, which alone connects to the three databases.

Limits to confirm in your environment

A remote or managed PostgreSQL database moves part of the Security Server's failure modes outside the X-Road host. The cards below list the points where the database service, the X-Road release and your network each set a limit that you should confirm before production cutover.

Supported PostgreSQL versions

Confirm that the PostgreSQL major version your managed service offers is on the support list for your X-Road release. The supported PostgreSQL majors are 14 through 18, with 14 ending in November 2026, so a managed instance on an older or soon-to-retire major will need an upgrade plan. Ask the X-Road release notes and your service provider which majors are tested with your exact package version.

Supported majors
14 to 18
PostgreSQL versioning policy

Managed failover behavior

Managed services advertise their own high availability, but the Security Server expects the database endpoint to behave predictably during a failover. Confirm how the service switches roles, whether the connection endpoint changes, and how long open sessions take to reconnect. PostgreSQL itself does not detect primary failure, so the managed platform's failover logic is the mechanism you are relying on.

PostgreSQL failover docs

Connection pooling with PgBouncer

PgBouncer is documented as a PostgreSQL connection pooler, but whether the Security Server works correctly through it is a compatibility question you must confirm with NIIS or your support channel for your release. Do not place a pooler in the path until the X-Road team has confirmed it, and test the admin UI, message logging and monitoring database access through it under load.

PgBouncer project

Latency between server and database

The Security Server writes message log and operational data on every exchange, so the network path to the database affects throughput and response times. Measure round-trip latency from the Security Server to the database endpoint on the network path you will use, including any cross-zone or VPN hop. A remote database placed far from the server increases the cost of each write, and that cost grows with message volume.

Managed maintenance windows

Managed PostgreSQL services apply minor and major updates on schedules you may not fully control. Ask how maintenance windows are set, whether you can defer them, and whether a maintenance restart interrupts the database endpoint that the Security Server holds open. Plan your X-Road change calendar around these windows so that a database restart is not mistaken for a message exchange fault.

X-Road 7 maintenance outlook

NIIS intends to maintain X-Road 7 with bug fixes and security patches beyond 2026, but the length of that period has not been decided. Because the database is a long-lived dependency, ask NIIS for the current end-of-support date before you commit to a PostgreSQL major and an X-Road 7 release. Factor the open question into your upgrade plan for both the Security Server and the database.

Last new-feature 7.x
7.8.0
NIIS 7.8.0 announcement

Questions buyers ask before using a remote PostgreSQL database

What does it cost to move an X-Road Security Server to a remote PostgreSQL database?

The cost is the labor to plan, configure, migrate and verify the databases, plus any infrastructure you add, such as a database server, storage, backups and monitoring. Quotes vary mainly with the number of Security Servers, whether existing serverconf, messagelog and opmonitor data must be carried over, how many environments (test, staging, production) are involved, and whether you use a managed service or run PostgreSQL yourself. Ask the quote to list each database and server separately, state which items are one-time and which recur (cloud service fees, support, patching windows), and name who pays for database hosting. DeployOpen does not publish prices, so the figure comes from the written scope.

How long does a remote PostgreSQL migration take?

Duration depends on the number of Security Servers, the size of the message log that must be moved, how many environments are involved, and how long your change process takes to approve a maintenance window. The message log usually drives the most work because it grows with exchange volume, so check its size on each server before planning. No fixed timeline applies to every environment, so ask the quote for a phase-by-phase schedule that shows build, test, cutover and rollback steps, and confirm which approvals fall on the critical path.

What do we need to provide before the work starts?

You need to provide the following before work begins:

  • Network access from each Security Server to the PostgreSQL endpoint, with the firewall and security group rules approved by your network team.
  • Administrative credentials or a provisioned database user for each X-Road database, and a decision on how those secrets are stored.
  • A maintenance window for cutover and a named approver for each change.
  • Current backup copies of the Security Server configuration and databases, and a tested restore path.
  • A list of target PostgreSQL versions. Supported major versions currently include 14 through 18, and 14 reaches end of support on November 12, 2026, so confirm which version your organization standardizes on before the build.
Can our own team migrate X-Road to a remote database without a partner?

Yes, if your team already runs the Security Server and has working PostgreSQL administration skills. The work requires a clear understanding of the three databases, safe handling of credentials, network path testing, and a tested rollback plan. Teams that run the Security Server only occasionally often find the cutover and verification steps take longer than expected, so decide early whether you have people available for the window. A partner can take the planning, build and verification off your team's plate under a written scope, while your staff keep ownership of approvals and production access.

How does a managed service like AWS RDS or Azure Database for PostgreSQL change responsibilities?

A managed service moves patching of the database engine, much of the backup tooling and the underlying hosting to the cloud provider, while your team still owns the X-Road configuration, database users, network rules, parameter choices and restore testing. Confirm with the provider which backup, point-in-time recovery and maintenance features apply to your chosen tier and region. Also confirm the service's major-version lifecycle, because upgrades still need planning on your side. The X-Road Security Server supports both self-run and managed PostgreSQL, so the split of duties should be written into the scope.

What happens to the existing local database during migration?

The local database should stay in place and untouched until the remote databases are verified and the Security Server has been tested against them, because it is your fallback. During cutover, the server is stopped briefly, data is copied, configuration is pointed at the remote endpoint, and the server is restarted and checked. Keep the local data until the team signs off and a backup has been restored at least once in a test environment. Decide in advance how long the old copy is kept and when it is removed, and record that decision in the change ticket.

What risks should we check before choosing a remote database?

The main risks are network path failures between the Security Server and the database, credentials exposed in configuration files, database latency that slows message handling, and a rollback that was never tested. Check the message log growth rate, since it sets the storage and backup volume the remote service must carry. Also confirm the Security Server's security settings in the hardening guidance, and review how database access is logged and restricted. Ask the quote to include a rollback test and a documented restore procedure.

How DeployOpen scopes a remote database engagement

DeployOpen plans a remote or managed PostgreSQL move for the Security Server as a fixed-scope engagement, with the scope, deliverables and timeline agreed in writing before any work starts. The written scope names which databases move (serverconf, messagelog and opmonitor), the target service (a separate PostgreSQL server or a managed service such as AWS RDS or Azure Database for PostgreSQL), the Security Server nodes involved, whether the work is a fresh install or a migration off a local database, and the acceptance checks that close the engagement. It also states what is out of scope, such as network design beyond the database path, the PostgreSQL platform itself, or changes to the X-Road Central Server. Because the Security Server requires PostgreSQL whether local or remote, the scope should say exactly which database version and connection settings the X-Road release in use supports, and that confirmation should come from the official installation guide and the vendor of the managed service before the statement of work is signed.

The reader provides the inputs that decide most of the work: the current X-Road release and package source, the current database location and size, the target PostgreSQL version and its support window, the network path and firewall rules between the Security Server and the database, the credential and TLS model the organization requires, and the backup and rollback arrangements. Access to the Security Server, the database host and the cloud account, along with named contacts for each, should be settled at the start. A change window must be agreed with the operations team, because the migration stops X-Road message exchange while the databases are moved and verified. DeployOpen does not publish prices. A quote follows from the written scope, so the more precise the environment details and change constraints provided up front, the more closely the quote reflects the actual work.

How DeployOpen delivers and supports this

DeployOpen plans, builds, documents and supports X-Road Security Server deployments inside your own infrastructure, including the decision to run serverconf, messagelog and opmonitor on a remote or managed PostgreSQL server. Work starts with a written scope that names the database platform, the migration path and the verification steps before any change is made to a production member server.

How we scope

  • Written scope names the PostgreSQL platform, whether self-managed, AWS RDS or Azure Database for PostgreSQL, and the PostgreSQL major version to run.
  • Scope records which databases move off the local host and whether migration from an existing local database is included.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts, and a quote follows from that scope.

How we build

  • We confirm network paths, TLS, credentials and firewall rules between the Security Server and the database before installing or switching any database connection.
  • Migration runs in a rehearsal copy first, with the message log and configuration checked against the original before cutover.
  • Backup, restore and failover behavior of the chosen database service is tested, so recovery steps are documented rather than assumed.

How we hand over

  • Handover includes a runbook covering connection settings, database users, parameter values, maintenance windows and rollback steps.
  • Documentation records the evidence compliance and security teams need to review the database configuration and access controls.
  • Your team receives a verification checklist for post-cutover checks, including Security Server health and message exchange tests.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers for the Security Server and its database.
  • Retainer work can cover X-Road minor release upgrades and PostgreSQL minor and major upgrade planning as versions change.
  • Periodic reviews re-check database access, backups and configuration against the hardening guidance your organization follows.

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.