Introducing a new way to review your PRs.

Read the announcement

basecamp / kamal-proxy

Lightweight proxy server for Kamal

View on GitHub

15 documents · Updated Nov 18, 2026

overview

Knowledge Base updated: 2026-11-17

Kamal Proxy knowledge base

Orientation

Kamal Proxy is a Go reverse proxy and service-control plane used to route incoming HTTP(S) traffic to registered upstream services and targets.

The proxy process owns listener configuration, routing middleware, TLS certificate handling, target selection, request error handling, metrics, and structured request logging. Service and target state is managed through its control API.

The operator CLI drives deployment and day-two operations through that control API. The repository also includes a Compose-based local environment for exercising the proxy against a sample upstream application.

Architecture

flowchart LR
  Client[Client]
  TLS[TLS listeners / certificates]
  Router[HTTP router and middleware]
  Request[Request identification, buffering, timeouts]
  ServiceAPI[Service control API]
  Registry[Service registry]
  Targets[Upstream targets]
  Controls[Pause and rollout controls]
  Balancer[Load balancer]
  Upstream[Upstream service]
  Errors[Error response middleware]
  Metrics[Metrics instrumentation]
  Logs[Request logging]
  CLI[Operator CLI]
  Compose[Local Compose environment]

  Client --> TLS --> Router --> Request --> Balancer --> Upstream
  Router --> Errors
  Request --> Metrics
  Request --> Logs
  ServiceAPI --> Registry --> Targets
  Registry --> Controls
  Controls --> Balancer
  Targets --> Balancer
  CLI --> ServiceAPI
  Compose --> TLS
  Compose --> Upstream

Glossary

  • Service — A registered proxy workload with routing and operational configuration.
  • Target — An individual upstream endpoint eligible to receive a service's traffic.
  • Control API — The proxy interface used by the CLI to register and operate services and targets.
  • Rollout state — Runtime state used to control how traffic reaches service targets during deployment.
  • On-demand certificate — A TLS certificate obtained or selected when a served domain requires it.

Routing table