Ory on Docker vs Kubernetes vs VMs

Ory on Docker, Kubernetes or virtual machines differ most in who owns high availability, upgrades and backups. This page shows which model fits which team and what each one asks you to operate.

On this page

Ory on Docker vs Kubernetes vs VMs: which model fits your team?

Docker suits a single host, an evaluation or a small setup. Kubernetes suits a team that already operates clusters and has the skills to run them. VMs suit a team with mature VM tooling and formal change control. Start with Ory's own guidance: open source fits evaluation, development and deployments where occasional upgrade downtime is acceptable and guaranteed CVE patching is not required. That line sets how much availability work your team must build. If a planned restart window for upgrades is acceptable, one Kratos and one Hydra instance may be enough, and your existing skills should drive the choice. If it is not, you need redundant instances, a tested rolling upgrade sequence and a patch process that someone owns. The Ory Enterprise License page describes the paid self-hosted path with CVE patches and support SLAs, so confirm with Ory which edition you need before you design the runtime.

The runtime matters less than three things: the database, the upgrade process and how identity data is handled. Kratos supports SQLite, PostgreSQL, MySQL and CockroachDB, and that database choice shapes your backup, failover and restore design more than Docker, Kubernetes or VMs do. SQLite keeps data in a local file, which usually limits you to the smallest setups, while a shared database lets several containers, pods or VMs run against one store. Whatever the runtime, rehearse a restore of the Kratos and Hydra databases, since identities, sessions and OAuth2 clients live there. Write down who approves a schema migration, who takes the backup before it runs and who can roll back if the upgrade fails. Ask your platform team which of these steps they already automate.

Use the Kratos and Hydra v26.2.0 release, published March 20, 2026, as a reference point. Before you fix an image tag, chart version or VM package, check the ory/kratos and ory/hydra release pages for anything newer, then record the version you tested so your upgrade rehearsal matches what you deploy. Also check which features your team needs. The Kratos README lists SCIM, SAML, organization login (SSO) and CAPTCHAs as enterprise features that the open source version does not include, and those features can change the runtime design, such as how many services sit behind your load balancer. If you prefer not to run these services yourself, Ory Network is a managed alternative, but it falls outside this self-run comparison.

How Docker and Kubernetes compare on the factors that drive effort

This table compares Ory on Docker with Ory on a Kubernetes cluster across the factors that set day-to-day effort, and each row ends with the condition under which one option is the better fit. Virtual machines are covered in the operations table and tabs section on this page. If your team cannot yet run cluster upgrades and access control, Docker usually leaves less to operate.

FactorDocker on one host or small groupKubernetes clusterBetter fit when
Failure domainThe single host. If it fails, every container on it stops until the host is repaired or the service is moved by hand.Pods spread across nodes, so losing one node affects only the workloads placed there, provided replicas are spread across nodes.Docker when short outages on one host are acceptable. Kubernetes when the service must survive a node loss without manual action.
ScalingAdding capacity means adding hosts and placing containers on them by hand or with scripts the team maintains.Replica counts are declared in the cluster, and the scheduler places new replicas on nodes with spare capacity.Docker for a stable, predictable load. Kubernetes when demand changes often and the cluster already serves other workloads.
Rescheduling failed containersRestart policies restart a container on the same host. They do not move it to another machine.The control plane recreates failed pods on healthy nodes, subject to scheduling constraints and available capacity.Docker when restart on the same host is enough. Kubernetes when failed workloads must move automatically.
Configuration and secretsEnvironment files, Compose secrets or host-level secret stores, managed by the team that owns the host.ConfigMaps and Secrets, with access set by RBAC. Confirm encryption at rest for Secrets and whether an external secret store is needed.Docker when one team owns the host and few secrets exist. Kubernetes when several teams need scoped access to the same secrets.
NetworkingBridge networks and published ports on one host, with TLS and routing usually handled by a proxy the team configures.Cluster networking through a CNI plugin, with Services, Ingress or Gateway objects and network policies that depend on the plugin.Docker when traffic enters through one proxy. Kubernetes when many internal workloads call Ory and east-west policy matters.
Upgrades and downtimeReplace containers host by host. Each host has its own short window, and the team schedules the order by hand.Rolling updates can keep replicas serving during a release, if the release and its database migrations allow it. Confirm with Ory's release notes.Docker when a maintenance window is acceptable, as Ory states for open source deployments. Kubernetes when rolling upgrades are required.
Cluster skills requiredLinux administration, the container runtime, host patching and backups of the Ory databases.Cluster operation or a managed service, RBAC, storage, certificates, cluster upgrades and workload upgrades on top of the same host skills.Docker when the team runs Linux hosts well but has no cluster operators. Kubernetes when platform engineering already runs clusters.

What each Ory component asks you to run, whatever the runtime

Ory splits identity into separate services, and each one holds different state and depends on different things. Before you choose Docker, Kubernetes or virtual machines, list the components you run, the database each one uses and the features you need from each. The cards below show what each component holds and what changes per runtime.

Kratos holds the identity database

Kratos stores user identities and credentials, so its database is the identity database you must back up and keep available. Supported options are SQLite, PostgreSQL, MySQL and CockroachDB. A SQLite file on Docker needs a persistent volume that survives container replacement, and Kubernetes deployments should use an external PostgreSQL or CockroachDB service so the data outlives any pod. The Kratos README lists SCIM, SAML and organization login as enterprise features, so confirm your edition before you size this layer.

Kratos repository

Hydra issues OAuth2 and OIDC tokens

Hydra issues OAuth2 access tokens and OpenID Connect ID tokens, and it keeps client registrations and consent state in its own database. Your login and consent pages are separate services that call Hydra's headless APIs, so every runtime needs a stable route between Hydra, those pages and the browser. On Docker that means a shared network, on Kubernetes an ingress and service for each component, and on VMs a reverse proxy with matching public URLs. Check the supported database backends and the issuer URL setting in the Hydra docs before you fix hostnames.

Hydra repository

Keto stores relationship tuples

Keto answers permission checks from relationship tuples, the stored records that link subjects, objects and roles for ACL, RBAC and similar models. Your applications write these tuples, so the store grows with your permission model and must stay consistent with the identity data in Kratos. Every runtime must keep Keto reachable from each service that asks for a decision, and high availability depends on the database Keto uses. Confirm the database options, replication approach and tuple write path in the Keto docs before you choose a cluster layout.

Keto repository

Oathkeeper proxies every protected request

Oathkeeper is an identity and access proxy that sits in the request path between users and your protected applications. It holds the rule configuration that decides which requests need authentication and which upstream identity checks apply, so its availability sets the availability of every app behind it. On Docker and Kubernetes, run multiple replicas behind a load balancer and version the rules with the deployment. On VMs, plan a pair of hosts with a failover address and a controlled way to reload rules. Confirm rule loading and reload behavior in the Oathkeeper docs for your version.

Polis handles single sign-on

Polis is Apache-2.0 licensed and handles SAML and OIDC single sign-on, with SCIM directory sync for user provisioning. It keeps connection settings and sync state in storage you must back up, so confirm which database it needs before you size the platform. Customer identity providers must reach its SSO endpoints, which means public DNS, valid TLS certificates and an ingress on Kubernetes or a reverse proxy on VMs. The Kratos README lists SCIM and SAML as enterprise features, so confirm which edition covers Polis's features in the open source versus Enterprise License comparison.

Polis repository

How requests and data flow through a self-run Ory deployment

Requests start at users and applications, enter through a load balancer or ingress, and reach Oathkeeper, the access proxy. From there the flow fans out to Kratos for identities, Hydra for OAuth 2.0 and OpenID Connect, and Keto for permissions. Kratos and the other stateful parts connect to a relational database, and a backup target receives copies, all inside your trust boundary. This is an illustrative topology. Your layout may differ. Confirm the exact wiring, the Oathkeeper handoffs and which database combinations are supported against Ory's documentation for the version you run.

Illustrative topology; the trust boundary and stateful parts sit inside the client's infrastructure.

Why the database tier decides high availability more than the runtime

Ory services keep identity state in a database, so the availability of sign-in depends on the database replication and failover your team runs under each deployment model. Extra replicas of a stateless service help only when every replica shares the same database and the same configuration. If two Kratos instances point at different databases or load different identity schemas, users can get different results depending on which instance answers. Before comparing runtimes, ask who operates the database cluster, how a primary failure is detected, who promotes a standby, and how long a sign-in outage is tolerated. Those answers shape the high availability design more than the choice of runtime does.

On one Docker host, the database is also a single failure domain: if the host or its storage fails, every Ory service on it fails with it, and no container runtime restarts a database you have not made redundant. Kubernetes adds rescheduling of failed pods, health checks and controlled rollouts, but it needs a multi-node cluster, and the cluster removes the single point of failure only when the database itself is highly available across nodes. On virtual machines, your team builds failover with its own tooling, such as a hypervisor cluster, a load balancer and scripted promotion of a standby database. Each model moves this work to a different team, so name the owner of each piece before you approve the design.

The Ory Kratos introduction lists SQLite as a Kratos database option alongside PostgreSQL, MySQL and CockroachDB. Confirm with Ory whether SQLite is suitable for the multi-instance layout you plan, because a file-based database is a different design from a replicated database server shared by several instances. The database list above covers Kratos only. Confirm which databases Hydra and Keto support in the version you deploy. For whichever database you choose, request its replication, backup and failover documentation, then rehearse a primary failure in a staging copy of the design before the production decision.

Upgrades, backups, monitoring and skills for each model

This table compares how each deployment model handles upgrades, backups, monitoring and day-to-day skills for Ory. Read each row across the three options, and check the exact migration commands for each target version in Ory's release notes before planning a window. The main takeaway: Ory states that occasional upgrade downtime is acceptable for open source deployments, so the model you pick mainly sets how much of the upgrade and restore work your own team carries.

FactorDockerKubernetesVMs
Upgrade: image or package changeChange the image tag in the run or compose definition, then recreate the container.Change the image tag in the Deployment or Helm values and let the controller roll it out.Replace the Ory binary or package on the host and restart the service.
Migration stepRun the migration from the release notes as a one-off container against the database before starting the new image.Run the migration from the release notes as a Job that completes before the new pods start.Run the migration from the release notes on the host with the new binary before restarting the service.
Rolling or in-place replacement, and downtime windowUsually in-place on one host, so the window covers the stop, migration and start. A second instance behind a load balancer shortens it, if Ory confirms compatibility.Rolling replacement is available, but confirm with Ory that old and new versions can run side by side. Plan a window for releases that do not allow overlap.In-place replacement with the service stopped while files are swapped. Plan a window for each upgrade, plus any host reboot for OS patches.
Backups: database snapshotsSnapshot the database Kratos, Hydra or Keto uses. If SQLite is used, back up the file volume as well.Snapshot the external database through your storage or cloud provider. Keep manifests in Git and confirm snapshot scope with your platform team.Snapshot the database and back up the host's configuration and secret files as one recovery unit.
Configuration and secret storesStore database connection strings and signing keys in a secrets manager and inject them at run time, outside the image.Use Kubernetes Secrets or an external secrets operator, and confirm encryption at rest in your cluster.Keep secret files with restricted permissions or in a secrets manager, and review who can read the config directory.
Restore testingRestore the latest snapshot onto a second host, then test login, consent and admin API calls.Restore into a separate namespace with its own database, then run the same login and consent checks.Restore onto a clone or spare VM and run the same login and consent checks before relying on the backup.
Monitoring: logs, health endpoints and metricsCollect container logs and poll each service's health endpoint. Host metrics need a separate agent.Use liveness and readiness probes, collect pod logs, and add cluster metrics through your monitoring stack.Ship systemd journal logs, poll health endpoints, and collect host metrics with the agent you run on other servers.
Operating skillsContainer runtime, registry access, database administration and basic Linux host care.Cluster administration, Helm or manifests, RBAC, ingress and storage classes, plus database administration.Linux administration, service management, OS patching, firewall rules and database administration.

Ory on Docker, Kubernetes or VMs: which team fits each model

Illustrative profile only, describing no customer. A small product or security team runs Ory on one or two hosts with no cluster, using a container runtime and PostgreSQL for production. The same few people also handle on-call and other systems, so the operating load sits with a small group. A single host keeps the design simple, but one failed disk or one bad upgrade can take login down.

  • Upgrades: the team applies Kratos and Hydra releases itself, schedules a maintenance window and accepts the upgrade downtime that Ory describes for open source deployments.
  • Backups and restores: the team owns database snapshots and a restore test onto a second host, and it records how long a restore takes in its own environment.
  • Secrets and SSO: the team stores database credentials and signing keys, and configures identity flows and any upstream SSO connections.
  • What a partner can take: installation, hardening, backup design, a restore rehearsal and a written runbook, agreed in a fixed-scope plan.
  • Trigger to move: a need for multi-node availability during upgrades, or a guaranteed CVE patching commitment, points toward a cluster or toward the Ory Enterprise License.

Check whether your business accepts a maintenance window for login, and whether one person can restore the database within your recovery target.

What to confirm with Ory and your environment before choosing a model

These checks come before any choice between Docker, Kubernetes and virtual machines, because each answer narrows which model is workable. Run them with Ory and your own platform, security and compliance owners, and finish with a written record of images, databases, edition, backup, upgrade and key ownership.

  1. Confirm published images and packaging

    Ask Ory which container images, packages or binaries it publishes for Kratos, Hydra and Keto at each version you plan to run, and confirm that each component has an artifact for your model. Your platform owner pins every artifact by tag or digest in the change record, and the step closes when each one is confirmed there, so no environment runs an unlisted build.

  2. Confirm databases and migration commands

    Check which database engines each component supports at your target version, with Kratos, for instance, listing SQLite, PostgreSQL, MySQL and CockroachDB, and get the exact migration command for Kratos, Hydra and Keto from Ory. Your database administrator confirms the engine is approved and that migrations run as a separate, logged step in staging before production. The step closes when a migration has completed in staging with the command and output recorded.

  3. Decide between open source and Enterprise License

    Decide whether you need the Ory Enterprise License, since it adds features such as SCIM, SAML, organization login, Kratos multi-tenancy and the Hydra ROPC grant that change what runs in each component. Ask Ory to confirm that the enterprise builds are drop-in replacements for your installed version, and have your security owner sign off on the edition. The step closes when the edition and the feature list it depends on are written into the design.

  4. Define backup targets and test restores

    List what each component needs to recover, which typically includes its database, its configuration and any signing or encryption secrets, and where each copy is kept for your chosen model. Your operations team restores that set into a separate environment and logs in with a test identity. The step closes when the restored environment works end to end and the restore steps are recorded in the runbook.

  5. Set an upgrade window from downtime tolerance

    Ory describes open source as a fit where occasional upgrade downtime is acceptable and guaranteed CVE patching is not required, so agree with your risk owner how much interruption and patch lag each model can carry. Write down the window, the rollback step and who approves an emergency patch outside it. The step closes when the window and patch expectations are signed off and fed back into the edition decision.

  6. Map identity data storage and key holders

    Identify where identity records, sessions, signing keys and database credentials live under each candidate model, and who can read, rotate or restore them. Name a holder for each item, including the cloud or data center team if the platform runs in your own infrastructure. The step closes when every store and key has a named owner and a recorded location in your architecture document, so your compliance team can review the model choice.

What does Ory on Kubernetes cost to run, and who pays for what?

What are the recurring and one-time costs of each Ory deployment model?

Every model carries the same cost lines, paid to different parties. Infrastructure (compute, storage and network) comes from your cloud account, data center or air-gapped network. A highly available database is a separate service line that recurs. Staff time for upgrades, backups, monitoring and CVE response recurs for as long as Ory runs. The Enterprise License is a subscription, so it recurs too, and it applies only if you buy it. One-time costs are design, integration, hardening and the first cutover. Docker and VM setups leave host operating system patching with your team. Kubernetes adds cluster operations, which pays off mainly if your organization already runs clusters. Request a written quote from a fixed scope that lists each of these lines separately, so you can compare the models on the same assumptions.

What makes the cost of running Ory go up or down?

Scope and availability targets drive most of the cost, and the database and staff lines move the most.

  • More services in use: Kratos, Hydra, Keto, Oathkeeper and Polis each add configuration, monitoring and upgrade work.
  • More environments: production, staging and disaster recovery each need their own database and infrastructure.
  • Higher availability: redundant instances and a highly available database cost more than a single node, which is a single point of failure.
  • Enterprise features: SCIM, SAML, organization login and Kratos multi-tenancy sit in the Enterprise License, so the subscription line appears only if you need them.

Standardizing on one database service and keeping upgrade windows within what your users accept both reduce recurring effort. Ory Network is a managed service, so hosting and part of the operating work move to Ory. Compare its pricing page with your own staff hours before deciding.

How long does setup take, and what changes the timeline?

Setup time depends on scope, so ask for the timeline inside a written, fixed scope agreed before work starts. Four things set that scope. The number of Ory services in use and whether each needs its own database. The edition: Ory states that OEL builds are drop-in replacements for open source installations, so the install steps are similar, but enterprise features add configuration. Integrations: an existing user directory, LDAP or Active Directory sources, SSO partners, application login flows and any custom login UI your team builds on Kratos. Testing and evidence: backup restore tests, failover tests and documentation for assessors. As an illustrative example, one login flow on one database is a much smaller job than several services across three environments with directory sync. Ask the quote to state its assumptions and the items that could extend it.

Can our team run Ory ourselves, and which skills does it need?

Yes, if your team can operate a database, a container or VM platform and the identity protocols, but plan for specific skills.

  • Linux, container or VM administration, plus Kubernetes operations if you choose the cluster model.
  • Relational database administration for backup, restore, failover and upgrades on PostgreSQL, MySQL or CockroachDB, which Kratos supports.
  • Identity protocol knowledge: OAuth 2.0, OpenID Connect, SAML, multi-factor and passkey flows.
  • Secrets and key handling, plus monitoring of authentication events.

Keep at least two people trained on upgrades and incident response, since a single owner is a staffing risk. Ory Open Source fits deployments where occasional upgrade downtime is acceptable and guaranteed CVE patching is not required. Otherwise, plan for the Enterprise License. DeployOpen can plan, implement, harden, back up, upgrade and document the deployment, and offers retainers, so you can keep the run work in-house, outsource it or split it.

Is Kubernetes required for high availability in Ory?

No. Kubernetes is not required for high availability. Both VM and cluster setups need a highly available database, since Ory stores identity data there, and a single database node is a failure point either way. On VMs or Docker hosts, run more than one Ory instance behind a load balancer, pointed at a replicated database, with health checks and a tested failover runbook. In Kubernetes, the scheduler restarts failed containers and manages rolling updates, which cuts manual work, but the cluster adds its own control plane and networking that also need redundancy. Confirm with Ory which components support multiple replicas in the version you deploy, and test a node loss before you go live.

Which Ory edition includes 24/7 support SLAs and CVE patch commitments?

The Ory Enterprise License. The Ory Enterprise License page describes OEL as the self-hosted, commercially supported deployment: optimized builds of the same open source servers with enterprise features, 24/7 support SLAs and timely CVE patches. Ory Open Source has neither commitment, and Ory says it fits evaluation, development and deployments where occasional upgrade downtime is acceptable and guaranteed CVE patching is not required. Enterprise features named on the page include Kratos multi-tenancy and organizations and the Hydra ROPC grant. Ory Network is a managed service with its own terms, so confirm its support and patch commitments directly with Ory. Read the SLA wording in the contract before you rely on it, because this summary is not the contract.

How DeployOpen scopes and runs an Ory deployment in your infrastructure

DeployOpen plans, implements, integrates, hardens, backs up, upgrades, documents and supports self-hosted open-source platforms inside your own cloud accounts, data centers or air-gapped networks. For Ory on Docker, Kubernetes or virtual machines, the runtime choice is fixed in the written scope before any build work starts. The steps below show what gets scoped, built, handed over and supported for that choice.

How we scope

  • Written scope names the runtime (Docker, Kubernetes or VMs) and the Ory components in use, agreed before work starts.
  • Scope lists the Ory servers included, such as Kratos, Hydra, Keto, Oathkeeper or Polis, and their databases.
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing; ongoing support is available as a retainer.

How we build

  • Install Ory components on the chosen runtime, with the database, secrets and network paths set to your standards.
  • Connect Kratos and Hydra to your existing user management system through their headless APIs, then test each login flow.
  • Harden and security test the deployment, covering APIs, admin settings, secrets handling and the Oathkeeper access rules.

How we hand over

  • Documentation covers the runtime you chose, with install, configuration, upgrade and backup steps for your own team.
  • Backup and restore procedures are set up and documented, and you confirm recovery in your own environment.
  • Compliance evidence is prepared for your assessor, though auditors and certification bodies issue any audit report or certification.

How we support

  • Retainers cover ongoing support, upgrades and continuous testing, scoped in writing like the original work.
  • Ory's guidance says open source suits deployments that accept occasional upgrade downtime and do not require guaranteed CVE patching.
  • Confirm with Ory which support, CVE patch timing and SLAs apply to your chosen edition before you commit.

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.