News for hackers. Stuff that matters.
Re:Show HN: A CLI tool I made to self-host any app with two ... by 4star3star on Thursday September 19, 2024 @11:11AM (#41592750)
I like what I'm seeing, though I'm not sure I have a use case. On a VPS, I'll typically run a cloudflared container and configure a Cloudflare tunnel to that VPS. Then, I can expose any port and point it to a subdomain I configure in the CF dashboard. This gives https for free. I can expose services in containers or anything else running on the VPS.

I'll concede there's probably a little more hands on work doing things this way, but I do like having a good grip on how things are working rather than leaning on a convenient tool. Maybe you could convince me Sidekick has more advantages?

Re:Show HN: A CLI tool I made to self-host any app with two ... by skinner927 on Thursday September 19, 2024 @02:05PM (#41594560)
I must be an old simpleton, but why get cloudflare involved? You can get https for free with nginx and letsencrypt.
Re:Show HN: A CLI tool I made to self-host any app with two ... by mightymoud on Thursday September 19, 2024 @02:12PM (#41594644)
It's a tunnel. So VPS can only be reached through cloudflare. It's not only for https, but more for security and lockdown
Re:Show HN: A CLI tool I made to self-host any app with two ... by mediumsmart on Thursday September 19, 2024 @03:42PM (#41595596)
excellent and if cloudflare thinks your IP is iranian its going to get a really secure lockdown.
Re:Show HN: A CLI tool I made to self-host any app with two ... by nine_k on Thursday September 19, 2024 @04:58PM (#41596327)
More seriously, it also helps when you're a target of a DDoS.

It's always a balancing act between outsourcing your heavy lifting, and having to trust that party and depend on them.

Re:Show HN: A CLI tool I made to self-host any app with two ... by newaccount74 on Friday September 20, 2024 @02:13AM (#41599282)
I've been running my business on VPS from Linode and Hetzner for the last 13 years and have never had an issue with DoS.

I think the benefits of Cloudflares DoS protection are vastly oversold and absolutely unnecessary for 99% of businesses.

(I think the false positives where some users randomly get captchas are actually bad for business)

Re:Show HN: A CLI tool I made to self-host any app with two ... by BigJ1211 on Friday September 20, 2024 @07:25AM (#41600888)
The problem with that mindset is that by the time you do get hit, it'll be too late to act and remedy the issue easily.

Even though I agree with you in spirit. The chances that you will need it are slim.

Re:Show HN: A CLI tool I made to self-host any app with two ... by worik on Friday September 20, 2024 @04:52PM (#41605418)
> You can get https for free with... [any webserver] and letsencrypt.
Re:Show HN: A CLI tool I made to self-host any app with two ... by mightymoud on Thursday September 19, 2024 @02:11PM (#41594633)
Interesting setup....

How do you run the containers on your VPS tho? You could still use Sidekick for that!

I think your setup is one step up in security from Sidekick nonetheless. A lot more work it seems too

Re:Show HN: A CLI tool I made to self-host any app with two ... by tacone on Thursday September 19, 2024 @02:19PM (#41594731)
Interesting! How do you connect via ssh? Do you just leave the port open or is there any trick you'd like to share?
Re:Show HN: A CLI tool I made to self-host any app with two ... by hu3 on Thursday September 19, 2024 @02:44PM (#41594997)
Nice setup.

But isn't this a little too tied to Cloudflare?

Caddy as a reverse proxy on that VPS would also give us free HTTPS. The downside is less security because no CF tunneling.

Re:Show HN: A CLI tool I made to self-host any app with two ... by aborsy on Thursday September 19, 2024 @03:39PM (#41595548)
You could put Authentik in front. It does Cloudflare stuff on VPS.
Re:Show HN: A CLI tool I made to self-host any app with two ... by eikenberry on Friday September 20, 2024 @03:16PM (#41604797)
Are there other services that provide the similar offering as Cloudflare that could be switched to in case they changed policy (eg. removed the free teir)? I.E. is there any mitigation to Cloudflare lock-in?
Re:Show HN: A CLI tool I made to self-host any app with two ... by vineyardmike on Thursday September 19, 2024 @03:20PM (#41595355)
I do this for “internal” apps but with Tailscale.
Re:Show HN: A CLI tool I made to self-host any app with two ... by SahAssar on Thursday September 19, 2024 @03:22PM (#41595379)
Are you also making sure that nothing on the VPS is actually listening on outside ports? A classic mistake is to setup something similar to what you are describing but not validating that the services are not listening on 0.0.0.0.

I'd also not want to have cloudflare as an extra company to trust, point of failure and configuration to manage.

Re:Show HN: A CLI tool I made to self-host any app with two ... by renewiltord on Thursday September 19, 2024 @05:23PM (#41596510)
This is pretty cool. I did not know I could do this. Currently, I have:

1. nginx + letsencrypt

2. forward based on host + path to the appropriate local docker

3. run each thing in the docker container

4. put Cloudflare in front in proxy DNS mode and with caching enabled

Your thing is obviously better! Thank you.

Re:Show HN: A CLI tool I made to self-host any app with two ... by jmpavlec on Thursday September 19, 2024 @05:30PM (#41596566)
I used to run it the cloudflared way as the other user described but the tunnel often went offline without explanation for short periods of time and the latency was so so in my testing. I run it more similar to you now and haven't had any stability problems since dropping the cloudflared setup. I use cloudflared for a less critical app on my own hardware and that also goes up and down from time to time.
Re:Show HN: A CLI tool I made to self-host any app with two ... by renewiltord on Thursday September 19, 2024 @05:34PM (#41596589)
Oh thank you for that experience. This way has been entirely fire and forget (except for application layer issues) so I wouldn't want to change things then. The infra layer is pretty simple this way. I lost a 10 year server to bitrot (Hetzner wanted to sunset it and I had such a bespoke config I forgot how to admin it over the 10 years) so I'm trying to keep things simple so it will survive decades.