Slack CLI `slack run`: pinning a stable tunnel URL across local sessions
0 reputation · 22 Nov 2020, 16:49 UTC
Slack CLI slack run: pinning a stable tunnel URL across local sessions
Slack's CLI supports repeatable local development: slack run starts the app locally, connects over Socket Mode for events, and provisions a tunnel so HTTP endpoints — slash commands, interactivity, OAuth redirects — stay reachable. Configuration lives in manifest.yaml with secrets in .env, so a fresh clone should behave identically on every machine.
The weak link is the tunnel hostname. ngrok free-tier subdomains are typically random per session, so a redirect URI or request URL hardcoded in the manifest can mismatch on the next restart and break the OAuth round-trip. Assuming Slack CLI v2.x, it is unclear whether the command supports a reserved or pinned subdomain, or whether manifest values can interpolate .env variables at run time. Recent releases may have changed this; verify against current CLI docs.
For a team sharing one app definition, the desired behavior is a manifest that either avoids absolute local URLs or resolves them per session without manual edits.
- Does
slack runsupport a stable tunnel hostname, such as an ngrok static domain, on the free tier? - Can
manifest.yamlreference environment variables for redirect and request URLs so each session injects its own hostname? - If neither is supported, what is the documented pattern for teams that need OAuth working in every local session?