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.jsonat the top of the file for completion and checks in your editor. - Settings marked planned are accepted by
rdock validatewith a warning and refused byrdock rununtil their release.
Sections
Section titled “Sections”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) andwebsecure(: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. Only1exists; omit it to use the latest.
Value types
Section titled “Value types”AcmeSetting
Section titled “AcmeSetting”The acme section: false turns automatic certificates off, true or settings keep them on.
BackendAddress
Section titled “BackendAddress”Backend address: host:port, [ipv6]:port or unix:///absolute/path.sock.
Examples: app:3000, 10.0.0.5:8080, unix:///run/app.sock
ByteSize
Section titled “ByteSize”Size in bytes, optionally with a unit (KB = 1000, KiB = 1024).
Examples: 32KiB, 100MiB, 1048576
A certificate authority.
Duration
Section titled “Duration”Duration made of numbers with units: ms, s, m, h, d.
Examples: 10s, 250ms, 1h30m
Endpoint
Section titled “Endpoint”Examples: unix:///var/run/docker.sock, tcp://socket-proxy:2375
HttpUrl
Section titled “HttpUrl”Examples: http://authelia:9091/api/verify
IpNetwork
Section titled “IpNetwork”IP address or CIDR range.
Examples: 10.0.0.0/8, 2001:db8::/32, 192.0.2.7
ListenAddress
Section titled “ListenAddress”Listen address: :port for all interfaces, or ip:port.
Examples: :443, 127.0.0.1:2080, [::1]:2080
MatchSpec
Section titled “MatchSpec”How a route selects requests.
RateLimitKey
Section titled “RateLimitKey”Examples: client_ip, header:X-Api-Key
RouteTls
Section titled “RouteTls”TLS of a route.
TrustedProxy
Section titled “TrustedProxy”cloudflare (edge ranges synced automatically) or an IP address/CIDR range.
Examples: cloudflare, 10.0.0.0/8