InboxSwipe has no built-in authentication. Never expose it directly to the internet — anyone who finds it can read your email metadata and swipe your mailbox. Always put an identity gate in front of it.
Requires a domain on Cloudflare DNS.
-
Create a tunnel — one.dash.cloudflare.com → Networks → Tunnels → Create a tunnel → Cloudflared. Copy the token (long string starting
eyJ). -
Route your hostname — in the tunnel's Public Hostname tab, add:
- Subdomain/domain: e.g.
swipe.yourdomain.com - Service type:
HTTP - URL:
inboxswipe:3000
Plain HTTP is correct here — this hop is container-to-container inside your Docker network. Cloudflare terminates public HTTPS for you, and
inboxswiperesolves via Docker's DNS because cloudflared runs in the same compose stack.- Run the connector — add to
.env: TUNNEL_TOKEN=eyJ...
Then:
docker compose -f docker-compose.yml -f docker-compose.cloudflare.yml up -d
Check the tunnel shows HEALTHY in the Cloudflare dashboard.
- Subdomain/domain: e.g.
-
Gate it with Access — before visiting the URL: Zero Trust → Access → Applications → Add an application → Self-hosted and private → Public DNS tab.
- Hostname: same as step 2
- Session duration: 1 month
- Policy: Allow → include → Emails → your email only
- Login method: One-time PIN (default) is fine
-
Update OAuth for the new origin:
- Google Console → Credentials → your OAuth client → add redirect URI:
https://swipe.yourdomain.com/oauth/callback - In
.env:BASE_URL=https://swipe.yourdomain.com - Rebuild:
docker compose -f docker-compose.yml -f docker-compose.cloudflare.yml up -d --build
Connecting and reconnecting Gmail now works from any device — the localhost/SSH-tunnel trick is no longer needed.
- Google Console → Credentials → your OAuth client → add redirect URI:
| Symptom | Cause |
|---|---|
| Error 1033 | Tunnel not connected — check docker compose logs cloudflared |
| Access redirect loop | Hostname mismatch between Access app and tunnel route |
| Reconnect fails after setup | Redirect URI in Google Console doesn't exactly match ${BASE_URL}/oauth/callback |
Cloudflare terminates TLS at their edge, so they can technically inspect traffic. If that bothers you, use Tailscale instead:
Install Tailscale on your server, then tailscale serve 3000 gives you an
HTTPS hostname reachable only from your own devices — identity is implicit
(only your tailnet can connect) and no third party proxies your traffic.
Register the tailnet hostname as a redirect URI and set BASE_URL to match.