Running the X-Road Security Server Sidecar on Docker

A containerized X-Road Security Server suits teams that already run Docker in infrastructure they control. Production use needs persistent state, an external PostgreSQL database and a plan for keys and network ports.

On this page

When a Docker Security Server sidecar fits your X-Road setup

The Docker deployment is one of several supported ways to run the X-Road Security Server, alongside Ubuntu and Red Hat Enterprise Linux. It fits a platform or integration team that already standardizes on containers and can manage container state, signing keys and database connections as part of normal operations. Every X-Road member runs a Security Server, so the real question is less whether a container can run it and more whether your team will own the lifecycle around it. Before choosing, check the hardware floor: the installation guide lists a minimum of 3 GB RAM (4 GB with monitoring add-ons) and 3 GB free disk space for the supported host platforms. Confirm with the image documentation that the same figures apply to the container and its host, since the container draws on the host's memory and disk.

A containerized server moves state out of the operating system and into volumes and configuration that you must manage. Ask whether your container platform can keep persistent volumes for the server configuration and message log data, back them up, and restore them to a replacement container without losing the keys that identify your member. Decide early whether the database runs on the same host, which is simpler for testing, or on a separate PostgreSQL service, which keeps data outside the container lifecycle. Your team also owns image selection and upgrades, which follow the X-Road release line. The currently supported versions are 7.8.3, 7.7.4 and 7.6.5, so check the releases page before pinning an image tag.

The container does not remove any of the usual X-Road work. PostgreSQL is still required, whether local or remote. The server still has to be registered with the governing authority, hold certificates issued by an approved certification authority, and sit behind a network design that exposes TCP 5500 and 5577 to other members while keeping the admin UI on TCP 4000 internal to your network. Plan those steps as you would for a virtual machine. Container packaging changes how the server starts and where its files live. It leaves unchanged what the server must connect to. Confirm each step against the installation guide before you commit to the container path.

Trust boundaries decide which ports each side can reach

The diagram starts with two groups of callers. Other members reach the Security Server container on TCP 5500 for message exchange and TCP 5577 for OCSP from external networks. Internal information systems use 8080 or 8443, and administrators use TCP 4000 for the admin UI. The container connects to an external PostgreSQL service, which can be local or managed, and its persistent volumes hold state that must survive container replacement. Check that only these listed ports cross each boundary and that the database and volumes sit outside the disposable container layer.

Database and key storage sit outside the disposable container layer.

Which deployment option fits: Docker, package install or Kubernetes

This table compares running a Security Server as a Docker container on a host you control, as a package install on Ubuntu or RHEL, and as a Kubernetes deployment. Read each row as the question to settle before choosing, and confirm specifics against the installation guide for your version. The main takeaway is that the containerized Sidecar moves the operating system and packaging work to you, while the standalone Docker image is for testing only.

Decision areaDocker Sidecar on a host you controlPackage install on Ubuntu or RHELKubernetes deployment
Who manages the operating systemYour team manages the host OS, container runtime and host patchingYour team manages the OS on Ubuntu Server 22.04 or 24.04 LTS, or RHEL 8 or 9Your platform team manages nodes, cluster upgrades and the OS image
Where state and keys persistIn persistent volumes you mount for configuration, keys and logs, confirmed with the image documentationOn the host filesystem and in the PostgreSQL databasesIn persistent volumes and secrets managed by the cluster, with the pattern covered on the sibling Kubernetes page
DatabaseExternal PostgreSQL is the production choice, local or remote, per the installation guideLocal or remote PostgreSQL, including managed services such as AWS RDS or Azure Database for PostgreSQLExternal PostgreSQL, usually a managed service, to be confirmed for your cluster design
What you operateImage version pinning, volume backups, container restarts and host security updatesPackage upgrades from the NIIS repository, service checks and backups of the host and databasesPod probes, volumes, secrets, cluster upgrades and the primary and secondary pod layout
Upgrade pathReplace the image version with a supported release and confirm volume compatibility firstPackage upgrade on the host, planned against the upgrade guidance for your releaseRolling changes at the workload level, which need testing against the release you run
When it fitsYour organization already runs supported container hosts and wants packaged deploymentYou want the conventional host-based install and standard OS toolingYour organization already operates Kubernetes clusters and standard pod-level tooling
Standalone Docker imageNot a production option. It is for testing, development and trying integrationsNot applicableNot applicable

What must survive a container restart: volumes and the external database

A Security Server holds state that cannot be rebuilt from the image: its configuration, the signing and authentication keys it uses to represent your organization, and its logs. If any of that lives only in the container's writable layer, replacing the container, whether for an image update or a failed host, means losing the server's identity and evidence. Before the first start, confirm in the installation guide and in the documentation for the container image which paths the image expects to be mounted as persistent volumes, and whether the key material and the message log are kept in those same locations. Do not assume a path. Write the confirmed paths down, then test a container replacement in a non-production environment and check that the configuration, keys and logs are still present afterward.

The Security Server requires PostgreSQL, either local or remote, and the Security Server installation guide lists managed services such as AWS RDS and Azure Database for PostgreSQL as options. Running the database outside the container means the database layer, not the Docker host, carries backup, point-in-time recovery and failover. That is a real change in responsibility: someone must own the database's backup schedule, restore tests, maintenance windows and access controls, and the Security Server's own backup procedure must still cover what it keeps outside the database. Ask your platform team to confirm which databases the image expects to reach, how connection details and credentials are passed into the container, and whether the image supports TLS to the database.

Before you commit to an image variant or a database layout, confirm three things against the current image documentation: which image variants exist and which one matches your supported platform, the exact volume paths and their ownership requirements, and the environment variables or secrets mechanism used for database settings. Record the answers in your runbook, because a wrong assumption here usually shows up only after a restart or an upgrade. If the vendor documentation does not answer a question, raise it with NIIS or your X-Road support channel before the production build starts.

Setup sequence for a production container with an external database

This sequence takes a container host from checked resources to a Security Server container that reaches its external PostgreSQL databases, keeps its configuration across restarts and serves its admin UI on the internal network. Each step closes with a check, so a failure is caught before the server holds any configuration or keys. Registration with the governing authority comes after these checks.

  1. Confirm host memory and disk minimums

    The operator on the container host confirms the machine meets the Security Server minimums of 3 GB RAM and 3 GB free disk space, or 4 GB RAM if the monitoring add-ons will run. Use free -h to check memory and df -h on the planned volume location to check free disk. Confirm the Docker Engine version and storage driver match what your container platform team has approved for production. Check: a written record of memory and free disk, with both values at or above the minimums before you continue. Sizing for message log growth is covered on a separate page.

  2. Provision PostgreSQL and test connectivity

    The database team provisions PostgreSQL, either on servers you run or as a managed service such as AWS RDS or Azure Database for PostgreSQL. Create a dedicated role and the databases for the serverconf, messagelog and opmonitor data, using the exact names and privileges the image documentation expects. From the container host itself, run psql against the database address and port the container will use. Check: a successful login with the application role, and a network path that stays inside the approved zone.

  3. Create and mount persistent volumes

    Create named Docker volumes or host directories for configuration and key material, and mount them at the container paths the image documents. Restrict ownership and permissions on the host side so only the account the container runs as can read the key files. Keep these volumes separate from the container's writable layer so that removing the container does not remove configuration. Check: docker inspect shows each volume attached at the documented path, and a test file written from inside the container appears on the host.

  4. Set database connection settings

    Pass the PostgreSQL host, port, database names and credentials through the mechanism the image documents, such as environment variables, a mounted configuration file or a secrets store your platform supports. Keep passwords out of compose files committed to source control and out of shell history. Set the database address to the host confirmed in the connectivity test. Check: the container log shows a connection to each database without authentication errors, and no credential value appears in docker inspect output.

  5. Open required ports by network zone

    Open TCP 5500 and 5577 from external networks so other members can exchange messages and query OCSP. Open TCP 4000 for the admin UI, and TCP 8080 or 8443 for information system access, only from internal networks, choosing the port your design uses. Apply the rules in the host firewall and in any network firewall in front of the container, and publish only the ports the design needs. Check: from an external test host, 5500 and 5577 answer while 4000 does not, and from an internal host, the admin UI port answers.

  6. Verify hardware token support before keys

    If signing or authentication keys will be held in a hardware security module, confirm support before any key is created on this server. X-Road reaches HSMs through PKCS#11 drivers installed with the xroad-addon-hwtokens package, and it supports RSA and EC keys. Inside the container image, confirm the package is installed and that the vendor PKCS#11 module loads and lists the token. Confirm the supported driver versions with the HSM vendor and the image documentation. Check: the package query and the token listing both succeed from inside the container, and any failure is resolved before key creation begins.

  7. Start the container and confirm the admin UI

    Start the container with the volumes, database settings and port mappings from the earlier steps, using the start command the image documents. Watch the startup log until the server reports that it is running and no restart loop appears. From an internal host, open the admin UI on TCP 4000 and sign in with the administrative account the image documents. Check: docker ps shows the container running with a stable status and no repeated restarts, and the admin UI login page loads over the internal network.

  8. Confirm schema initialization and restart persistence

    Connect to each PostgreSQL database and list its tables to confirm the Security Server created its schema on first start. Restart the container with docker restart, then confirm the admin UI shows the same configuration and the volume contents are unchanged. If your change process requires it, also remove and recreate the container using the same volumes and repeat the check. Check: the table lists are present in all three databases, and configuration and keys survive both the restart and the recreation. Registration with the governing authority follows on its own page.

Why Docker Desktop is limited to testing

Docker Desktop is a poor production host for a Security Server because it is a developer workstation, not a server the organization operates for long-running availability. Its lifecycle follows a user session: the container stops when the laptop sleeps, the user logs out, the machine is replaced or the VM is reset. A Security Server that other members expect to answer message exchange and OCSP requests cannot depend on that. The same workstation also makes the controls your security and compliance teams will ask about harder to define: who can reach the host, where the signing and authentication keys sit, and how the message log and configuration are backed up and restored.

The network requirements make the problem concrete. Other members reach the Security Server on TCP 5500 for message exchange and on TCP 5577 for OCSP, so the endpoint needs stable addressing and firewall rules that the organization can document and audit. A laptop on a changing home or office network, behind a NAT layer managed by someone else, does not provide that. Before you rule out a host, check whether its address can stay fixed, whether inbound rules can be scoped to the networks that need them, and whether the platform's own network translation will be part of your change process.

Docker Desktop still has a clear role. It suits trying the software, developing against services and testing integrations before a production server is registered, and the sibling page on the standalone test image covers that use in detail. Keep test containers separate from anything that holds production keys or message logs. Because Docker's licensing terms and supported host configurations change over time, confirm the current Docker Desktop license terms for your organization and the supported configurations with the vendor before you standardize on it for any shared or long-lived environment.

Security controls a container deployment must still meet

A container changes where the Security Server runs, not what it must protect. The controls below cover admin access, host access, configuration exposure, secrets and network surface, and each one needs an owner on your side. Check them against the hardening guide before the sidecar takes traffic.

Admin access through PAM and LDAP

The Security Server authenticates admin users through PAM, and SSSD can map LDAP groups to the five X-Road roles: Security Officer, Registration Officer, Service Administrator, System Administrator and Security Server Observer. Decide which directory groups map to which roles and keep the mapping in version control. The hardening guide's account lockout (15 minutes after 3 failed logins) and its 16-character minimum password length should be verified inside the container's PAM configuration, not assumed from the host.

User guide

Account lockout and password policy

The hardening guide recommends locking accounts for 15 minutes after 3 failed logins and requiring passwords of at least 16 characters. Confirm these settings apply to the accounts inside the running container, including any accounts created by the image. Test the lockout path once during commissioning so you know the behavior before an operator depends on it.

Hardening guide

Key-only SSH on the container host

The container runs on a host that you administer, and that host's SSH service is an entry point to every Security Server container on it. The hardening guide recommends key-only SSH, so disable password logins on the host and restrict which keys can reach it. Keep administrative access to the host separate from administrative access to X-Road itself, so one compromised credential does not grant both.

Hardening guide

Allowed-hostnames against host header injection

The allowed-hostnames setting restricts which host names the Security Server accepts in incoming requests, which limits host header injection. Behind a container network, the names clients use often differ from the internal name, so list every name you intend to serve and nothing else. Review the list whenever a load balancer, DNS record or ingress rule changes.

Hardening guide

Global configuration over HTTPS

From version 7.4, the hardening guide recommends publishing global configuration over HTTPS. Confirm the sidecar version you run supports this and that the published endpoint uses a certificate your members trust. Check how the certificate is renewed inside the container lifecycle, because an expired certificate on the configuration endpoint stops distribution for every member that pulls from it.

Secrets outside image layers and shell history

Database passwords, key material and tokens should reach the container at runtime through a secrets mechanism your platform controls, not through build arguments, environment lines baked into an image or commands typed into a shell. Check the image history for leaked values, and clear shell history on hosts where secrets were entered by hand. Store the key material volume with restricted host permissions and back it up under the same controls as the database.

Installation guide

Exposed ports limited to required services

The Security Server needs TCP 5500 and 5577 reachable from external networks for message exchange and OCSP, and TCP 4000 plus 8080 or 8443 on the internal side for the admin UI and information system access. Publish only those ports from the container, bind the admin UI to a management network, and block everything else at the host and network firewall. Verify the published port list after every compose or orchestrator change.

Installation guide

Questions teams ask before running X-Road in Docker

Is running the X-Road Security Server in Docker supported for production?

The answer depends on which image, tag and documentation you use, so confirm it in writing before you commit. The NIIS GitHub repository lists Docker among the platforms the main X-Road components are supported on, alongside Ubuntu and RHEL. The package-based Security Server installation guide describes Ubuntu Server 22.04 and 24.04 LTS and Red Hat Enterprise Linux 8 and 9 on x86-64 as the supported host platforms. Ask NIIS, and confirm in your DeployOpen scope, which container image and support statement applies to production use. Docker Desktop should be treated as a test environment only.

What drives the effort of a Docker deployment for X-Road?

Most of the effort sits in the decisions around the container and its database, not in starting the container itself. The main drivers are:

  • Database: a PostgreSQL service, local or managed, holding the serverconf, messagelog and opmonitor databases.
  • Persistent storage: volumes for configuration and message log data that survive container replacement.
  • Network paths: inbound TCP 5500 and 5577 from other members, and TCP 4000 with 8080 or 8443 from internal networks.
  • Keys: signing and authentication keys, optionally held in a hardware security module through PKCS#11 and the xroad-addon-hwtokens package.

Each item adds design and review work. Ask for a written scope before any estimate of time.

How much of the Docker work can our own team do?

A team that already runs PostgreSQL, container hosts and Linux servers can carry much of the build and daily operation. The harder parts are integrating an HSM, protecting backups, and hardening the server. The X-Road security hardening guidelines, version 0.6 dated 09.01.2025, recommend locking accounts for 15 minutes after 3 failed logins, using passwords of at least 16 characters, and allowing key-only SSH. Registration and trust decisions stay with your organization and its governing authority. Ask any partner for a written split of responsibilities, so you know which tasks transfer and which remain with your staff.

What does a Docker deployment need from our organization?

Plan four inputs before the build starts:

  • PostgreSQL: a database service, local or managed such as AWS RDS or Azure Database for PostgreSQL, with backups you control.
  • Network access: firewall rules for the message exchange, OCSP and admin ports listed in the installation guide, approved by your network team.
  • Key ownership: a named owner for signing and authentication keys and for certificates from an approved certification authority.
  • Change windows: scheduled time for upgrades, role assignments across the five Security Server roles, and registration activity.

Confirm each input with your own infrastructure owners early, because they often set the critical path.

How long does a typical X-Road Docker setup take?

The container build can be short, but registration usually sets the calendar. Containers can start quickly once the database, volumes and network are ready. The server cannot exchange live messages until it is registered as a working member. That step involves importing the configuration anchor, creating keys, requesting certificates from an approved CA, and waiting for the governing authority to approve the registration request. Approvals follow that authority's schedule, not the project's. Ask for a written scope that separates build, registration and test milestones, and treat any single duration without that breakdown with caution.

How do upgrades differ between container and package installs?

Container upgrades move the image, volumes and database differently from package upgrades on a host, so confirm the steps against NIIS upgrade material for your target version. The current X-Road release is 7.8.3, and the supported versions are 7.8.3, 7.7.4 and 7.6.5. X-Road 7.8.0 is the last new-feature release of the 7.x line. A package install upgrades packages on the host, while a container install usually replaces the image tag and keeps the volumes and database. Either path needs a tested rollback plan with database and volume snapshots, plus a rehearsal on a copy first.

Does X-Road 8 change the Docker plan we should make now?

For production planning today, the 7.x line remains the reference, and X-Road 8 should be evaluated separately. X-Road 8 "Spaceship" is available for testing as 8.0.0 Beta 2, with its production release scheduled for December 2026. It is positioned as a data space solution with improved monitoring and cloud compatibility. 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. Ask NIIS and your partner which container path, if any, will apply to the version you deploy, and keep upgrade decisions in the written scope. See the X-Road releases page for current version information.

Limits to confirm in your environment before you commit

A containerized Security Server depends on several things outside the image itself: the release line you must run, the orchestrator and host combinations the vendor supports, the database service, the HSM driver and the storage behind the message log. Confirm each one in writing before you size or build, because a gap found after deployment is expensive to fix.

Image variants and release line

Ask which image variants and tags the vendor publishes and which one matches the release line your organization must run: 7.8.3, 7.7.4 or 7.6.5. Confirm that the tag you pin is a supported release, not only the latest tag, and that the variant includes the country-specific packages your operator requires. Confirm the process for applying security patches to a pinned tag, since the image does not update itself.

X-Road releases

Orchestrator and host OS combinations

Confirm which container runtimes, orchestrators and host operating systems the vendor supports for the sidecar. Docker Desktop is a testing environment, so production hosts should be server-grade Linux. Check whether the supported host OS matches the Ubuntu Server 22.04 or 24.04 LTS or RHEL 8 or 9 platforms in the installation guide, and ask for the test matrix behind that statement.

Installation guide

Managed PostgreSQL compatibility

Confirm that your managed PostgreSQL service and major version work with the Security Server before you select it. The installation guide names AWS RDS and Azure Database for PostgreSQL as examples of managed services, but the exact engine version and the database roles the Security Server needs should be confirmed with the vendor. Ask how the serverconf, messagelog and opmonitor databases are created and who holds the privileges to do so.

Database requirements

HSM PKCS#11 driver in the container

If your signing keys sit in a hardware security module, confirm with your HSM vendor that its PKCS#11 driver loads inside the container. The Security Server supports PKCS#11 drivers through the xroad-addon-hwtokens package with RSA and EC keys, but the driver library, network access to the HSM and any client certificates must be mounted and tested in the container. Plan a test that confirms key signing after a container restart.

Message log growth and storage

Confirm how fast the message log grows for your expected exchange volume and where it is stored inside the container. The message log is the main storage driver on a Security Server, so the persistent volume, its size, its backup schedule and its retention settings must be agreed before go-live. Ask the vendor and your storage team how volume expansion and snapshots behave on your platform.

X-Road 8 beta status

X-Road 8 Spaceship is available as 8.0.0 Beta 2 for testing, with its production release scheduled for December 2026. Do not build production images, Kubernetes manifests or runbooks on the beta. Plan the Docker deployment on the 7.x release line, and confirm with NIIS and your operator when a migration path will be documented for your environment.

X-Road GitHub repository

How DeployOpen scopes and delivers a Docker-based Security Server

DeployOpen approaches Running the X-Road Security Server Sidecar on Docker as a planned infrastructure job inside your own environment. We agree the container platform, database, network paths and handover material in writing before any build starts, then deliver a working Sidecar setup your team can review and operate.

How we scope

  • Written scope covers container host, image variant, volumes, external PostgreSQL and network ports for your environment.
  • Scope records which X-Road release line and supported operating system the Security Server containers will run on.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work begins.

How we build

  • We deploy the Sidecar on container infrastructure you control, with persistent volumes and external database connections configured.
  • We verify message exchange, OCSP and admin UI reachability on the ports your network design requires.
  • We test restart behavior and volume persistence so configuration and logs survive container replacement.

How we hand over

  • You receive documentation of image versions, volume mappings, secrets handling and database connection settings.
  • You receive a runbook covering start, stop, upgrade and rollback steps for the containerized Security Server.
  • You receive a verification checklist your team can rerun after changes to the host, database or network.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after handover.
  • Support can cover image upgrades when new X-Road releases are adopted, with changes reviewed before rollout.
  • Confirm with DeployOpen which support terms and response arrangements apply before signing a 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.