Getting Started
Create local credentials, start Docker Compose and wait for readiness, or build from source.
Idenplane is a self-hosted, open-source identity and access management (IAM) server. This guide gets you from zero to a running instance two ways: the Docker Compose quick start or a build from source for full control. The quick start requires Docker Compose v2.20+ and Node.js 24 for the setup helper; a source build also requires PostgreSQL 16+. Once it’s up you’ll have the admin console, OAuth 2.0 / OIDC / SAML endpoints, and health and metrics endpoints ready to use.
Docker Quick Start
Recommended
Start in an empty directory with Docker Compose v2.20+ and Node.js 24. Run the commands in Bash (Git Bash on Windows).
curl --fail --location -o docker-compose.yml https://raw.githubusercontent.com/idenplane/idenplane/v0.14.1/docker-compose.yml
curl --fail --location -o setup-env.cjs https://raw.githubusercontent.com/idenplane/idenplane/v0.14.1/scripts/setup-env.cjs
node setup-env.cjs && echo IDENPLANE_IMAGE=islamawad/idenplane:0.14.1 >> .env
docker compose up -d --wait --wait-timeout 180 The helper creates .env with unique secrets and never overwrites an existing file. Compose waits for healthy services. The local server listens on localhost.
Verify your installation
Confirm the server is healthy, then sign in to the admin console:
# Health check — returns HTTP 200 with a JSON status payload
curl http://localhost:3000/health/ready
# Then open the admin console in your browser
open http://localhost:3000/console
Sign in as admin using ADMIN_PASSWORD from your private .env file (see Configuration). If the health check fails, head to Troubleshooting.
Sign in to your first app
In the directory containing .env, run these Bash commands once. They create the quickstart realm and register a public browser client. Self-registration is enabled for this local example.
ADMIN_API_KEY="$(node --env-file=.env -p 'process.env.ADMIN_API_KEY')"
curl --fail-with-body http://localhost:3000/admin/realms \
-H "x-admin-api-key: $ADMIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"quickstart","registrationAllowed":true}'
curl --fail-with-body http://localhost:3000/admin/realms/quickstart/clients \
-H "x-admin-api-key: $ADMIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"clientId": "first-app",
"clientType": "PUBLIC",
"redirectUris": ["http://localhost:5173/callback"],
"webOrigins": ["http://localhost:5173"],
"grantTypes": ["authorization_code"]
}' Run the browser app
With the realm and client registered, run this block in Bash. It starts the SDK example in its own directory.
mkdir first-app && cd first-app
npm init -y
npm install idenplane-sdk vite
cat > index.html <<'HTML'
<!doctype html>
<html lang="en"><head><meta charset="utf-8"><title>First sign-in</title></head>
<body>Signing in…<script type="module" src="/main.js"></script></body></html>
HTML
cat > main.js <<'JS'
import { IdenplaneClient } from 'idenplane-sdk';
const client = new IdenplaneClient({
url: 'http://localhost:3000',
realm: 'quickstart',
clientId: 'first-app',
redirectUri: 'http://localhost:5173/callback',
});
await client.init();
if (location.pathname === '/callback') {
const signedIn = await client.handleCallback();
const user = signedIn && client.getUserInfo();
document.body.textContent = user
? 'Signed in as ' + user.sub
: 'Sign-in failed. Open the app again to retry.';
} else {
await client.login();
}
JS
npx vite --host localhost --port 5173 --strictPort Open http://localhost:5173. On the hosted sign-in page, register a test account and sign in with it. When the browser returns to /callback, the app shows “Signed in as” followed by your user ID.
Available Endpoints
Once running, these endpoints are available on your server:
| URL | Description |
|---|---|
http://localhost:3000/console | Admin Console |
http://localhost:3000/api | Swagger API Docs |
http://localhost:3000/health | Health Check |
http://localhost:3000/admin/metrics | Prometheus Metrics (super-admin login or ADMIN_API_KEY required) |
Generated Credentials
There is no default password. Keep .env private and back it up.
| Field | Value |
|---|---|
| Username | ADMIN_USER (default admin) |
| Password | ADMIN_PASSWORD from your .env (if unset outside production, a random password is printed once in the first start’s log) |
| API Key | ADMIN_API_KEY from your .env |
Build from Source
Prerequisites
# Clone the repository
git clone https://github.com/idenplane/idenplane.git
cd idenplane
# Install dependencies
npm install
cd admin-ui && npm install && cd ..
# Configure environment
cp .env.example .env
# Edit .env with your DATABASE_URL
# Setup database
npm run prisma:generate
npm run prisma:migrate
npm run prisma:seed # Optional: sample data
# Build & start
npm run build:all
npm run start:prod Database Helper Commands
| Command | Description |
|---|---|
npm run prisma:generate | Regenerate Prisma client |
npm run prisma:migrate | Apply pending migrations |
npm run prisma:seed | Seed with test data |
npm run db:setup | Generate + migrate + seed (all-in-one) |
Troubleshooting
- Port already in use: another process is on port 3000 — stop it, or change Idenplane’s port in your
.env/ compose file. - Database connection errors: make sure PostgreSQL is reachable and
DATABASE_URLis correct before the server starts. - Console not loading: give the container a few seconds to finish database migrations, then retry the health check.