Incoming reverse-proxy behavior is configured in your infrastructure layer (NGINX/Ingress), not in
config.json. The one exception is serving Bifrost under a path prefix, which also needs server.base_path (see Serving under a path prefix).When to use this setup
- You want HTTPS termination in front of Bifrost.
- You run multiple Bifrost replicas and want L7 load balancing.
- You need one stable gateway URL for SDKs and agent clients.
Docker Compose deployment
Use this when Bifrost and NGINX run as services in the same Compose project.location / block:
VM or bare-metal deployment
Use the same NGINXlocation / settings as above, and point upstream servers to hostnames/IPs reachable from that VM.
If you terminate TLS directly on NGINX, add:
Kubernetes (NGINX Ingress)
If you deploy with Helm, use Ingress values instead of a standalone NGINX config:Serving under a path prefix
By default Bifrost expects to own the whole host (https://bifrost.example.com/). To serve it under a path on a shared domain, for example https://example.com/bifrost/, set the prefix on Bifrost and route that path to it in the proxy. The prefix can be any path, including nested ones such as /tools/llm-gw.
Set the prefix in one of three places. The flag and the environment variable take precedence over config.json.
- config.json
- Environment / flag
- Helm
- The dashboard is served at
https://example.com/bifrost/, and its pages, API calls, WebSocket connection and static assets all use the prefix. - Every API and inference route is reachable under the prefix:
https://example.com/bifrost/v1/chat/completions,https://example.com/bifrost/openai/v1/.... Point SDK base URLs there. - Server-generated URLs carry the prefix when Bifrost derives them from the request: OAuth callback URLs for MCP servers, OAuth redirects back to the dashboard, and resumable upload URLs. If you set an explicit public URL such as
client.mcp_external_client_url, include the prefix in it yourself.
/health.
OAuth 2.0 discovery for an issuer with a path lives at the host root, for example
https://example.com/.well-known/oauth-authorization-server/bifrost (RFC 8414). If you use Bifrost as an OAuth authorization server for MCP clients, set issuer_url to the prefixed URL and route /.well-known/ on the host to Bifrost as well.
