The Metadata Neighborhood can be accessed remotely at
https://cardigan.bymarkriechers.com via a Cloudflare Tunnel.
Remote browser (https://cardigan.bymarkriechers.com)
|
| HTTPS / WSS
v
Cloudflare Edge (TLS termination + Access auth)
|
| cloudflared tunnel (encrypted QUIC, outbound from your Mac)
v
localhost:3000 (Vite dev server)
|
| proxy /api/* and /api/ws/*
v
localhost:8000 (FastAPI / uvicorn)
No ports are opened on your machine. The tunnel is outbound-only.
brew install cloudflared
cloudflared login # Opens browser to authenticate with Cloudflarecloudflared tunnel create cardiganThis outputs a tunnel UUID (e.g., a1b2c3d4-...) and creates a
credentials file at ~/.cloudflared/<UUID>.json.
Edit config/cloudflared.yml and replace both instances of <TUNNEL_UUID>
with the UUID from step 2.
cloudflared tunnel route dns cardigan cardigan.bymarkriechers.comThis creates a CNAME record in the bymarkriechers.com zone pointing
cardigan to the tunnel.
In the Cloudflare Zero Trust dashboard:
- Go to Access > Applications > Add an application
- Type: Self-hosted
- Application domain:
cardigan.bymarkriechers.com - Policy name: "Email allowlist"
- Action: Allow
- Include rule: Emails — add approved colleague email addresses
- Session duration: 24 hours (or preferred)
Users will see a Cloudflare login page, enter their email, click a magic-link verification, and receive a 24-hour session cookie.
# In your project .env file:
ENABLE_TUNNEL=true./scripts/start.shThe tunnel will start alongside the other services.
The tunnel starts and stops with the other services:
./scripts/start.sh # Starts everything including tunnel
./scripts/stop.sh # Stops everything including tunnel
./scripts/status.sh # Shows tunnel status| Symptom | Fix |
|---|---|
| Tunnel log errors | tail -f logs/tunnel.log |
| "cloudflared not installed" | brew install cloudflared |
| "config not found" | Update <TUNNEL_UUID> in config/cloudflared.yml |
| 403 from Vite | Verify cardigan.bymarkriechers.com is in allowedHosts in web/vite.config.ts |
| CORS errors on API | Verify tunnel origin is in allow_origins in api/main.py |
| WebSocket not connecting | Verify ws: true in Vite proxy config |
| Tunnel info | cloudflared tunnel info cardigan |
| List tunnels | cloudflared tunnel list |