Quickstart
import { Steps, Aside } from ‘@astrojs/starlight/components’;
You need Docker and Docker Compose. Nothing else. No JDK, no database client, no external dependencies.
-
Clone the repository
Terminal window git clone https://github.com/your-org/kotauth.gitcd kotauth -
Create your
.envfileTerminal window cp .env.example .envThe defaults work for local development. Optionally set a persistent secret key so sessions survive container restarts:
Terminal window echo "KAUTH_SECRET_KEY=$(openssl rand -hex 32)" >> .envecho "KAUTH_BASE_URL=http://localhost:8080" >> .env -
Start the stack
Terminal window docker compose upKotauth starts on port
8080. Flyway runs all database migrations automatically on first boot — no manual schema setup needed. -
Open the admin console
http://localhost:8080/adminOn first run, the master workspace admin credentials are printed to the startup log. Find them with:
Terminal window docker compose logs kotauth | grep "Admin credentials" -
Create a workspace
In the admin console, click New Workspace and enter a slug (e.g.
my-app). A workspace is a fully isolated tenant — it gets its own user directory, applications, signing keys, and settings. -
Verify OIDC discovery
Your workspace’s OIDC discovery document is immediately available:
http://localhost:8080/t/my-app/.well-known/openid-configurationThis is the URL you’ll give to any OAuth2 / OIDC library as the
issuerordiscovery URL.
What’s running
Section titled “What’s running”After docker compose up you have:
| URL | Description |
|---|---|
http://localhost:8080/admin | Admin console |
http://localhost:8080/t/{slug}/login | Login page for workspace slug |
http://localhost:8080/t/{slug}/.well-known/openid-configuration | OIDC discovery document |
http://localhost:8080/t/{slug}/api/v1/docs | Swagger UI (REST API) |
http://localhost:8080/health | Liveness probe |
http://localhost:8080/health/ready | Readiness probe |
Create your first application
Section titled “Create your first application”Once inside your workspace in the admin console:
- Go to Applications → New Application
- Set the type: Public (for SPAs / mobile) or Confidential (for server-side apps)
- Add your redirect URI (e.g.
http://localhost:3000/callback) - Copy the
client_id— this is what you pass to your OAuth2 library
Your app is now registered. Point your OAuth2 library at the discovery document URL and use the client_id. Done.
What’s next
Section titled “What’s next”- Core Concepts — understand how workspaces, applications, and tokens relate
- Authorization Code + PKCE — the standard flow for SPAs and mobile apps
- REST API Overview — manage users, roles, and sessions programmatically