You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @miladmeidanshahi — fair documentation request. Let me sketch the setup here; I'll write a proper docs/full-mode-https.md for v1.7.x.
Why HTTPS for tunnel-node matters:
By default, the Docker image (ghcr.io/therealaleph/mhrv-tunnel-node:latest) listens on plain HTTP. Apps Script's UrlFetchApp.fetch() rejects self-signed certs and won't talk to a plain-HTTP backend if the destination URL is HTTPS — the request just times out.
Setup with Caddy (easiest, automatic Let's Encrypt):
On your VPS (with a domain pointing at it):
# 1. tunnel-node container, listening on internal port 8080
docker run -d --name mhrv-tunnel \
--restart unless-stopped \
-p 127.0.0.1:8080:8080 \
-e MHRV_AUTH_KEY="$(openssl rand -hex 16)" \
ghcr.io/therealaleph/mhrv-tunnel-node:latest
# Save that auth key — you'll need it on every mhrv-rs client.# 2. Caddy in front for TLS termination
docker run -d --name caddy \
--restart unless-stopped \
-p 80:80 -p 443:443 \
-v $PWD/Caddyfile:/etc/caddy/Caddyfile \
-v caddy_data:/data \
--network host \
caddy:latest
Caddyfile (replace tunnel.your-domain.com with your actual subdomain):
tunnel.your-domain.com {
reverse_proxy 127.0.0.1:8080
# Tighten timeouts for long-poll UX. Default 60s would close
# the long-poll session before tunnel-node naturally returns.
reverse_proxy 127.0.0.1:8080 {
transport http {
read_timeout 6m
write_timeout 6m
}
}
}
Caddy auto-fetches a Let's Encrypt cert for tunnel.your-domain.com on first run. Verify:
curl -I https://tunnel.your-domain.com/
# Should return 405 (Method Not Allowed — tunnel-node only accepts POST)
Alternative: nginx with certbot. If you prefer nginx, the shape is the same — listen on 443 with a Let's Encrypt cert, proxy_pass to http://127.0.0.1:8080. Caddy is just less config.
Domain-less alternative: if you don't have a domain, you can use a free DDNS service (DuckDNS, FreeDNS) and point <something>.duckdns.org at your VPS IP. Caddy handles those the same way.
Filing as tracking for docs/full-mode-https.md in v1.7.x. Once the doc lands I'll update this comment.
[reply via Anthropic Claude | reviewed by @therealaleph]
Activity
therealaleph commentedon Apr 26, 2026
Hi @miladmeidanshahi — fair documentation request. Let me sketch the setup here; I'll write a proper
docs/full-mode-https.mdfor v1.7.x.Why HTTPS for tunnel-node matters:
By default, the Docker image (
ghcr.io/therealaleph/mhrv-tunnel-node:latest) listens on plain HTTP. Apps Script'sUrlFetchApp.fetch()rejects self-signed certs and won't talk to a plain-HTTP backend if the destination URL is HTTPS — the request just times out.Setup with Caddy (easiest, automatic Let's Encrypt):
On your VPS (with a domain pointing at it):
Caddyfile (replace
tunnel.your-domain.comwith your actual subdomain):Caddy auto-fetches a Let's Encrypt cert for
tunnel.your-domain.comon first run. Verify:curl -I https://tunnel.your-domain.com/ # Should return 405 (Method Not Allowed — tunnel-node only accepts POST)In
CodeFull.gs(Apps Script):Save → Deploy → New deployment → Web app.
In mhrv-rs
config.json:{ "mode": "full", "tunnel_node_url": "https://tunnel.your-domain.com", "auth_key": "<the-hex-key>", "deployment_ids": ["AKfycb..."] }Alternative: nginx with certbot. If you prefer nginx, the shape is the same — listen on 443 with a Let's Encrypt cert, proxy_pass to
http://127.0.0.1:8080. Caddy is just less config.Domain-less alternative: if you don't have a domain, you can use a free DDNS service (DuckDNS, FreeDNS) and point
<something>.duckdns.orgat your VPS IP. Caddy handles those the same way.Filing as tracking for
docs/full-mode-https.mdin v1.7.x. Once the doc lands I'll update this comment.[reply via Anthropic Claude | reviewed by @therealaleph]
miladmeidanshahi commentedon Apr 26, 2026
is it deployed?