HTTPS
Browsers decode video in hardware only on HTTPS pages. Over plain HTTP, teammates on the LAN get the Standard stream: 1280 px, decoded in software. Serving the relay over HTTPS moves them to Smooth, at native resolution and decoded in hardware. Streaming Quality shows how each kind of connection maps to a profile.
HTTPS is optional. Standard needs no setup, and you can add HTTPS later without changing anything else.
Pick a method
| How teammates reach the relay | Method | What you need |
|---|---|---|
| Directly, on the same LAN | Certificate from your DNS account | A domain on Cloudflare or Vercel and an API token for it |
| Directly, on the same LAN | A certificate you already have | Certificate and key files, such as an internal PKI or wildcard certificate |
| Through Tailscale | tailscale serve | Tailscale's free HTTPS certificates |
| Through a VPS with rathole | Caddy on the VPS | The steps in External access |
With a tunnel, TLS ends in front of the relay, so the relay itself stays on HTTP and needs no tls settings.
Certificate from your DNS account
The relay gets a Let's Encrypt certificate over DNS-01 and renews it on its own. It also points the domain's A record at this Mac's LAN address, so teammates only need the domain.
- Run
tapflow initon the relay Mac and choose:- Tunnel provider: None
- Streaming performance: Smooth
- Certificate method: Cloudflare DNS or Vercel DNS
- Domain for tapflow: for example
tap.yourcompany.com
initcreates.envin the data directory (~/.tapflow/data/.envon a default install) with a line for the token. Paste the API token afterTAPFLOW_CLOUDFLARE_TOKEN=orTAPFLOW_VERCEL_TOKEN=. For a Vercel team domain, also addTAPFLOW_VERCEL_TEAM_ID.- Start the relay with
tapflow start, ortapflow relay starton a relay-only Mac. The banner showsRelay started on https://<domain>:4000. - Share that address with teammates. Opening the relay by IP address or
localhostshows a certificate name warning, because the certificate is for the domain.
Remote agents now connect with wss:// instead of ws://. The agent connection command the relay prints already uses it.
A certificate you already have
Use this for an internal PKI or a wildcard certificate you already hold. You renew it yourself.
Run
tapflow init, choose None, Smooth and Existing certificate, and enter the paths to the fullchain certificate and the private key. Or add thetlsblock totapflow.config.jsonyourself:json{ "tls": { "mode": "import-cert", "certPath": "/path/to/fullchain.pem", "keyPath": "/path/to/privkey.pem" } }Make sure the name on the certificate resolves to the relay's LAN address, in your DNS or on each teammate's machine.
Start the relay. The banner shows the name tapflow read from the certificate. If it shows
localhostwith a warning, the certificate has no name tapflow can use; Configuration lists which names it accepts.
Through Tailscale
The default Tailscale URL is plain HTTP, and tailnet addresses count as external, so teammates get a stream trimmed to 1000 px and decoded in software. Terminating over Tailscale's free HTTPS brings them in through the tunnel port, which moves them to the Smooth profile. Tailscale issues and renews the *.ts.net certificate automatically, so no domain or DNS token is needed.
In the Tailscale admin console under DNS, enable MagicDNS and HTTPS Certificates. You'll acknowledge that machine names appear in the public Certificate Transparency log.
On the relay Mac, terminate HTTPS in front of the relay's tunnel port. It is
TAPFLOW_TUNNEL_PORTwhen you set it, and4001otherwise; only when the relay itself runs on 4001 does the default step aside to 4002. The command below uses the default, so replace4001with the port the start banner prints if yours differs:shtailscale serve --bg 4001Serve the tunnel port, not 4000
tailscale serveconnects to the relay from the relay Mac itself. On port4000the relay treats those connections as local and does not ask them to sign in. On the tunnel port every connection counts as remote. If an earlier setup serves4000, runtailscale serve resetand then the command above.tapflow startwarns while the old setting is in place.Point
publicUrlat the HTTPS address intapflow.config.jsonso the banner and the links tapflow shares match:json{ "tunnel": { "provider": "tailscale", "publicUrl": "https://your-hostname.tailnet.ts.net" } }
Setting up Tailscale itself is in External access.
Check that it worked
Open the dashboard at the HTTPS address and start a QA Session. The label beside the frame rate under the device reads Smooth. When it reads Standard, the page is still on HTTP.
When teammates cannot connect
- Certificate name warning: open the domain, not an IP address or
localhost. - The domain does not load on the LAN: some routers block a public domain that points to a private address (DNS rebinding protection). Add an exception on the router, or map the domain to the LAN address in local DNS.
- Nothing on the LAN loads: networks with Wi-Fi client isolation block traffic between devices. Use a normal home or office network.
- Browser warns about the certificate after testing: a staging certificate (
TAPFLOW_ACME_STAGING=1) is not trusted. After switching to production, the browser may keep showing the old error; check in a private window.
Every tls key is in Configuration.