Cloudflare AccessRecommended
People sign in through your identity provider in the browser. The hub checks the signed Cloudflare token on every request.
HUB_AUTH_CLOUDFLARE=1
Hosted hubs sign in with Google, GitHub or Microsoft (one click from Claude Code is coming soon; today, use a key from the portal), or sit behind your team's own Cloudflare Access on your own hostname, which accepts any identity provider Access supports: Okta, Entra, Google Workspace, OIDC or SAML. Machines and scripts use API keys or service tokens. Self-hosted hubs use Cloudflare Access or API keys; follow the steps below.
You can turn on more than one. The hub tells each laptop which methods it accepts, and the hub's own list of people is always the final allowlist: getting through Cloudflare isn't enough unless an admin has added you.
People sign in through your identity provider in the browser. The hub checks the signed Cloudflare token on every request.
HUB_AUTH_CLOUDFLARE=1
A client ID and secret that lets a machine through Cloudflare without a browser. Pair it with an API key to identify the person.
HUB_EDGE=cloudflare-access
A per-person key an admin creates in People. The agent sends it on every request. Turn keys off once everyone uses Access.
HUB_AUTH_API_KEYS=1
About 15 minutes in the Cloudflare Zero Trust dashboard, then one restart of the hub. You need a domain on Cloudflare and a Zero Trust account.
Run cloudflared next to the hub and give it a hostname such as hub.yourco.com. Don’t publish the hostname before step 3 puts Access in front of it.
Add Google Workspace, Microsoft Entra ID, Okta, GitHub, any generic OIDC or SAML provider, or email one-time codes. You can add several.
Add a self-hosted application for hub.yourco.com. Allow your email domain or an identity-provider group, and set the session length you want (a week works well).
Add a second application for exactly hub.yourco.com/.well-known/mem-sync with one Bypass policy for Everyone. This one public file tells laptops how to sign in; it holds no team data.
Copy the Application Audience (AUD) tag from the first application and your team domain, then set these on the hub and restart it.
HUB_AUTH_CLOUDFLARE=1 CF_ACCESS_TEAM_DOMAIN=yourco.cloudflareaccess.com CF_ACCESS_AUD=<Application Audience tag> HUB_PUBLIC_URL=https://hub.yourco.com
The discovery file should list cloudflare-access under auth_methods.
curl https://hub.yourco.com/.well-known/mem-sync
In the hub’s People page, add each person’s email and the projects they work on. On their laptop they enter the hub address and click Sign in with Cloudflare.
| Setting | Values | What it does |
|---|---|---|
HUB_AUTH_CLOUDFLARE | 1 | 0 | Turns Cloudflare Access sign-in on. Needs the three settings below. |
CF_ACCESS_TEAM_DOMAIN | yourco.cloudflareaccess.com | Your Zero Trust team domain, without https://. |
CF_ACCESS_AUD | AUD tag | The Application Audience tag of the hub’s Access application. |
HUB_PUBLIC_URL | https://hub.yourco.com | The address laptops use to reach the hub. |
HUB_AUTH_API_KEYS | 1 (default) | 0 | Per-person API keys. Turn off once everyone signs in through Access. |
HUB_AUTH_ORDER | cloudflare-access,api-key | Which methods are offered to laptops, and in what order. |
HUB_EDGE | cloudflare-access | unset | The hub is behind Access but accepts keys only; laptops also ask for a service token. |