Grafana
is a metrics and dashboards platform that supports OIDC for login. Grafana’s OIDC integration is entirely env-var driven. Register an OIDC client in the tsidp admin UI using redirect URI https://my-grafana.pqapp.dev/login/generic_oauth, then note the client_id and client_secret.
mkdir my-grafana && cd my-grafana
FROM grafana/grafana
USER 472:472
Create the app on Runway (this also initializes a git repository, if none exists yet), then commit the Dockerfile:
runway app create my-grafana --persistence --plan scale-m-launch
git add -A && git commit -m "initial commit"
Create a Tailscale auth key
for my-grafana.
runway app config set \
TS_AUTHKEY=tskey-auth-... \
ALL_PROXY=socks5://localhost:1055/ \
HTTP_PROXY=http://localhost:1055/ \
HTTPS_PROXY=http://localhost:1055/ \
GF_PATHS_DATA=/data \
GF_AUTH_GENERIC_OAUTH_ENABLED=true \
GF_AUTH_GENERIC_OAUTH_NAME="Tailscale" \
GF_AUTH_GENERIC_OAUTH_CLIENT_ID=<client-id> \
GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET=<client-secret> \
GF_AUTH_GENERIC_OAUTH_SCOPES="openid email profile" \
GF_AUTH_GENERIC_OAUTH_AUTH_URL=https://my-tsidp.tailnet-name.ts.net/authorize \
GF_AUTH_GENERIC_OAUTH_TOKEN_URL=https://my-tsidp.tailnet-name.ts.net/token \
GF_AUTH_GENERIC_OAUTH_API_URL=https://my-tsidp.tailnet-name.ts.net/userinfo \
GF_SERVER_ROOT_URL=https://my-grafana.pqapp.dev
runway app deploy
No Tailscale integration needed on the app - tsidp’s OIDC endpoints are publicly reachable. Users logging in still need Tailscale running.
runway app config set \
GF_PATHS_DATA=/data \
GF_AUTH_GENERIC_OAUTH_ENABLED=true \
GF_AUTH_GENERIC_OAUTH_NAME="Tailscale" \
GF_AUTH_GENERIC_OAUTH_CLIENT_ID=<client-id> \
GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET=<client-secret> \
GF_AUTH_GENERIC_OAUTH_SCOPES="openid email profile" \
GF_AUTH_GENERIC_OAUTH_AUTH_URL=https://my-tsidp.tailnet-name.ts.net/authorize \
GF_AUTH_GENERIC_OAUTH_TOKEN_URL=https://my-tsidp.tailnet-name.ts.net/token \
GF_AUTH_GENERIC_OAUTH_API_URL=https://my-tsidp.tailnet-name.ts.net/userinfo \
GF_SERVER_ROOT_URL=https://my-grafana.pqapp.dev
runway app deploy