Running Zitadel as a Linux binary with systemd: when teams choose it
Choose the Linux binary when your infrastructure team must run Zitadel on servers it controls and has no container platform, or wants fewer moving parts between the operating system and the identity service. In this setup, the Zitadel binary runs under systemd as separate init, setup and start units against an external PostgreSQL database, with configuration held in YAML files on the host. DeployOpen plans and implements this pattern inside the client's own infrastructure, including the unit ordering, file ownership, database role and TLS settings that a systemd deployment depends on.
The Zitadel self-hosting documentation lists Linux and macOS binaries alongside Docker Compose and Kubernetes, so the binary is a documented path rather than a workaround. The same documentation recommends a Kubernetes cluster with the official Helm chart for high availability. Before choosing the binary, ask whether a single host or a small set of hosts meets your availability target, and whether your team can run failover, load balancing and rolling restarts without a scheduler. Confirm the supported PostgreSQL versions, which the Zitadel database documentation lists as 14 through 18, against the PostgreSQL release you plan to operate.
Confirm the current Zitadel release against the zitadel/zitadel releases page before you pin a version, since the most recent release we reviewed was v4.19.5, dated 15 October 2026. Pin the exact version in your deployment records, because upgrades on this path mean replacing the binary and running the setup phase again.
Binary, Docker Compose or Kubernetes: how to choose
A single small server or a staging host is where the binary is easiest to justify. You have one process to start, one configuration file to read, and no container runtime or cluster to maintain alongside Zitadel. For a non-production environment used for integration testing or demos, that smaller surface area usually matters more than redundancy.
- What the binary gives you: fewer runtime layers, a single executable, and a configuration file you can review in one place.
- What it leaves to you: process supervision, restarts after a crash or reboot, and host patching.
- What it leaves to you on upgrades: replacing the binary and running each upgrade step by hand, with a rollback copy kept ready.
- What it does not give you: failover. A single node is a single point of failure, so plan for an outage window instead.
- Where to go next: the Zitadel self-hosting overview lists the supported deployment paths, and the Docker Compose page covers a containerized alternative for small environments.
Before you choose this model, confirm with your team that a staging host will be kept close to production in its database version, TLS mode and domain settings, so test results carry over.
A team that already operates Linux servers with systemd can run Zitadel as a set of units that match how it already manages other services. Init, setup and start can be separate units with explicit ordering, logs go to the journal, and resource limits and restart policies live next to the service definition. This model suits organizations that want direct control over the host and no container orchestration layer.
- What the binary gives you: direct systemd control over ordering, restarts, environment files and sandboxing options.
- What it gives you for configuration: simple file-based YAML that config management tools can template and version.
- What it leaves to you: host patching, certificate renewal, and monitoring of the unit and its dependencies.
- What it leaves to you for availability: failover between hosts. A standard systemd unit does not move Zitadel to another server if the host fails.
- What it leaves to you for upgrades: downloading each release, checking the migration notes, running the init and setup steps, and restarting the start unit.
Before you commit, confirm who on the team owns each upgrade step and whether your change process can approve a binary swap on a fixed schedule.
Zitadel's documentation recommends a Kubernetes cluster with the official Helm chart for high availability. If your organization needs multiple replicas, rolling updates and automated restarts, or already runs Kubernetes with an ingress and certificate process, the Helm path fits those needs better than a hand-managed binary. The Helm and Docker Compose pages in this group cover those alternatives in detail, so this tab only sets out the trade-off.
- What the cluster gives you: scheduling, replica management and rolling upgrades managed by the platform.
- What the binary still needs from you: a load balancer, health checks and a second node with the same configuration, all built and tested by your team.
- What it leaves to you for failover: database failover is separate from Zitadel itself, so plan it with your PostgreSQL design.
- What your cluster adds to the work: cluster patching, ingress, and the masterkey handling your platform already uses for secrets.
- Where to go next: the Kubernetes Helm production page and the Docker Compose page explain the alternatives in their own terms.
Before you pick this path, ask your platform team whether it can support the Zitadel release cadence and whether the operational cost of a cluster is already covered by existing work.
Configuration options for a systemd-managed Zitadel binary
This table compares the configuration decisions an operator makes when running the Zitadel binary under systemd, with the fit and trade-off for each option. Read each row as a choice to settle before the first start, and confirm exact key names, accepted values and defaults in the Zitadel self-hosting documentation before writing any file.
| Decision | Option | Trade-off | Choose it when |
|---|---|---|---|
| Configuration source | YAML configuration file | Keeps settings reviewable and versioned in one place, but secrets should be kept out of the file itself. | Your team manages host config with a configuration management tool and wants one auditable file per environment. |
| Configuration source | Environment variables | Easy to override per unit, but values can leak through process listings and service overrides if not handled carefully. | Your secrets manager injects values into the unit environment and you want no secret stored on disk in plain text. |
| PostgreSQL connection | Host, port and database credentials in configuration | Simple to set up, but credentials sit alongside other settings and need restricted file permissions. | You run a single external PostgreSQL instance with a dedicated Zitadel role. |
| PostgreSQL sslmode | Require or verify-full (confirm accepted values) | Verify-full needs the CA certificate on the host and correct hostnames, adding setup work that pays off in certificate validation. | The database is on a network you do not fully control or is a managed service, where verified TLS is expected. |
| PostgreSQL sslmode | Disable | No encryption between Zitadel and the database, so traffic can be read or altered on the network path. | Generally not appropriate outside an isolated local test setup. |
| TLS at the external domain | ExternalSecure true with TLS terminated by Zitadel | Zitadel serves certificates directly, so you manage certificate files, renewal and reload on the host. | No reverse proxy or load balancer sits in front of the binary. |
| TLS at the external domain | ExternalSecure true with TLS terminated at a proxy or load balancer | Certificate renewal stays at the edge, but the proxy must forward HTTP/2 correctly and the external settings must match the public URL. | You already run a managed edge with certificate automation and an HTTP/2 capable proxy. |
| External domain | ExternalDomain and ExternalPort | Must match the public host name and port that clients use, so a mismatch causes instance and redirect errors. | Always set, and verify after any DNS, proxy or port change. |
| Masterkey | Supplied by file | The key sits on disk, so file ownership, mode and backup handling carry the protection; the file path can be locked to the service user. | Your host can mount the key from a root-owned path that only the service account reads. |
| Masterkey | Supplied by environment variable | Works with secrets managers that inject variables, but the value can be exposed through process inspection or logs if misconfigured. | A secrets manager or orchestrator delivers the key at start time and you restrict access to the unit. |
| Invocation phases | Separate init, setup and start commands in distinct units | More units to maintain, but each phase can be run, logged and retried on its own, and start does not change the schema. | You want controlled schema and setup changes during upgrades, with a clear record of each step. |
| Invocation phases | Combined run in one unit | Fewer units and less to configure, but schema and setup changes are tied to every restart. | A single-node test or staging host where operators accept the coupling. |
Why init, setup and start run as separate units
Zitadel's Linux binary is run in three phases, and each phase has a different job. Init prepares the database: it creates the schema and the database role that Zitadel uses. Setup applies instance configuration, including the first administrator and the domain settings that the instance answers to. Start runs the long-lived service that serves the API, Console and login. Keeping these phases as separate systemd units means each one has its own logs, its own exit status and its own place in the dependency chain, so a failure points to one phase instead of a single opaque service that will not come up.
Separation also decides what runs on a restart. Schema creation and first-time instance configuration are work that should happen once, not every time the process restarts after a crash, a host reboot or a configuration tweak. When init and setup are their own units, the start unit can be restarted alone without repeating one-time changes. The same split is what keeps a schema change under deliberate control during an upgrade: you run the new binary's init step on purpose, read its output, and only then start the new service, instead of letting a restart migrate the database as a side effect.
Confirm the exact ordering and unit dependencies for your chosen Zitadel version in the self-hosting overview and the release notes before you write the units. Check which commands each phase runs, whether setup must be rerun after configuration changes, and whether a given release expects init to finish before start is attempted. Test the sequence on a non-production copy of the database first, so you know what a failed init or setup looks like in your logs before it happens during a real change window.
How the units, database and reverse proxy connect
The diagram starts with the operator's masterkey source and the init unit, which prepares the database schema before setup and start run as separate units on the Zitadel host. Setup and start read the YAML configuration and open connections to the external PostgreSQL server across the database network boundary. Browser and API clients reach Zitadel only through the TLS-terminating proxy on the public side. Check that each crossing is the one you intended, and that the database port is reachable from the Zitadel host alone.
Units, configuration and database links across the trust boundaries.
Zitadel systemd setup steps with checks
This sequence takes a Linux host from a clean state to a running Zitadel binary behind a TLS proxy, with a check at each step so a failure is caught before the next layer depends on it. The result is a service that starts under systemd, uses an external PostgreSQL database, and serves the console on your external domain.
Create the service account and restricted directories
Your Linux administrator creates a dedicated system user with no login shell, then creates separate directories for the binary, the YAML configuration, the masterkey file and any logs. Ownership goes to the service account, the masterkey and configuration directories are readable only by that account and root, and nothing is writable by other users. Done when the service account exists,
ls -lon each directory shows the intended owner and mode, and a test read of the masterkey path fails for any other local user.Provision the PostgreSQL role and database
Your database administrator creates a dedicated PostgreSQL role and an empty database for Zitadel on a PostgreSQL version the Zitadel database documentation lists as supported (versions 14 through 18). The role should own only what Zitadel needs, and the connection should be tested from the Zitadel host with the same credentials the service will use. Confirm the exact privilege model and any schema requirements in the self-hosting docs for your release. Done when a login with that role from the Zitadel host succeeds and the database is empty.
Write the YAML configuration and masterkey file
Write the YAML configuration with the external domain, port and TLS settings, and the database host, port, database name and role, referencing the password and the masterkey from files or environment variables rather than inline values. Generate the masterkey with the method the docs describe, store it outside the configuration file, and keep a copy in your secrets manager, because the masterkey encrypts Zitadel secrets at rest and cannot be rotated in place. Done when the configuration file parses, contains no inline secrets, and the masterkey file has the restricted permissions from the first step.
Install the chosen release binary
Download the release you have selected from the official releases page, verify its checksum or signature against the value published with the release, and install it to the binary directory owned by root and executable by the service account. Pin the version in your change record so later upgrades are deliberate. Done when the binary reports the expected version and the checksum matches the published value.
Run init and setup as separate units
Run the init phase, which prepares the database schema, and then the setup phase, which creates the first instance and administrator, each as its own one-shot systemd unit so that its exit status is recorded in the journal. Confirm the exact commands and flags for your version in the self-hosting documentation. Check that init exits without errors, the journal shows no schema or connection failures, and setup completes before you continue. Rerunning setup after configuration changes is covered separately in the domain guidance.
Enable and start the service unit
Create the long-running service unit that runs only the start phase, set it to depend on the network and database availability, and set a restart policy. Enable it so it starts at boot, then start it. Done when
systemctl statusreports the unit as active, the journal shows the server listening on the configured port, and the unit survives a restart without manual steps.Place the TLS proxy in front and verify access
Put a reverse proxy that terminates TLS in front of the service, using the upstream protocol and forwarded headers described in the proxy guidance for your choice of proxy. Verify the health endpoint responds through the proxy on the external domain, then load the console in a browser over HTTPS on that same domain. If the console redirects or returns an instance not found error, check the external domain settings before going further. Done when the health check and the console both succeed through the proxy, and the certificate chain validates from a client outside the host.
Upgrading Zitadel by replacing the binary
Treat an upgrade as a database change first and a binary change second. Stage the new binary beside the current one, for example under a versioned path, so the running unit keeps its known-good file. Before touching anything, read the release notes and the upgrade guidance for the exact target version on the Zitadel releases page on GitHub, because init and setup steps differ between releases. The most recent release fact available to this page is v4.19.5, but treat it only as a version to check, not as the version you should deploy. Confirm the latest stable release yourself on that page before you plan the change window.
Take a PostgreSQL backup while the current unit is still running, then stop the start unit so no requests write to the database during migration. Run the init and setup phases with the new binary only if the target release requires them, using the same YAML configuration and masterkey source as the running service. Then point the ExecStart path at the new binary, reload systemd, and start the unit. Check the health endpoint, log output and one login through the Console before you consider the change complete. Major-version changes need their own review rather than a routine swap. The move to v3.0 changed the core, Console and hosted login to AGPL-3.0 on 31 March 2025, so confirm license obligations with your legal team before you adopt a new major line.
The rollback path is to stop the unit, restore the previous binary, and restore the database backup taken before the upgrade, because a newer schema usually cannot be read by an older binary. Schema changes make the database backup, not the binary file, the thing that determines whether you can go back. Rehearse the restore on a copy of production data, time it, and confirm that the restored instance starts and serves logins with the same masterkey. A backup that has never been restored is an assumption, so record the rehearsal result alongside the change record.
Security settings to lock down on a binary install
A binary install puts Zitadel directly on your host, so the host, the service account, the key that encrypts secrets and the database connection carry the security load. The cards below cover the settings to review before the first production start and after each upgrade.
Masterkey handling
The masterkey is a 32-byte key that encrypts secrets Zitadel stores at rest. Keep it in a file readable only by the service user, never in version control or in a unit file that others can read. It cannot be rotated in place, so decide where the backup copy lives before the first setup run. Check that the key is backed up separately from the database. See the masterkey page in this group for generation and storage options.
Self-hosting docsDedicated non-login service user
Run Zitadel under a dedicated system account with no login shell and no sudo rights. The binary and its configuration should be owned by root and readable but not writable by the service user. Give the service user write access only to the paths it needs at runtime. Confirm this with a review of the unit file and directory ownership after every upgrade, since replacing the binary can reset permissions.
PostgreSQL credentials and TLS verification
Use a database role with rights limited to Zitadel's own database, not a superuser. Keep the password out of the YAML file where possible and supply it through a file or environment variable with restricted permissions. Set the connection to verify the server certificate, not just encrypt the channel, and confirm that the CA certificate the host trusts is the one your database team issued. PostgreSQL versions 14 through 18 are supported.
- Supported PostgreSQL versions
- 14 to 18
TLS termination and HTTP/2 upstreams
Decide where TLS ends: at Zitadel itself or at a reverse proxy in front of it. If a proxy terminates TLS, confirm that the upstream connection to Zitadel uses HTTP/2 cleartext (h2c) so gRPC calls work, and that the proxy forwards the original host and protocol headers that Zitadel uses to build URLs. Restrict the port Zitadel listens on to the proxy so clients cannot bypass it. Test login and the console through the same path your users will take.
Restricting console and system API access
The administrator console and the system API hold the highest privileges in the deployment. Limit them to a named administrator network, such as a VPN or bastion, at the proxy or firewall level rather than relying on application roles alone. Review which accounts hold instance administrator roles and remove standing access that is no longer needed. Record who can call the system API, because it can create instances and change domains.
APIs introductionHost patching and systemd hardening
Patch the host operating system and the PostgreSQL server on a fixed schedule, and track Zitadel releases so you can apply security fixes between major versions. In the unit file, use systemd options such as running as the service user, restricting filesystem writes to the state directory, and limiting privilege escalation. Test each option against a staging start, because a strict setting can block the process from reading its configuration or writing logs.
Zitadel releasesQuestions buyers ask before running Zitadel as a binary
How much does a self-hosted Zitadel binary install cost compared with Zitadel Cloud?
A binary install has no Zitadel subscription fee for the software itself, but it moves cost into infrastructure, database, operations time and any support you buy. The cost components are the Linux servers or VMs you run, a PostgreSQL service you size and back up, the staff time to patch, monitor and upgrade, and an optional Enterprise support agreement. Zitadel Cloud pricing lists a Free plan at US$0 per month with 100 daily active users and a Pro plan at US$100 per month including 25,000 daily active users, and it lists Enterprise with custom pricing for self-hosted or cloud deployments. Compare your internal run cost against those figures, and ask Zitadel for a quote if you want Enterprise support priced for your deployment. DeployOpen's fees follow from a written scope.
How long does a first binary install and hardening take?
The duration depends on scope: how many environments you run, whether PostgreSQL and TLS already exist, how many systemd units and proxies you need, and how much hardening and documentation you require. DeployOpen agrees that scope, the deliverables and the timeline in writing before work starts, so the timeline comes from the written scope rather than a standard figure. Ask any provider to split the plan into the setup phase, the cutover and the handover, and to name the items that depend on your teams, such as DNS changes and certificate issuance, since those often set the schedule.
What does the work need from our team?
Four owners need to be named before work starts. The DNS owner controls the public and internal names that Zitadel's external domain settings must match. The TLS owner supplies or issues certificates and decides how TLS terminates. The PostgreSQL owner provisions the database, role and backups, and confirms the supported version range. The masterkey owner decides where the 32-byte key is stored and who can read it, because it encrypts secrets at rest and cannot be rotated in place. Your team also needs a change window, access to the Linux hosts and a contact who can approve the production cutover.
Can our team install Zitadel as a binary without outside help?
Yes, a team can do a simple single-host setup alone if it has solid systemd skills, working PostgreSQL administration and experience with TLS and reverse proxies. The setup has separate init, setup and start phases, a YAML configuration file and a database connection that must be correct before the first start. Bring in help when you need a multi-host or high availability layout, a shared secrets process for the masterkey, a compliance-ready evidence trail, or a first upgrade run on production data. An outside team also gives a second review of the configuration before go-live, which is useful when the instance serves customers.
When should we move from a binary install to Kubernetes?
Move to Kubernetes when you need high availability across nodes, rolling updates without downtime planning, or standard tooling your platform team already runs. Zitadel documents self-hosting on Linux and macOS binaries, Docker Compose and Kubernetes, and recommends a Kubernetes cluster with the official Helm chart for high availability. A single binary on one host is a reasonable starting point for a small or staging environment, but it puts the host and its restart process on your critical path. Plan the move before production traffic grows, since the database, the masterkey and the domain settings carry over, while the runtime layer changes.
How are upgrades and backups priced under a retainer?
A one-time project covers the initial build, the systemd units, the configuration and the first runbook. Upgrades and backup checks recur, because each Zitadel release needs a planned binary replacement, a setup run where required, a restore test and a rollback path. DeployOpen offers ongoing support, upgrades and continuous testing as retainers, so the recurring work is set out in a retainer scope. Ask for the release types covered, how often backup restores are tested, the response expectations, and what triggers extra work, such as a major release or a database version change. Zitadel's current release is listed in its GitHub releases, so confirm the target version with your team before each upgrade.
What licensing questions should we settle before we deploy?
Zitadel moved its core, Console and hosted login to the GNU Affero General Public License 3.0 with v3.0 on 31 March 2025, while APIs, SDKs, proto definitions, documentation, Helm charts and Terraform configurations remain Apache 2.0. If you modify the core and offer it to users over a network, the AGPL terms apply, so have your legal team review the obligations before you customize the code. Running the unmodified binary inside your own organization is a different question from distributing a changed version, and your counsel should confirm which applies to you.
What should we confirm about PostgreSQL before installing?
Confirm that your PostgreSQL major version is inside the range Zitadel supports, which is versions 14 through 18 according to the Zitadel database documentation. Confirm also that the database role can create or migrate the schema, that backups and point-in-time recovery are tested, and that the connection uses TLS with the verification mode your security team requires. Ask who owns the database after handover, since it holds the state that the masterkey protects and any loss affects every tenant on the instance.
How DeployOpen scopes and delivers a Zitadel binary install
DeployOpen plans, installs and hands over Zitadel as a Linux binary under systemd inside your own servers or cloud accounts. We start from a written scope covering the init, setup and start units, the YAML configuration, your external PostgreSQL and the TLS mode you need, then document the result so your team can operate and upgrade it.
How we scope
- We confirm the Linux distribution, host count and whether the target is a single server or a small highly available layout.
- We agree which PostgreSQL version from 14 to 18 you run and who provisions the database role and schema.
- We record the public domain, TLS mode and reverse proxy arrangement in the written scope before any host is touched.
How we build
- We create separate systemd units for init, setup and start so schema changes and configuration checks run before the service accepts traffic.
- We write the YAML configuration with the masterkey supplied from a file or environment source your security team approves.
- We test a restart, a failed database connection and a binary replacement on a staging host before anything goes to production.
How we hand over
- You receive the unit files, configuration, database connection notes and a runbook covering startup order and log locations.
- We document the upgrade procedure of stopping the service, replacing the binary, running setup and starting again, with a rollback path.
- We walk your administrators through the checks they will repeat, so the evidence for your change records is written down.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer that you can add after the initial delivery.
- We can prepare the systems, configuration and evidence your compliance team asks for, though independent auditors issue any audit report.
- Before you ask for a quote, confirm with your own team the Zitadel release you plan to run, since release notes change between versions.

