An API key is only needed for non-interactive environments (CI/CD,
scripts, servers without a browser). See
API key login below.
How It Works
- Browser opens on the RunFlow login page (the CLI listens on a local callback, ports
8630–8640). - You sign in with your RunFlow account (email/password or SSO).
- Tenant selection — if your account has access to multiple tenants, the CLI shows a searchable list to pick the active one.
- Profile saved — access token, refresh token, tenant, and API URL are stored in
~/.runflowrc. The profile is named after the tenant unless you pass--profile.
rf logout.
Verify your session at any time:
Options
Switching Tenants
If your account has access to multiple tenants, switch between them anytime — no new login required:Multiple Environments
Each profile remembers its own API URL and identity provider, so cloud and self-hosted installs live side by side:--api, the CLI discovers the installation’s login provider from
the server and remembers the URL in the profile, so later logins and refreshes
reuse it automatically.
Running RunFlow in your own environment, or switching between several
environments? See
Self-Hosted & Multiple Environments.
API Key Login (CI and Automation)
For pipelines, scripts, and headless machines, authenticate with an API key instead of the browser:Getting an API Key
- Go to the RunFlow Portal
- Navigate to Settings → API Keys
- Click Create New API Key
- Copy the key (starts with
sk-...)
Example: GitHub Actions
Signing Out
rf logout clears the stored tokens but keeps the API URL, provider, and tenant, so signing back in is a single rf login with no flags:
Configuration File
Credentials are stored per profile in~/.runflowrc (YAML):
- Never share your
~/.runflowrcfile - Don’t commit
.runflowrcto version control - Prefer browser login for humans; reserve API keys for automation
- Use separate API keys for dev/staging/prod
- Rotate keys regularly and revoke unused ones from the portal
Troubleshooting
Browser Doesn’t Open / Login Times Out
- Check that a browser is available on the machine — on headless servers, use
rf login --api-keyinstead - Make sure nothing blocks
localhostports8630–8640(firewall, VPN) - Try again — the login link waits a limited time for the callback
No Tenant Found
Invalid API Key
Network Connection Error
- Check your internet connection
- Verify the API URL is correct (
--apifor self-hosted) - Check if the API is accessible (firewall, VPN)
Permission Denied (Config File)
Next Steps
Profiles
Manage multiple profiles
Self-Hosted
Point the CLI at your own installation
Create Agent
Create your first agent
Test
Test agents locally