FHIR DrillDocs

Operate the lab

Tunnel, DNS and the login gate

How fhirdrill.dev is published through the fhirlab tunnel, and how to add a hostname or a person.

How it fits together#

  • Tunnel fhirlab is remotely managed. Its routes ("published applications") are set in Zero Trust → Networks → Tunnels, not in a config file.
  • The cloudflared container on FHIRServer holds the tunnel token and keeps four outbound connections to Cloudflare's Sydney servers.
  • Each route maps a hostname to a container name and port on a Docker network the tunnel container has joined.
Hostname Goes to Access
fhir.fhirdrill.dev http://fhirdrill-private-web-1:8080 (the gateway) fhir app, Owners policy
fhirdrill.dev http://fhirdrill-web-web-1:8080 None (public)

The gateway#

Everything on fhir.fhirdrill.dev goes to one nginx (~/fhir-lab/private/nginx.conf), which routes by path:

Path Served by
/ Lab portal (tool launcher), /portal/ holds its assets
/explorer/, /ig/ Static files in ~/fhir-lab/private/html
/fhir… Main HAPI FHIR API. Errors pass through unchanged as OperationOutcome
/au-core/fhir… AU Core mock API
/au-core/ The mock's HAPI web UI
anything else Main HAPI web UI (/home, /about, /resource, /css, …)

Browser pages get a branded 404 and an auto-retrying "starting up" page when HAPI is restarting. The two FHIR APIs return 503 with an OperationOutcome instead, so scripts can retry. Upstreams are resolved per request, so the gateway keeps running while a HAPI container is stopped.

To publish something new behind the login, add a location to the gateway and reload it (docker compose restart in ~/fhir-lab/private). The tunnel and Access don't change.

Add a person#

Zero Trust → Access controls → Policies → Owners → Include → Emails → add the address. It takes effect at their next login.

Publish a new hostname, safely#

Create the Access application first#

Access controls → Applications → Add → Self-hosted, with the new hostname and the Owners policy. If you publish first, the service is open to the internet until Access is in place.

Make the container reachable from the tunnel#

Either put the service on the fhirdrill_edge network, or add its network to ~/fhir-lab/tunnel/compose.yaml and run docker compose up -d.

Add the route#

Tunnel fhirlab → Published application → Add. Use the container name and an http:// URL, for example http://my-service:8080. Cloudflare creates the DNS record.

Prove the gate works#

Shell
curl -s -o /dev/null -w "%{http_code} %{redirect_url}\n" https://new.fhirdrill.dev/

You must see 302 to …cloudflareaccess.com. If you see 200, remove the route immediately.

The login page#

The Access login page is branded in Zero Trust → Reusable components → Custom pages: name FHIR Drill, navy #14213D, logo https://fhirdrill.dev/brand/icon-192.png.

If the tunnel is down#

Visitors get a Cloudflare 530 error. Check docker logs tunnel-cloudflared-1. The usual causes are no internet on the box, or a revoked token. To replace the token, use Refresh token in the dashboard, put the new token in ~/fhir-lab/tunnel/.env and run docker compose up -d.

FHIR Drill lab docs · synthetic data only · built 2026-11-26