Quickstart
Go from nothing to a signed-in dashboard and a stored secret in about fifteen minutes, using the local Docker Compose stack.
Compose binds ports to loopback and generates development credentials and keys. It is the fastest way to evaluate Rivergate. For a cluster, use the Helm charts.
What you will have at the end
- PostgreSQL, Redis, the API, the worker and the dashboard running locally.
- An administrator signed in through your own OIDC provider (Keycloak in this guide).
- An organization, a project and an environment holding an encrypted secret you can read back.
Requirements
- Docker Engine with Docker Compose v2.
- Git and
make. - Go (the 1.27 line) — only to build the CLI in the last step.
- A Keycloak realm, or another OIDC-compliant provider, for normal sign-in. A disposable Keycloak container is fine.
1. Get the repositories
The Compose build contexts expect the repositories to sit side by side. Create a parent directory and clone them into it.
mkdir rivergate-local && cd rivergate-local
git clone https://github.com/rivergate-dev/rivergate.git
git clone https://github.com/rivergate-dev/rivergate-deployment.git
# Optional, for the command line client:
git clone https://github.com/rivergate-dev/rivergate-sdk-go.git
git clone https://github.com/rivergate-dev/rivergate-cli.git
2. Start the stack
make -C rivergate-deployment up
On a fresh checkout this first initializes local credentials, then starts every service. Nothing sensitive is printed. It creates, under rivergate-deployment/.dev/secrets (git-ignored):
- random PostgreSQL and Redis passwords;
- a versioned AES-256 root key in
root-keys/, mounted read-only into the API and worker; - a separate Ed25519 audit signing key, mounted only into the worker.
A one-shot migration service applies the database schema before the API and worker start. Wait until readiness reports healthy:
curl -fsS http://127.0.0.1:8080/health/live
curl -fsS http://127.0.0.1:8080/health/ready
| Service | Address | Notes |
|---|---|---|
| Dashboard | http://127.0.0.1:5173 | The authenticated product UI. |
| API | http://127.0.0.1:8080 | REST API and OIDC callbacks. |
| Liveness | /health/live | The process responds. |
| Readiness | /health/ready | PostgreSQL and Redis are reachable. |
| OpenAPI | /openapi.yaml | The canonical API contract. |
Metrics listeners are internal to the Compose network and are not published on the host. See Observability.
3. Create the bootstrap administrator
make -C rivergate-deployment bootstrap-admin
This creates the single local administrator. The generated one-time password is written to an owner-only file, rivergate-deployment/.dev/secrets/bootstrap-admin-credentials. Read it in a protected terminal; the command refuses to overwrite it or an existing bootstrap identity. Only an Argon2id verifier is stored.
Open the dashboard, sign in with the local credentials and change the password when prompted. Until you do, the account can do nothing else.
Do not paste it into chat, tickets or logs. The bootstrap account exists to configure OIDC, then local sign-in is turned off.
4. Prepare Keycloak
In your Keycloak admin console:
- Create a realm, for example
rivergate. - Create an OpenID Connect client, for example
rivergate-local. Turn on client authentication and the standard flow; leave direct access grants off. - Register the exact callback URL Rivergate shows on its OIDC configuration page. Use
127.0.0.1consistently — mixing it withlocalhostbreaks the cookie host and callback match. - Enable PKCE with
S256if Keycloak offers the setting. - Create an enabled test user.
Keep the issuer URL, client ID and client secret ready for the next step.
5. Connect OIDC and hand over administration
- As the bootstrap administrator, open platform administration in the dashboard and save the OIDC provider: issuer, client ID, client secret and the exact redirect URL. The client secret is encrypted at rest and never returned.
- Sign out, then sign in through OIDC with your Keycloak test user. At this point the user is authenticated but has no permissions.
- Sign back in as the bootstrap administrator, list identities, and grant system administrator to the OIDC identity.
The grant disables normal local password login. The bootstrap identity stays available only for explicit, time-limited recovery. If you prefer the API, the same steps are PUT /auth/oidc/provider and POST /auth/identities/{principal}/system-admin.
6. Create an organization and your first secret
Sign in through OIDC as the system administrator.
- Create an organization. You become its initial owner.
- Create a project and an environment such as
production. - Create a secret: choose a name and type, enter the value, and save. Version 1 is created and encrypted before it reaches PostgreSQL.
- Open the secret and use the explicit reveal action. The read is recorded in the audit log before the value is shown.
The system administrator role manages identities only. Reading a secret value requires an organization or scoped role such as owner or secret_reader. See roles and permissions.
7. Read the secret from the command line
The CLI authenticates with a personal API token. Issue one from your signed-in browser session as described in REST API, then:
make -C rivergate-cli build
pbpaste | ./rivergate-cli/bin/rivergate auth login --url http://127.0.0.1:8080
./rivergate-cli/bin/rivergate org list
./rivergate-cli/bin/rivergate secret get ORG_ID PROJECT_ID ENVIRONMENT_ID SECRET_ID
Piping the token keeps it out of your shell history. See Command line for the full command set.
Stop and reset
make -C rivergate-deployment down
Named database volumes persist across restarts. To reset local data, stop the stack and remove the volumes explicitly. Do not delete .dev/secrets while keeping a database volume: the root key is required to decrypt what the database holds.
Troubleshooting
| Symptom | Likely cause |
|---|---|
/health/ready is not ready | PostgreSQL or Redis is still starting. Redis is required — sign-in flows and readiness depend on it. |
| OIDC sign-in loops or fails at the callback | The callback URL registered in Keycloak differs from the one Rivergate presents, or localhost and 127.0.0.1 were mixed. |
| Signed in, but nothing is visible | The identity is authenticated but unmapped. Grant it a role; Rivergate never links or grants by email. |
| Decryption errors after a reset | The root key in .dev/secrets/root-keys no longer matches the database. Restore the original key directory. |