Replace Auth0 / Clerk with Self-Hosted authentik
Open-source Identity Provider supporting OAuth2, OIDC, SAML, LDAP, Passkeys & application forward-auth Stop paying B2B Essentials ($130–$240/mo + MAU overages) ($130/mo for a 10-person team) and run authentik on a $4.50/mo Linux VPS with full data sovereignty.
1-to-100 Seat Total Cost of Ownership (TCO) Table
Comparing Auth0 / Clerk (B2B Essentials ($130–$240/mo + MAU overages)) vs authentik on Hetzner CX22 (4GB RAM / 2 vCPU).
| Team Size | Auth0 / Clerk Cost | authentik VPS | Net Annual Savings |
|---|---|---|---|
| 1 Seat (Solo) | $130.00/mo ($1,560/yr) | $4.50/mo (CX22) | +$1,506 / year |
| 5 Seats | $130.00/mo ($1,560/yr) | $4.50/mo (CX22) | +$1,506 / year |
| 10 Seats | $130.00/mo ($1,560/yr) | $4.50/mo (CX22) | +$1,506 / year |
| 25 Seats | $130.00/mo ($1,560/yr) | $4.50/mo (CX22) | +$1,506 / year |
| 50 Seats | $130.00/mo ($1,560/yr) | $4.50/mo (CX22) | +$1,506 / year |
| 100 Seats | $130.00/mo ($1,560/yr) | $4.50/mo (CX22) | +$1,506 / year |
Production Docker Compose + Caddy Auto-SSL
Copy and run docker compose up -d on any Ubuntu 24.04 server.
# Production Docker Compose: authentik (Replaces Auth0 / Clerk)
services:
caddy:
image: caddy:2-alpine
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy_data:/data
networks:
- stack_net
authentik:
image: ghcr.io/goauthentik/server:latest
container_name: stack-authentik
restart: unless-stopped
environment:
- "AUTHENTIK_REDIS__HOST=redis"
- "AUTHENTIK_POSTGRESQL__HOST=postgres"
- "AUTHENTIK_POSTGRESQL__USER=postgres"
- "AUTHENTIK_POSTGRESQL__NAME=authentik"
- "AUTHENTIK_POSTGRESQL__PASSWORD=${POSTGRES_PASSWORD:-strongpassword}"
- "AUTHENTIK_SECRET_KEY=${AUTHENTIK_SECRET:-generate_50_char_secret_key}"
volumes:
- authentik_data:/data
networks:
- stack_net
postgres:
image: pgvector/pgvector:pg16
container_name: stack-postgres
restart: unless-stopped
environment:
- "POSTGRES_USER=postgres"
- "POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-strongpassword}"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- stack_net
redis:
image: redis:7-alpine
container_name: stack-redis
restart: unless-stopped
volumes:
- redis_data:/data
networks:
- stack_net
networks:
stack_net:
driver: bridge
volumes:
caddy_data:
authentik_data:
postgres_data:
redis_data:
# Automatic Let's Encrypt HTTPS for authentik
authentik.{$DOMAIN:yourdomain.com} {
encode zstd gzip
reverse_proxy authentik:9000
}
Why Teams Switch to authentik
- ✓Put SSO in front of any self-hosted app with Caddy/Traefik
- ✓Unlimited MAUs & Enterprise SAML for $0
- ✓Visual flow designer for signup & MFA
ghcr.io/goauthentik/server:latest
Deploy authentik in 60 Seconds
Sized automatically for authentik (1024MB container RAM + OS overhead).
Get All 16 Pre-Built Production Stacks + Encrypted S3 Backups
Includes pre-tuned docker-compose.yml, Caddy Auto-SSL, AES-256 encrypted nightly S3/R2 Postgres backups, and Ubuntu 24.04 UFW/Fail2ban hardening scripts.