Skip to content

Docker Compose (Local Development)

The fastest way to run jitsudo is with Docker Compose. The provided compose file starts jitsudod, PostgreSQL, and dex (a mock OIDC provider) so you can exercise the full workflow without any cloud credentials.

This setup is for local development and testing. For production deployment see Kubernetes (Helm) or Single-Server.

  • Docker (or Podman) with Compose support
  • The jitsudo CLI — see Installation

The compose stack at deploy/docker-compose.yaml starts three services:

ServiceImagePortPurpose
postgrespostgres:16-alpine5432PostgreSQL database
dexghcr.io/dexidp/dex:v2.41.15556Mock OIDC provider
jitsudodBuilt from repo8080 (HTTP), 8443 (gRPC)Control plane

Clone the repo and start the stack:

Terminal window
git clone https://github.com/jitsudo-dev/jitsudo.git
cd jitsudo
# Start only the dependencies (recommended — run jitsudod on the host)
docker compose -f deploy/docker-compose.yaml up postgres dex -d
# Run jitsudod on the host (avoids OIDC issuer URL mismatch)
go run ./cmd/jitsudod

Alternatively, start the full stack (jitsudod included):

Terminal window
docker compose -f deploy/docker-compose.yaml up -d
Terminal window
# Point the CLI at the local dex OIDC issuer
jitsudo login \
--provider http://localhost:5556/dex \
--server http://localhost:8080

dex’s default static user credentials are:

FieldValue
Email[email protected]
Passwordpassword

The mock provider is registered by default in the local environment:

Terminal window
jitsudo request \
--provider mock \
--role admin \
--scope test \
--duration 1h \
--reason "Testing the local dev environment"
Terminal window
# In another terminal (or the same), approve the request
jitsudo approve <request-id>
# Execute a command with the mock credentials
jitsudo exec <request-id> -- env | grep MOCK_

The repo Makefile provides convenience targets:

Terminal window
make docker-up # Start all services (full Docker stack)
make docker-down # Stop all services and remove containers
make docker-logs # Tail logs from all services
make dev-deps # Start only postgres + dex (use with make dev-server)
make dev-server # Run jitsudod on the host

The compose file sets these environment variables for jitsudod:

VariableValue
JITSUDOD_HTTP_ADDR:8080
JITSUDOD_GRPC_ADDR:8443
JITSUDOD_DATABASE_URLpostgres://jitsudo:jitsudo@postgres:5432/jitsudo?sslmode=disable
JITSUDOD_OIDC_ISSUERhttp://dex:5556/dex
JITSUDOD_OIDC_CLIENT_IDjitsudo-server
Terminal window
docker compose -f deploy/docker-compose.yaml down
# To also remove the postgres volume:
docker compose -f deploy/docker-compose.yaml down -v