Quickstart
In five minutes you will run ReverseDock with Docker Compose in front of a small test application, send it a request, and change the configuration without restarting anything.
What you need
Section titled “What you need”- Docker with the Compose plugin (
docker compose versionprints a version). - Port 80 free on your machine. If it is taken, change
"80:80"to"8080:80"below and add:8080to the URLs. curl.
The backend is traefik/whoami, a tiny server that answers with the request it received, so you can see what ReverseDock forwards.
Set it up
Section titled “Set it up”-
Create a project directory with a
configdirectory inside it:Terminal window mkdir -p rdock-quickstart/configcd rdock-quickstart -
Save this as
compose.yaml:compose.yaml name: rdock-quickstartservices:rdock:image: ghcr.io/docker-hunterpedia/rdock:0.2.0-alpha.1restart: unless-stoppeddepends_on: [whoami]ports:- "80:80"volumes:- ./config:/etc/rdock:ro- rdock-data:/var/lib/rdockread_only: truecap_drop: [ALL]security_opt: ["no-new-privileges:true"]whoami:image: traefik/whoami:v1.11restart: unless-stoppedvolumes:rdock-data:depends_onstartswhoamifirst, so its name resolves when ReverseDock starts. Theconfigdirectory is mounted rather than the single file. Many editors save by replacing the file, and a container that mounts one file keeps seeing the old one.rdock-dataholds the configuration history, the last-known-good copy and the admin token. -
Save this as
config/rdock.yaml:rdock.yaml listeners:web: { address: ":80" }defaults:listeners: [web]tls: offroutes:whoami:match: "Host(`whoami.localhost`)"service: whoamiservices:whoami:backends:- address: "whoami:80"One listener on port 80, one route for the host
whoami.localhost, and one service that points at thewhoamicontainer.tls: offsays these routes are plain HTTP; without it, every route expects a certificate. -
Check the file before starting:
Terminal window docker compose run --rm --no-deps rdock validate --strict /etc/rdock/rdock.yaml/etc/rdock/rdock.yaml: valid -
Start both containers:
Terminal window docker compose up -d
Check that it works
Section titled “Check that it works”Send a request for the host the route matches:
curl -i -H 'Host: whoami.localhost' http://localhost/The answer comes from whoami, through ReverseDock. The IDs and addresses differ on your machine:
HTTP/1.1 200 OKContent-Type: text/plain; charset=utf-8x-request-id: 01a17a36-7869-76a6-ad2d-3d24c92aa277
Hostname: 1c558379fccc...GET / HTTP/1.1Host: whoami.localhostUser-Agent: curl/8.7.1Accept: */*X-Forwarded-For: 192.168.65.1X-Forwarded-Host: whoami.localhostX-Forwarded-Port: 80X-Forwarded-Proto: httpX-Real-Ip: 192.168.65.1X-Request-Id: 01a17a36-7869-76a6-ad2d-3d24c92aa277ReverseDock added the X-Forwarded-* headers and a request ID. A request for any other host gets ReverseDock’s 404 page, because no route matches:
curl -s -o /dev/null -w '%{http_code}\n' http://localhost/404Ask the running proxy for its state. The admin API listens on 127.0.0.1:2080 inside the container, and rdock status reads the token from the data volume:
docker compose exec rdock rdock statusrdock 0.2.0-alpha.1 (…)ready truegeneration 1config /etc/rdock/rdock.yaml (file)started 2026-10-26T21:55:43.722Zlistener web :80 http (1 routes)last reload applied by start at 2026-10-26T21:55:43.733ZChange the configuration while it runs
Section titled “Change the configuration while it runs”Add two security headers to every response of the route. Replace config/rdock.yaml with:
listeners: web: { address: ":80" }
defaults: listeners: [web] tls: off
routes: whoami: match: "Host(`whoami.localhost`)" service: whoami middlewares: [security-headers]
services: whoami: backends: - address: "whoami:80"
middlewares: security-headers: type: headers response: set: X-Content-Type-Options: nosniff Referrer-Policy: strict-origin-when-cross-originReverseDock watches the file and applies the change within a second. The log shows it:
docker compose logs rdock | grep 'configuration applied' | tail -1rdock-1 | {"timestamp":"…","level":"INFO","message":"configuration applied","generation":2,"trigger":"file change","summary":"routes changed: whoami; middlewares added: security-headers","target":"rdock::engine"}If your setup does not deliver file events into the container, apply it yourself:
docker compose exec rdock rdock reloadapplied generation 2The response now carries the headers:
curl -sI -H 'Host: whoami.localhost' http://localhost/HTTP/1.1 200 OKreferrer-policy: strict-origin-when-cross-originx-content-type-options: nosniffx-request-id: 01a17a36-be4f-74e4-b5e9-d2ef9d01f290Requests in flight during a reload finish on the configuration they started with; none are dropped.
When a change is wrong
Section titled “When a change is wrong”Change service: whoami in the route to service: whomai and save. ReverseDock refuses the new file and keeps serving the previous configuration:
docker compose exec rdock rdock reloaderror: routes.whoami.service: service `whomai` does not exist did you mean `whoami`?rejected: the configuration has errors; generation 2 stays in useFix the typo and save again.
Clean up
Section titled “Clean up”docker compose down -vNext steps
Section titled “Next steps”- Concepts: how listeners, routes, services and middlewares fit together.
- Route a domain to an app and Several sites on one server.
- Your own TLS certificate: HTTPS with a certificate you provide. Automatic certificates arrive in v0.3.
- Docker Compose install: the setup above, ready for a server.