OmniscioGuidesThe Claude apps gateway
The Claude apps gateway, self-hosted
This page is about Anthropic's own gateway product. If your organization already runs a gateway and you just need Claude Code pointed at it, that is the other page: connecting Claude Code to an LLM gateway.
Last checked against Anthropic's documentation on November 24, 2026. By the Omniscio team. Updated .
What it is, and what it adds over a proxy you already have
The Claude apps gateway is a self-hosted service that sits between developers' Claude Code clients and the model provider. Developers sign in with the organization's identity provider instead of holding API keys or cloud credentials, and the gateway holds the upstream credential, enforces model access and managed settings by identity-provider group, and relays usage telemetry to your own observability stack.
It is included in the claude binary, so the executable that runs Claude Code on a laptop also runs the gateway server with claude gateway --config gateway.yaml.
Anthropic's argument for using it over a gateway you build is that it is first-party: tested alongside each Claude Code release, so it forwards the anthropic-beta values and request fields Claude Code sends without operators maintaining a separate allowlist, and it ships credentials, per-group access control, settings delivery, telemetry and upstream routing in one service.
Whether you need it comes down to where inference must run. Anthropic positions it for organizations that must, or prefer to, route inference through their own cloud provider — for example to meet data residency. If you do not have that requirement and want features such as SCIM provisioning or Claude Code on web and mobile, Claude Enterprise is a better fit.
If you already run an LLM gateway or API gateway that meets your needs, Anthropic's first instruction is to keep using it and configure Claude Code against it, which is what the LLM gateway guide covers. A running Claude apps gateway also serves its own protocol reference at GET /protocol.
What you need before you start
Anthropic's prerequisites are specific, and two of them surprise people: the database, and where the gateway is allowed to live.
| You need | Why it matters |
|---|---|
| Claude Code v2.1.195 or later on the server and on every developer machine | That release carries the claude gateway subcommand and the gateway sign-in flow; the Claude Platform on AWS upstream needs v2.1.198 or later on the server |
| An OpenID Connect identity provider | Okta, Microsoft Entra ID, Google Workspace, Keycloak, Dex or any OIDC-compliant provider; SAML and LDAP are not supported |
| PostgreSQL 11 or later | Backs the device sign-in flow and rate-limit counters; the smallest managed tier is enough, and the gateway runs its own schema migrations at boot. Versions 11, 12 and 13 need Claude Code v2.1.290 or later on the server, and newer majors are recommended because those are no longer maintained |
| A model upstream | Amazon Bedrock, Claude Platform on AWS, Google Cloud, a Microsoft Foundry resource or an Anthropic API key; several upstreams are supported with failover |
| HTTPS, and a hostname that resolves only to private addresses | /login accepts a plain http:// origin only when the host is loopback, and rejects public addresses |
| A Linux runtime for the server | Native Linux binary only; macOS works for local development and Windows is not supported as a server platform |
The private-address rule is the load-bearing one. Claude Code's /login requires the gateway's hostname or IP to resolve only to RFC 1918 and link-local ranges, CGNAT 100.64.0.0/10, IPv6 ULA fc00::/7 and loopback. Put the gateway behind an internal load balancer or VPN. If your internal network is numbered from public IPv4 space your organization owns, you declare those blocks in the gatewayInternalNetworks managed setting, which makes /login accept a gateway inside a listed block when the machine connects from an address in the same block.
That setting is for internal networks that happen to use public numbering. Anthropic states plainly that it does not make it safe to expose a gateway to the internet. The config's own host: 0.0.0.0 binds the server's listener, not what developers dial: the address they reach is public_url, which has to resolve to a private IP.
The minimal configuration
Anthropic's quickstart is six steps: register an OAuth client in the identity provider with the redirect URI https://claude-gateway.<your-domain>/oauth/callback, provision the database, write gateway.yaml, run the gateway alongside Postgres with Docker Compose, verify the auth surface, and log a developer in. The config has five sections, and every other field has a default.
listen:
host: 0.0.0.0
port: 8080
public_url: https://claude-gateway.internal.example.com
oidc:
issuer: https://login.example.com
client_id: 0oa1example2
client_secret: ${OIDC_CLIENT_SECRET}
allowed_email_domains: [example.com]
userinfo_fallback: true
session:
jwt_secret: ${GATEWAY_JWT_SECRET}
ttl_hours: 1
store:
postgres_url: ${GATEWAY_POSTGRES_URL}
upstreams:
- provider: bedrock
region: us-east-1
auth: {}
auto_include_builtin_models: trueSecrets are read through ${ENV_VAR} expansion, so the file itself can live in version control. allowed_email_domains rejects identity tokens from outside your organization, and ttl_hours also bounds how long a deprovisioned identity keeps working.
The last line is the sixth key, and it is not a section: auto_include_builtin_models: true serves the built-in catalog so each Claude model name is translated to that upstream's own name without you listing them. Set it to false and add a models: list to expose only specific models.
The example uses Amazon Bedrock. Claude Platform on AWS, Google Cloud's Agent Platform, Microsoft Foundry and the Anthropic API are equally supported by swapping the upstreams block.
Connecting developers
Developers connect with one browser sign-in using their work account, with no claude.ai account, API key or subscription, because the model request goes through the gateway on the organization's upstream credential. What they need from you is three keys in the managed settings file you deploy.
{
"forceLoginMethod": "gateway",
"forceLoginGatewayUrl": "https://claude-gateway.internal.example.com",
"parentSettingsBehavior": "merge"
}The two forceLogin* keys open /login directly on the Cloud gateway screen with the URL filled in, and the developer presses Enter. parentSettingsBehavior: "merge" is a separate opt-in: it lets Claude Desktop pass the gateway's egress allowlist to the Claude Code sessions it launches. forceLoginMethod without a URL leaves the developer at a "Contact your IT administrator" message, and the terminal's own login picker has no gateway option.
On first connect the CLI fingerprints the gateway's TLS leaf certificate and pins it per hostname, checking that pin during sign-in, silent refreshes and managed-settings fetches. Publish the expected SHA-256 fingerprint so developers have something to compare against, and treat a certificate rotation as a planned event, because every developer sees the trust prompt again and approval memory is keyed to the pinned certificate.
On machines without managed settings, each developer can add forceLoginMethod and forceLoginGatewayUrl to ~/.claude/settings.json instead, which needs Claude Code v2.1.295 or later. Claude Code reads those two keys only from user settings, and ignores a gateway named there once administrator settings reach the machine.
What a gateway session does not get
Anthropic publishes a feature table, and the gaps are worth knowing before you promise a team anything. These are marked not available on a gateway session:
- Server-side web search. The CLI cannot see which upstream the gateway routes to, so it cannot verify support and disables WebSearch on gateway sessions.
- Remote Control, which shows an error naming the gateway instead.
/design-syncand/design-login, both of which need claude.ai.- Features that need feature-flag fetching, such as
/import, because the CLI skips the flag fetch. - First-party-only optimizations such as global cache scope and token-efficient tools.
Two more are opt-in rather than off. The CLI uses the 5-minute prompt cache TTL on gateway sessions, and the 1-hour TTL is requested in a policy and only works when every upstream offers it for every model served. Auto mode is available but follows the third-party provider rules, so only models eligible on third-party providers can use it.
The server side has its own limits: OIDC only, so SAML and LDAP need a bridge; one identity issuer per gateway, so multi-tenant deployments are separate instances; OTLP over HTTP only, not gRPC; no Helm chart and no admin UI beyond spend limits; and Linux only, with macOS for development.
Where these answers come from
- Claude apps gateway, read November 24, 2026: what it is, the quickstart and its prerequisites, connecting developers, and the availability table quoted in this page's limits section.
- Gateway overview: what a gateway is and how to choose between this product and another.
- Deployment and operations: per-identity-provider setup, container requirements, health probes and troubleshooting.
- Other LLM gateways: the path for a gateway your organization already runs.
Common questions
Is the Claude apps gateway the same thing as an LLM gateway?
It is one kind of LLM gateway: Anthropic's own, built into the claude binary and tested alongside each Claude Code release, so it forwards the beta values and request fields Claude Code sends without an operator keeping a separate allowlist. Any other gateway your organization already runs is covered by the LLM gateway guide.
What does the gateway need besides the claude binary?
An OIDC identity provider, PostgreSQL 11 or later, and a model upstream such as Amazon Bedrock, Google Cloud, Microsoft Foundry or an Anthropic API key. It also needs HTTPS and a hostname that resolves only to private addresses, and it runs as a server on the native Linux binary only. macOS is for local development and Windows is not supported as a server platform.
Why does Claude Code refuse a gateway on a public address?
Because a trusted gateway can push settings that run commands on developer machines. Claude Code's /login accepts a hostname or IP only when it resolves to private ranges, and an http origin only for loopback. Organizations whose internal network is numbered from public space they own declare those blocks in the gatewayInternalNetworks managed setting instead.
Which Claude Code features stop working on a gateway session?
Anthropic's table marks server-side web search (the CLI cannot see which upstream the gateway routes to), Remote Control (the CLI shows an error naming the gateway), /design-sync and /design-login (both need claude.ai, which the CLI does not contact on a gateway session), and features that need feature-flag fetching such as /import as not available. First-party-only optimizations such as global cache scope are off too, and the 1-hour cache TTL is opt-in rather than default.