SelfHostStackOpen-Source Directory

Why Migrate Away from Auth0 & Okta?

Auth0 prices skyrocket as your app user base grows. Features like SAML/OIDC Enterprise Single Sign-On and custom branding are locked behind multi-thousand-dollar enterprise tiers. Self-hosted identity providers provide full OIDC/OAuth2/SAML protocols, multi-factor auth (Passkeys/WebAuthn), and unlimited MAUs for zero per-user cost.

Top 2 Recommended Open-Source Replacements

Tested and production-ready. Click any tool to view hardware specs and docker-compose configurations.

Authentik

GPL-3.0⭐ 14.2k+

Modern open source Identity Provider with flexible policies, SSO, Passkeys/WebAuthn, and user management.

Min RAM2 GB
Min CPU2 vCPU
GitHub Repo ↗

✅ Advantages

  • Modern UI and Python/Go architecture
  • Built-in reverse proxy authenticator
  • Highly configurable flows

⚠️ Trade-offs / Limitations

  • Takes some initial time to understand Stage & Policy concepts

Core Features

Comprehensive protocol support: OAuth2, OpenID Connect, SAML 2.0, LDAP, Proxy Auth
Modern Passkeys / WebAuthn, TOTP, SMS multi-factor authentication
Visual flow builder for customizable login, registration, and recovery stages
Built-in reverse proxy outpost for protecting legacy apps without code changes
Unlimited users and applications with zero licensing fees
📄 docker-compose.yml
Production Ready
version: '3.8'
services:
  postgresql:
    image: postgres:16-alpine
    restart: unless-stopped
    environment:
      POSTGRES_PASSWORD: authentik_db_password
      POSTGRES_USER: authentik
      POSTGRES_DB: authentik
    volumes:
      - database:/var/lib/postgresql/data
  redis:
    image: redis:alpine
    restart: unless-stopped
  server:
    image: ghcr.io/goauthentik/server:latest
    restart: unless-stopped
    command: server
    environment:
      AUTHENTIK_REDIS__HOST: redis
      AUTHENTIK_POSTGRESQL__HOST: postgresql
      AUTHENTIK_POSTGRESQL__USER: authentik
      AUTHENTIK_POSTGRESQL__NAME: authentik
      AUTHENTIK_POSTGRESQL__PASSWORD: authentik_db_password
      AUTHENTIK_SECRET_KEY: replace_with_long_random_secret_key
    volumes:
      - ./media:/media
      - ./custom-templates:/templates
    ports:
      - "9000:9000"
      - "9443:9443"
    depends_on:
      - postgresql
      - redis
  worker:
    image: ghcr.io/goauthentik/server:latest
    restart: unless-stopped
    command: worker
    environment:
      AUTHENTIK_REDIS__HOST: redis
      AUTHENTIK_POSTGRESQL__HOST: postgresql
      AUTHENTIK_POSTGRESQL__USER: authentik
      AUTHENTIK_POSTGRESQL__NAME: authentik
      AUTHENTIK_POSTGRESQL__PASSWORD: authentik_db_password
      AUTHENTIK_SECRET_KEY: replace_with_long_random_secret_key
    depends_on:
      - postgresql
      - redis
volumes:
  database:

🚀 5-Minute Deployment Guide

  1. 1Deploy on a 2GB+ VPS (Hetzner CX22).
  2. 2Generate a secure `AUTHENTIK_SECRET_KEY` with `openssl rand -base64 36`.
  3. 3Run `docker compose up -d`.
  4. 4Navigate to `http://your-server:9000/if/flow/initial-setup/` to configure the default `akadmin` password.
  5. 5Create your OAuth2/OIDC applications and connect your frontend/backend services.

Recommended VPS for Running Authentik

Hetzner Cloud€3.79/mo

CX22 (2 vCPU, 4GB RAM)

Handles thousands of daily authentication handshakes effortlessly.

View Deploy Instructions →

Keycloak

Apache-2.0⭐ 22.5k+

The battle-tested enterprise open source identity and access management solution backed by Red Hat.

Min RAM2 GB
Min CPU2 vCPU
GitHub Repo ↗

✅ Advantages

  • Enterprise gold standard
  • Huge ecosystem of libraries & plugins
  • Apache 2.0 license

⚠️ Trade-offs / Limitations

  • Java-based, higher baseline memory footprint (~1.5GB RAM)

Core Features

Full SAML 2.0 and OpenID Connect 1.0 certification
User federation with Active Directory and LDAP
Social login integrations (GitHub, Google, Facebook, Twitter)
Centralized fine-grained authorization management
📄 docker-compose.yml
Production Ready
version: '3.8'
services:
  keycloak:
    image: quay.io/keycloak/keycloak:latest
    command: start-dev
    environment:
      KEYCLOAK_ADMIN: admin
      KEYCLOAK_ADMIN_PASSWORD: adminpassword
    ports:
      - "8080:8080"

🚀 5-Minute Deployment Guide

  1. 1Provision a 2GB-4GB VPS.
  2. 2Run Keycloak container with Postgres database backend.
  3. 3Set up reverse proxy with valid TLS certificate.

Recommended VPS for Running Keycloak

Hetzner Cloud€3.79/mo

CX22 (2 vCPU, 4GB RAM)

Solid RAM headroom for Java JVM execution.

View Deploy Instructions →

Quick Specification Matrix

ToolLicenseMin RAMMin CPUGitHub RepoPrimary Benefit
Auth0 & Okta (Proprietary)Proprietary ClosedManaged CloudManaged CloudN/ATurnkey but vendor lock-in & paywalls
AuthentikGPL-3.02 GB2 vCPUgoauthentik/authentikModern UI and Python/Go architecture
KeycloakApache-2.02 GB2 vCPUkeycloak/keycloakEnterprise gold standard