Quickstart
This quickstart gets a DarkAuth instance running so you can see the admin portal, user portal, OIDC discovery document, and default clients. It is the fastest way to understand the product shape before you wire in a real application.
Run with Docker
Section titled “Run with Docker”The published image starts DarkAuth with the default user and admin ports exposed:
docker run -d -p 9080:9080 -p 9081:9081 ghcr.io/puzed/darkauth:latestOpen http://localhost:9081 to complete the first-run installer. During installation, the admin port serves the installer instead of the normal admin portal. After setup is complete, the same port serves the admin UI.
What the installer creates
Section titled “What the installer creates”The installer turns a fresh runtime into a usable identity server. It creates or validates the database, writes instance configuration, derives KEK settings, creates the first admin account, generates signing keys, stores initial runtime settings, and seeds default OAuth clients.
The installer is intentionally separate from normal login. It is a bootstrap flow, not an admin backdoor. Once DarkAuth is initialized, install endpoints are disabled.
Local development
Section titled “Local development”For local development from the repository:
- Install Node.js 24 or newer.
- Install dependencies with
npm install. - Choose PostgreSQL or embedded PGLite.
- Create
config.yaml. - Run migrations with
npm run db:push. - Start the API with
npm start, or run the full dev stack withnpm run dev.
A minimal remote PostgreSQL config looks like this:
dbMode: remotepostgresUri: postgresql://username:password@localhost:5432/darkauthuserPort: 9080adminPort: 9081proxyUi: falsekekPassphrase: "replace-with-a-strong-passphrase"For embedded PGLite, use:
dbMode: pglitepgliteDir: ./data/pgliteuserPort: 9080adminPort: 9081proxyUi: falsekekPassphrase: "replace-with-a-strong-passphrase"Default surfaces
Section titled “Default surfaces”- User portal and OIDC endpoints:
http://localhost:9080 - Admin portal and admin API:
http://localhost:9081 - OIDC discovery:
http://localhost:9080/api/.well-known/openid-configuration - JWKS:
http://localhost:9080/api/.well-known/jwks.json
The user port is the public-facing authentication surface. The admin port is the operational surface and should be restricted in production.
First things to try
Section titled “First things to try”After installation:
- Open the admin portal and inspect the default clients.
- Check the signing keys page to see the JWKS state.
- Review settings, especially public origin, SMTP, registration, and password reset.
- Open the user portal and sign in with a test user.
- Try OIDC discovery from your browser or with
curl.
When you are ready to integrate an app, use Public Clients for browser apps or Confidential Clients for server-side apps.