Live data from Hacker News

Exposing a web service with Cloudflare Tunnel

erisa.dev

111–120 of 186 posts

Re: Exposing a web service with Cloudflare Tunnel

#111

Earlier quoted context omitted.

What's the goal? Does your grandma want to start a blog and you're talking about hosting the HTML from that folder, or do you want to be able to access the folder to read/write files, or something else?

The goal is to host a html page and/or share a file.

I think our thread got too deep and it won't let me reply. Feel free to contact me directly through https://apitman.com or post on https://forum.indiebits.io if you want to talk more.

But to answer your question, you'll need to run a CLI daemon on your grandma's computer. Something like ngrok static files would probably be the easiest:

https://ngrok.com/docs#http-file-urls

But since you're already setting up one daemon in that case, I'd use Cloudflare Tunnel and also run a basic webserver or WebDAV server alongside it to give you more control over how the files are hosted.

Also pretty sure you have to pay for custom domains with ngrok.

Re: Exposing a web service with Cloudflare Tunnel

#112
post #73

I maintain a list[0] of solutions to this problem. Cloudflare Tunnel is what I currently recommend to most people. IMO it's the easiest way to expose services publicly on the internet. For example a website or shared Plex server. Main downsides to Cloudflare Tunnel are no e2ee (Cloudflare decrypts all your traffic) and technically anything other than basic HTML websites (ie media streaming) is against their free ToS,…

This isn't required for a shared Plex server, they proxy external connections via their servers automatically.

Re: Exposing a web service with Cloudflare Tunnel

#113
post #15

If you have $3-5/month to spare on a VPS, a similar but self hosted solution can be achieved- Tunnel/VPN and reverse proxy- using Wireguard and Caddy. Caddy in particular is extremely easy to configure, with the bonus that HTTPS/Lets Encrypt has never been free'er. Wireguard configuration is also gloriously minimal but admittedly, potentially tricky to get right the first time. It's just good to consider alternatives…

Similar, I use a cheap AWS Lightsail VPS $3.50 (Lightsail has DDOS protection)-> Wireguard -> Apache Reverse Proxy mod -> my local services.

Re: Exposing a web service with Cloudflare Tunnel

#114
post #73

I maintain a list[0] of solutions to this problem. Cloudflare Tunnel is what I currently recommend to most people. IMO it's the easiest way to expose services publicly on the internet. For example a website or shared Plex server. Main downsides to Cloudflare Tunnel are no e2ee (Cloudflare decrypts all your traffic) and technically anything other than basic HTML websites (ie media streaming) is against their free ToS,…

This isn't required for a shared Plex server, they proxy external connections via their servers automatically.

Good to know, thanks. I used Plex as an example since more people know what it is, but in practice I would use Jellyfin for media streaming, since it's open source and doesn't use dark patterns. But you also need to manage tunneling yourself...

Re: Exposing a web service with Cloudflare Tunnel

#116
I've just spent a few hours trying to use Cloudflare Tunnels to connect to my machine through SSH after reading this post. Unfortunately, I then found that SSH keys are not supported: https://github.com/cloudflare/cloudflared/issues/319 so I cannot disable Password authentication.

Re: Exposing a web service with Cloudflare Tunnel

#117
post #73

I maintain a list[0] of solutions to this problem. Cloudflare Tunnel is what I currently recommend to most people. IMO it's the easiest way to expose services publicly on the internet. For example a website or shared Plex server. Main downsides to Cloudflare Tunnel are no e2ee (Cloudflare decrypts all your traffic) and technically anything other than basic HTML websites (ie media streaming) is against their free ToS,…

> though I haven't heard of that being enforced in practice. It happened here[0], and the reasoning for why they allow some free tier content is in their S-1[1]. Typically, even if you blatant file sharing or video streaming application in violation of 2.8, Cloudflare doesn't necessarily care as long as it's not too bandwidth intensive (eg. I wouldn't recommend having a dozen people streaming Plex from the outside in…

Thanks for this. The thread is confusing because the user is quite upset and hostile and didn't seem to understand Cloudflare very well, but in the end this does indeed seem like a case of the site being shut down due to non-HTML ToS violation.

Re: Exposing a web service with Cloudflare Tunnel

#118
post #42

Earlier quoted context omitted.

> I have my reservations about CloudFlare with regard to centralizing the web, but this tunnel is fantastic Superior UI/UX offered by centralized systems is why everything is being centralized. People will trade everything including privacy and security for ease of use. The market has shown this time and time again.

Not to mention Cloudflare Tunnel is a loss leader. Basically any new entrant has to either get funding or justify charging money for tunnel traffic. Cloudflare Tunnel has gotten good enough there aren't a lot of ways to be better left. A couple would be offering e2ee and a less stringent ToS (technically anything other than normal HTML websites is not permitted, though I'm not aware of this ever being enforced, yet).

Cloudflare already has the bandwidth. I suppose tunnel doesn't cost much ( or even anything) compared to the rest since they pay for the size of the pipe.

When someone uses the tunnel, they never have to go outside of cloudflare. Since the traffic ( i suspect) would stay very local.

Perhaps it could be even cheaper in the end for them.

Re: Exposing a web service with Cloudflare Tunnel

#119

Earlier quoted context omitted.

Not to mention Cloudflare Tunnel is a loss leader. Basically any new entrant has to either get funding or justify charging money for tunnel traffic. Cloudflare Tunnel has gotten good enough there aren't a lot of ways to be better left. A couple would be offering e2ee and a less stringent ToS (technically anything other than normal HTML websites is not permitted, though I'm not aware of this ever being enforced, yet).

Cloudflare already has the bandwidth. I suppose tunnel doesn't cost much ( or even anything) compared to the rest since they pay for the size of the pipe. When someone uses the tunnel, they never have to go outside of cloudflare. Since the traffic ( i suspect) would stay very local. Perhaps it could be even cheaper in the end for them.

Good point, but they do still have to pay development costs for Cloudflare Tunnel.

Re: Exposing a web service with Cloudflare Tunnel

#120
post #15

If you have $3-5/month to spare on a VPS, a similar but self hosted solution can be achieved- Tunnel/VPN and reverse proxy- using Wireguard and Caddy. Caddy in particular is extremely easy to configure, with the bonus that HTTPS/Lets Encrypt has never been free'er. Wireguard configuration is also gloriously minimal but admittedly, potentially tricky to get right the first time. It's just good to consider alternatives…

I've just done the same thing at work. I've got a little Dell Optiplex running bookstack here, and a AWS Graviton2 box running a wireguard server and reverse proxying web traffic over it.

Upvoted you for your username :)
Post reply on HN