back
46 comments
This is not a valid Show HN. Please read the rules: https://news.ycombinator.com/showhn.html.
Sorry, what rule does this post violate? Maybe I'm under-caffeinated but I'm not seeing it.
Off topic: blog posts [...] and other reading material

https://news.ycombinator.com/showhn.html

It's a fine HN submission, just not a Show HN.

Sorry, wasn't aware of that.
Maybe I don't understand docker as well as I'd like - but why do you create the named volume instead of simply mapping to a local folder on the host?

In my experience mapping to a local dir is nice because you can browse the files on the host machine and can implement backups etc... quite easily.

When you do a named volume like that, where are the actual files on the host?

On Debian they end up under /var/lib/docker/volumes/
Ah ok cool, I guess it isn't hard to find then.

I usually have my docker-compose.yml file in a dir along with the mapped volume directories. Allows me to just rsync that one folder to capture all config & data.

Are names volumes just a way to not have to worry about the files and leave them handled by docker?

Yea a use case would be to to persist application data when updating by pulling a newer container. Mapping to the host introduces the possibility of conflicts between the host and/or other containers.
You can move them as well.
Is this better than running a static site/blog locally generated and hosted on github/gitlab/cloudflare pages?
He said the blog is for his dad. Clearly he just wants to setup something simple with a GUI and that is self-hosted. What you’re suggesting doesn’t accomplish any of those things.
would it possible to create something w/ a GUI like Ghost but hosted on Cloudflare pages/workers? It's hard for me to understand why something as simple as a blog needs a server
If you want to write one for the rest of us, that would be awesome! But ghost is well known, well tested and has plenty of customisation options
isn't that just a headless CMS set up? I hacked something like that for my wife so she can blog...It uses Hexo [1] and a web-ui and a bash script that opens up the localhost/admin url into a fresh browser and then when she closes the script it kills it and frees resources back :)

[1] https://hexo.io/

Ghost has some of the best self-hosting documentation out there. I self-hosted for a while but decided I didn’t want to deal with upgrades and wanted to support them as a company. So I’m paying for a manager solution.
Agree. Very good point. I am looking at their GH sponsor page. Will do it.

BTW, I checked Ghosting pricing https://ghost.org/pricing/ and I see Basic for $29. What is manager solution?

Done sponsoring https://github.com/viggy28?tab=sponsoring. Thanks for reminding. I can see how challenging it will be for Ghost to generate revenue.
i assume they mean "Managed install & setup"
I see. Makes sense.
Hey OP,

I have made a similar setup. One question that I have not yet answered and thus I am changing setup is how secure is to "give" your IP to everyone on the internet.

My assumption is that your home-router has security vuln that we don't know about and could be bypassed by hackers who are willing to mess with you. Even though you may have taken precautions, such as opening only very specific ports, etc.

Those are something I just randomly created.
I've got to add that if your raspberry pI doesn't have power backup or for some reason your network does down, cloudflared tunnel (as used in the post) shuts off after sometime and will not reconnect again till a day(default timeout for cloudflared tunnel to restart). If this is unmonitored you might end up showing an error page for a long time.
Is this info current? In the post announcing free CloudFlare tunnel for all users [1], named tunnels and enhanced reconnection capabilities were also introduced. They seem to be specifically addressing the issue you mentioned, but I haven’t tested them yet.

[1] https://blog.cloudflare.com/tunnel-for-everyone/

Good point. Yes, a lot of reliability improvements for Tunnels announced during Developer week. I will certainly test this problem sometime and post here.

Thread on the community seems relevant: https://community.cloudflare.com/t/getting-cloudflared-to-ru...

The have a pretty good blog post about improvements made and de-coupling they have done:

https://blog.cloudflare.com/argo-tunnels-that-live-forever/

Hmm, I'm wondering if it makes sense to push static pages to Cloudflare Pages and take the Raspberry Pi out of the serving path entirely?
author here:

I tried port forwarding (because I never did in the past) and couldn't figure how to do it. capture here https://viggy28.dev/article/pain-of-setting-up-port-forwardi...

I guess Alex's inlets (https://github.com/inlets) might do it too. I would love to hear other alternatives.

If you are going to use inlets, which needs a bastion host. I would rather just suggest to jump in and use wireguard VPN instead on a $3.5 vps on linode or lightsail. You get more control over your connection and firewall capabilities than inlets, which locks down premium capabilities. Also Cloudflared tunnel will timeout and turn off your endpoint after a network disconnection. If you notice the systemd default file that comes with it, you will notice it restarts after a day. So you will have significant downtime, if your home network or power goes down.
Port forwarding is fairly simple. All routers should support it. Forward port 443 to local-rpi-ip-address:443. Setup caddy/traefik. Create A record to public ip. Enable tls. Enable file hosting. Done: you now have TLS static website without any 3rd parties.

That said, cloudflare is super handy for dns, and for proxying specific domains, where you don't want to expose your public ip.

Unfortunately residential networks usually don't have static IP's so the IP changes on reboots. Updating the DNS record every time would probably be a PITA.
Couple of notes: You can use a DNS updater like this one: https://github.com/timothymiller/cloudflare-ddns

The bigger problem would be if your ISP implemented CGNAT.

Easily taken care of by duckdns for example
Then I can't hook it up to a real domain like google.com, just a subdomain of whatever site is running it.
And then you have to hope your ISP doesn't use CGNAT
Thanks. Xfinity (my ISP) supports only TCP and UDP for Xfi Gateway and not HTTP/HTTPS.

The thing which I don't know is how to remove Xfi Gateway and use my own gateway/router.

HTTP and HTTPS are layer 7 protocols that both go inside the layer 4 protocol TCP.

So port forward TCP and you'll be good.

https://en.wikipedia.org/wiki/OSI_model

Perfect. Thanks. That was my doubt. Will try it out.
Yeah, most routers have a predefined list of "Applications" but you can add a custom application with custom port.

Back in the day, DynDNS actually allowed the IP to DNS as a free service.

Oh, I forgot to mention HTTP uses TCP port 80, and HTTPS uses TCP port 443.
Nice work! How does this compare with a self-hosted wordpress?
Honestly, I have never used Wordpress and I think there is not much difference. Both are CMS.

Things which I liked with Ghost: 1. Easy to write, publish (that's one of the biggest challenge for at least me to write more) 2. Lot of good add-ons (I guess Wordpress also will have same)

Node JS based instead of running a full LAMP stack. I believe ghost supports sqlite for low traffic.
Can confirm. Currently it does use Sqlite. Of course, one can replace it with mysql or mariadb.
Is Argo free? I only see paid options
They haven’t updated their docs yet https://blog.cloudflare.com/tunnel-for-everyone/
AFAIK, Cloudflare Tunnel (used to be called as Argo Tunnel) is free.

Argo (smart routing) is usage based.

PS: From https://www.cloudflare.com/products/argo-tunnel/, I do see "To start using Argo Tunnel, you'll need a Cloudflare plan and an Argo subscription." - I haven't enabled Argo subscription and I am able to use Tunnel. So there is some confusion.