Skip to content

Configuration reference

All configuration is passed to the serve subcommand. Run ./plainq serve -h for the authoritative, build-specific list. The commonly used flags are below.

Flag Default Purpose
-storage.driver sqlite Storage backend: sqlite or postgres.
-storage.path ./plainq.db Path to the SQLite database file.
-storage.postgres.dsn required when postgres PostgreSQL connection string.
Flag Default Purpose
-grpc.addr :8080 gRPC listener address.
-http.addr :8081 HTTP listener address (Houston + metrics + health).
Flag Default Purpose
-auth.enable true Toggle JWT auth.
-auth.jwt.secret required when auth is on HMAC secret used to sign access/refresh tokens.
-auth.access.ttl 60m Access token TTL.
-auth.refresh.ttl 720h Refresh token TTL.
Flag Default Purpose
-metrics.route /metrics Prometheus-style metrics endpoint.
-health.route /health Liveness/readiness endpoint.
Terminal window
./plainq serve \
-storage.driver=postgres \
-storage.postgres.dsn="postgres://user:pass@host:5432/plainq?sslmode=require" \
-grpc.addr=:8080 \
-http.addr=:8081 \
-auth.jwt.secret="$(openssl rand -hex 32)" \
-auth.access.ttl=60m \
-auth.refresh.ttl=720h