Skip to content

Configuration

ReverseDock reads one YAML or JSON file, /etc/rdock/rdock.yaml by default (--config or RDOCK_CONFIG choose another). Every section is optional. Listeners, routes, services, middlewares and certificates are maps: the key is the object’s name, and other objects refer to it by that name.

  • Unknown keys are errors, so a typo never goes unnoticed. Keys that start with x- are ignored, which is handy for YAML anchors.
  • ${NAME}, ${env:NAME} and ${file:/path} insert environment variables and file contents; secret fields keep the reference instead of the value.
  • Add # yaml-language-server: $schema=https://raw.githubusercontent.com/Docker-Hunterpedia/ReverseDock/main/schema/rdock.v1.json at the top of the file for completion and checks in your editor.
  • Settings marked planned are accepted by rdock validate with a warning and refused by rdock run until their release.
  • acme: Automatic certificates (ACME). On by default with Let’s Encrypt, HTTP-01 and TLS-ALPN-01;
  • admin: Admin API and dashboard.
  • certificates: Certificates you provide yourself.
  • defaults: Defaults applied to routes that do not set a value.
  • lifecycle: Start-up and shutdown behaviour.
  • listeners: Sockets to accept traffic on. When empty, web (:80) and websecure (:443, TLS)
  • middlewares: Reusable request and response policies.
  • observability: Logs, metrics and traces.
  • providers: Dynamic configuration sources (file, Docker, Swarm, Kubernetes).
  • routes: HTTP routes: which requests go to which service, through which middlewares.
  • security: Client IP trust and request limits.
  • services: Backend pools that routes send traffic to.
  • tcp_routes: TCP routes (SNI routing, passthrough, plain TCP).
  • tcp_services: TCP backend pools.
  • version: Configuration format version. Only 1 exists; omit it to use the latest.

The acme section: false turns automatic certificates off, true or settings keep them on.

Backend address: host:port, [ipv6]:port or unix:///absolute/path.sock.

Examples: app:3000, 10.0.0.5:8080, unix:///run/app.sock

Size in bytes, optionally with a unit (KB = 1000, KiB = 1024).

Examples: 32KiB, 100MiB, 1048576

A certificate authority.

Duration made of numbers with units: ms, s, m, h, d.

Examples: 10s, 250ms, 1h30m

Examples: unix:///var/run/docker.sock, tcp://socket-proxy:2375

Examples: http://authelia:9091/api/verify

IP address or CIDR range.

Examples: 10.0.0.0/8, 2001:db8::/32, 192.0.2.7

Listen address: :port for all interfaces, or ip:port.

Examples: :443, 127.0.0.1:2080, [::1]:2080

How a route selects requests.

Examples: client_ip, header:X-Api-Key

TLS of a route.

cloudflare (edge ranges synced automatically) or an IP address/CIDR range.

Examples: cloudflare, 10.0.0.0/8