Installation
This guide covers various methods to install and run Ory Kratos in your environment.Docker
The recommended way to run Ory Kratos is using the official Docker images.Pull the latest image
Run Kratos with Docker
Binary installation
Install the Kratos CLI binary for your operating system.- Linux
- macOS
- Windows
Run Kratos from binary
Once installed, run Kratos with:Database setup
For production deployments, use a persistent database instead of in-memory storage.- PostgreSQL
- MySQL
- CockroachDB
- SQLite
Kubernetes deployment
Deploy Ory Kratos to Kubernetes using Helm.Build from source
For development or custom modifications, build Kratos from source.Build the binary
kratos binary to $GOPATH/bin/kratos.Alternatively, build without installing:Configuration basics
After installation, configure Kratos for your use case:Essential configuration options
Database connection (DSN)
Database connection (DSN)
Configure the database connection string:
Serve endpoints
Serve endpoints
Configure public and admin API URLs:
Authentication methods
Authentication methods
Enable authentication strategies:
Secrets
Secrets
Configure secrets for encryption and cookies:
Verify installation
Confirm Kratos is working correctly:Next steps
Configuration
Configure authentication methods, flows, and identity schemas
Identity schemas
Define custom identity attributes and validation
Self-service flows
Implement login, registration, and account recovery
Security
Production security best practices
For managed hosting with zero infrastructure maintenance, try Ory Network.