Rivergate

Quickstart

Go from nothing to a signed-in dashboard and a stored secret in about fifteen minutes, using the local Docker Compose stack.

Local development 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

Requirements

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):

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
ServiceAddressNotes
Dashboardhttp://127.0.0.1:5173The authenticated product UI.
APIhttp://127.0.0.1:8080REST API and OIDC callbacks.
Liveness/health/liveThe process responds.
Readiness/health/readyPostgreSQL and Redis are reachable.
OpenAPI/openapi.yamlThe 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.

Never share this password

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:

  1. Create a realm, for example rivergate.
  2. Create an OpenID Connect client, for example rivergate-local. Turn on client authentication and the standard flow; leave direct access grants off.
  3. Register the exact callback URL Rivergate shows on its OIDC configuration page. Use 127.0.0.1 consistently — mixing it with localhost breaks the cookie host and callback match.
  4. Enable PKCE with S256 if Keycloak offers the setting.
  5. 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

  1. 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.
  2. Sign out, then sign in through OIDC with your Keycloak test user. At this point the user is authenticated but has no permissions.
  3. 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.

  1. Create an organization. You become its initial owner.
  2. Create a project and an environment such as production.
  3. Create a secret: choose a name and type, enter the value, and save. Version 1 is created and encrypted before it reaches PostgreSQL.
  4. Open the secret and use the explicit reveal action. The read is recorded in the audit log before the value is shown.
System administrator is not secret access

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

SymptomLikely cause
/health/ready is not readyPostgreSQL or Redis is still starting. Redis is required — sign-in flows and readiness depend on it.
OIDC sign-in loops or fails at the callbackThe 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 visibleThe identity is authenticated but unmapped. Grant it a role; Rivergate never links or grants by email.
Decryption errors after a resetThe root key in .dev/secrets/root-keys no longer matches the database. Restore the original key directory.

Next steps