selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

hanko logo

Self-host hanko

backend/v3.1.0

Passkey-first authentication and user management platform

ReleaseOpen SourceAGPL-3.0
docker run --mount type=bind,source=<PATH-TO-CONFIG-FILE>,target=/config/config.yaml -p 8000:8000 -it ghcr.io/teamhanko/hanko:latest migrate up
Updatedlast month
LanguageGo
Setup difficultyModerate
Stars
9 071
Ports
8000 (public API), 8001 (admin API), 8002 (management API)
Requires
SMTP server
Docker
ghcr.io/teamhanko/hanko

What is hanko?

hanko alternatives

All self-hosted alternatives to Auth0 → All self-hosted alternatives to Clerk → All self-hosted alternatives to Stytch →

Should you self-host hanko?

hanko scores 69/100 on selfhost.directory (how scoring works) and ranks #7 of 40 in Authentication. It has 9 071 GitHub stars, +38 in the last 30 days.

It shipped 2 stable releases in the past year. The latest, backend/v3.1.0, came out on 1 October 2026. New versions land roughly every 3 months.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is AGPL-3.0-licensed and written mostly in Go.

Its closest alternative on selfhost.directory is authentik (80/100, 26 290 stars). It scores higher overall, so compare the two before you pick. See hanko vs authentik side by side.

Features

  • Custom OIDC/OAuth connections
  • Email passcodes
  • Organizations and rolesMarked with a work-in-progress icon in the README feature table.
  • Passkeys (WebAuthn)
  • Password Authentication
  • Rate Limiting
  • SAML SSO
  • Server-side sessions with remote revocation
  • Social login (OAuth)
  • Two-factor authentication
  • User import
  • User Management
  • Web components UI (Hanko Elements)

hanko README


Test Status Build Status GoDoc npm (scoped) npm (scoped)

About Hanko

Hanko is an open source authentication and user management solution that is easy to integrate, framework-agnostic, and built on privacy-first principles like data minimalism and phishing resistance.

How to install hanko

Install hanko with Docker

Apply migrations:

docker run --mount type=bind,source=<PATH-TO-CONFIG-FILE>,target=/config/config.yaml -p 8000:8000 -it ghcr.io/teamhanko/hanko:latest migrate up

Start the public API:

docker run --mount type=bind,source=<PATH-TO-CONFIG-FILE>,target=/config/config.yaml -p 8000:8000 -it ghcr.io/teamhanko/hanko:latest serve public

Admin API started with `serve admin`; both with `serve all`.

How to configure hanko

  • PASSWORD_ENABLEDEnvironment variable passed to the backend service in the docker-compose quickstart
  • dialectDatabase type in the database config section

    values: postgres, mysql

  • email_delivery.smtp.hostSMTP host for sending passcode emails
  • email_delivery.smtp.portSMTP port for sending passcode emails
  • email_delivery.smtp.userSMTP username (production settings)

hanko releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

FAQ

Where is Hanko Cloud hosted?

The managed cloud runs in the AWS Frankfurt region in Germany.

What happens to my free users if I upgrade to a paid tier?

Every Cloud tier includes 10,000 free monthly active users, so after upgrading to Pro you are only charged for MAUs beyond 10,000.

What if I exceed the monthly active users limit on Hanko Cloud Starter (Free)?

Limits are not enforced and signups keep working; if you stay above the tier limit for more than one month in a row, Hanko asks you to move to a higher Cloud tier.

What is a monthly active user (MAU)?

A user counts as a MAU if Hanko issues them a session token at least once in a month or their token is validated via the /session endpoint; further activity within the same month does not add more MAUs.

More in Authentication

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…