Vision
Enable users to run personal Nostr relays on their phones with instant public access via a fonstr-hosted tunnel service.
Example:
npx fonstr --tunnel
# Instantly outputs:
✅ Your relay: wss://npub1abc...xyz.fonstr.com/relay
✅ Your profile: https://npub1abc...xyz.fonstr.com/
Why This is Important
- Zero friction - Anyone can run a personal relay without port forwarding, static IPs, or DNS setup
- Identity = Relay - Your npub IS your relay address (beautiful!)
- Mobile-first - Phone becomes your personal data server
- Truly decentralized - Everyone runs their own relay, fonstr just provides the tunnel
Architecture Options
Option 1: SSH-based (like Serveo)
- Users:
ssh -R 0:localhost:4444 tunnel.fonstr.com
- Server maps to subdomain based on npub
- Pros: Secure, works everywhere
- Cons: Need custom SSH server
Option 2: WebSocket tunnel
- Lightweight websocket client in fonstr
- Connects to fonstr.com tunnel server
- Pros: Built into fonstr, seamless
- Cons: Need to write client/server
Option 3: Use frp (Fast Reverse Proxy) ⭐ Recommended
- Package frp client with fonstr
- Run frps server at tunnel.fonstr.com
- Pros: Mature, battle-tested, Apache 2.0 licensed
- Cons: Extra dependency (~10MB binary)
Implementation Plan
Phase 1: Infrastructure
- Set up VPS for tunnel.fonstr.com ($5-10/mo)
- Install frps (frp server)
- Configure wildcard DNS:
*.fonstr.com → VPS
- Set up wildcard SSL with LetsEncrypt
- Configure reverse proxy (nginx/caddy)
Phase 2: Client Integration
- Bundle frpc (frp client) with fonstr
- Add
--tunnel flag to fonstr CLI
- Auto-generate frpc config based on npub
- Auto-connect on startup
- Display public URL in console
Phase 3: Features
- Dashboard at fonstr.com showing active relays
- Stats (uptime, storage, events)
- Optional custom subdomains (premium?)
- Public relay discovery at fonstr.com/explore
Technical Details
frp Server Config (tunnel.fonstr.com)
[common]
bind_port = 7000
vhost_http_port = 80
vhost_https_port = 443
subdomain_host = fonstr.com
Auto-generated Client Config (in fonstr)
[common]
server_addr = tunnel.fonstr.com
server_port = 7000
[npub1abc...xyz]
type = http
local_port = 4444
subdomain = npub1abc...xyz
URL Mapping
https://npub1abc...xyz.fonstr.com/ → index.html
wss://npub1abc...xyz.fonstr.com/relay → Nostr relay WebSocket
https://npub1abc...xyz.fonstr.com/me/ → Solid pod
Benefits
For Users:
- One command to go from local to public
- No technical knowledge needed
- Works on mobile, desktop, servers
- Permanent subdomain tied to identity
For Nostr Ecosystem:
- Lowers barrier to running personal relays
- Truly decentralized (everyone runs their own)
- Identity-first architecture
- Encourages data sovereignty
For fonstr Project:
- Killer feature that differentiates from other relays
- Natural monetization path (premium features)
- Community building (relay directory)
- Aligns with "Just works" philosophy
Cost Estimate
- VPS: $5-10/mo (Hetzner/DigitalOcean)
- Domain: Already owned (fonstr.com)
- SSL: Free (Let's Encrypt)
- Software: Free (frp is Apache 2.0)
- Bandwidth: Depends on usage
Open Questions
- Should we use full npub or shortened version for subdomain?
- Rate limiting per tunnel?
- Storage limits per relay?
- Premium tier for custom domains?
- Should tunnel be opt-in or default?
References
Tagline
"Your phone. Your relay. Your identity."
cc @melvincarvalho - This came from brainstorming how to make fonstr even easier to use on mobile.
Vision
Enable users to run personal Nostr relays on their phones with instant public access via a fonstr-hosted tunnel service.
Example:
npx fonstr --tunnel # Instantly outputs: ✅ Your relay: wss://npub1abc...xyz.fonstr.com/relay ✅ Your profile: https://npub1abc...xyz.fonstr.com/Why This is Important
Architecture Options
Option 1: SSH-based (like Serveo)
ssh -R 0:localhost:4444 tunnel.fonstr.comOption 2: WebSocket tunnel
Option 3: Use frp (Fast Reverse Proxy) ⭐ Recommended
Implementation Plan
Phase 1: Infrastructure
*.fonstr.com → VPSPhase 2: Client Integration
--tunnelflag to fonstr CLIPhase 3: Features
Technical Details
frp Server Config (
tunnel.fonstr.com)Auto-generated Client Config (in fonstr)
URL Mapping
https://npub1abc...xyz.fonstr.com/→ index.htmlwss://npub1abc...xyz.fonstr.com/relay→ Nostr relay WebSockethttps://npub1abc...xyz.fonstr.com/me/→ Solid podBenefits
For Users:
For Nostr Ecosystem:
For fonstr Project:
Cost Estimate
Open Questions
References
Tagline
"Your phone. Your relay. Your identity."
cc @melvincarvalho - This came from brainstorming how to make fonstr even easier to use on mobile.