How to publish your server with Cloudflare Tunnel
Use cloudflared to give a home AllDayRec server a public HTTPS address for cloud agents.
Prepare
- Run AllDayRec with a nonempty token in
tenants.json. A tunnel exposes even a loopback-only service. - Run
cloudflaredon the server machine. Replace8770throughout if you use another port. - On macOS, run
brew install cloudflared. On Linux, configure the vendor repository and install with your OS package manager: downloads.
Tunnel commands below were checked against official documentation, but are untested in this project environment. Run them on your own machine and account; they create public access.
Check the local server:
curl -fsS http://localhost:8770/api/healthExpect {"ok":true}.
Without a domain: try a temporary URL
cloudflared tunnel --url http://localhost:8770Keep it running and copy the random HTTPS trycloudflare.com address. No Cloudflare account or domain is required. Restarting cloudflared changes the URL; update your agent's connector each time. Stopping the process ends access. Use it for trials.
Quick Tunnels have no uptime guarantee, allow 200 in-flight requests and do not support SSE. AllDayRec MCP returns JSON to POST requests. Use the command above for cloud agents; email login cannot serve non-interactive clients. Source: Quick Tunnels.
With a Cloudflare domain: use a fixed URL
You need a Cloudflare account and a domain using Cloudflare DNS.
Log in and create a named tunnel:
bashcloudflared tunnel login cloudflared tunnel create alldayrecPut the returned UUID and absolute credentials-file path in
~/.cloudflared/config.yml, replacing the placeholders:yamlurl: http://localhost:8770 tunnel: <TUNNEL_UUID> credentials-file: /absolute/path/to/.cloudflared/<TUNNEL_UUID>.jsonReplace the example hostname with yours, create DNS and run:
bashcloudflared tunnel route dns alldayrec alldayrec.example.com cloudflared tunnel run alldayrecSources: named tunnel and configuration.
After checking access, stop the foreground cloudflared and install a service.
Linux:
bashsudo cloudflared --config "$HOME/.cloudflared/config.yml" service install sudo systemctl start cloudflared sudo systemctl status cloudflaredmacOS, starting at user login with
~/.cloudflared/config.yml:bashcloudflared service installSources: Linux service and macOS login service. Keep AllDayRec running too.
Connect your agent
Request /api/health at the public address and expect {"ok":true}. Other web/API requests still need the tenant token. Avoid interactive login gates that your agent cannot complete.
Select this HTTPS address in AllDayRec's /connect, then create an AI connection link for your agent. A named tunnel keeps its hostname across restarts.
The connection link is a key. Reverse-proxy access logs contain its full URL: disable or redact those logs. Cloudflare terminates public TLS and carries the traffic; see Privacy.