Hacker News new | past | comments | ask | show | jobs | submit login
Self-host your blog on a Raspberry Pi (ban.app)
43 points by congoe on June 26, 2022 | hide | past | favorite | 19 comments



Self hosting is cool, but if you actually want people to find your content my experience is that search engines will penalise heavily your ranking for being hosted off a residential IP that’s is not close to them and likely has a history of being unreliable. Unreliability and slowness both from the network latency and page rendering time (Wordpress doesn’t render so fast on a pi - at least when I tried it) will put you all the way to the bottom. If you don’t care about that then this is just fine, depending on what I am hosting changes where I put it, but stuff I want to be findable I host in cloud front/s3 as static pages and costs about $1 a month.

These are my notes on setting that up http://blog.cetinich.net/content/2020/2020-sphynx-ablog-blog...


I've been looking a lot into self-hosting recently. In my area, it seems that no LTE ISP will give you an suitable connection: they're all either behind a NAT, or behind a heavy firewall.

Now sure, I can rent a VPS to forward traffic to my device via a VPN. But that's not really self-hosted any more.

It seems a decentralised internet is becoming harder and harder with each passing day -- hosting stuff on an rpi at home is no longer possible.


I don’t think any LTE will give you a public routable address directly (unless you specifically request and pay a boatload for it) you will almost always be behind a CGN https://datatracker.ietf.org/doc/html/rfc6598


IPv6 traffic is also heavily firewalled too (for the few providers that even have it).


Dropping ddclient into a docker container as part of your compose files takes very few resources, and keeps your domain name pointed to your current public IP through changes. I've been running that for years without any maintenance besides remembering how to use the config file when I need to add a new domain.

As I'm writing though, that probably wouldn't help in most university network setups, which the article mentioned. Tunneling is probably the path of least resistance there.


Step 1 is the most difficult. Buy a Raspberry Pi


For such simple tasks like setting up a web server, Raspberry Pi has become a metaphor for any Linux capable embedded board with networking, a condition that can be satisfied by a huge number of boards, many of which easily available and often cheaper than the Raspberry Pi. A quick search at tme.eu for embedded boards in stock with Ethernet and at least 512 MB RAM returned 30 different products, starting from €35 in single quantity.


Ha this gave me a chuckle! The supply chain shortages go much further than just chips sadly :(


> But if you are like me and your Raspberry Pi is sitting behind your router's firewall, you can't use this approach as your IP-address is changing all the time.

If your DNS provider has an easily usable API, you can set up something that checks your current public ipv4/v6 address and changes the DNS record if the IP address changes. You just need to set the DNS TTL to something smaller, such as 1 hour or less, to limit the impact of a changing IP address.


I didn’t know that was possible, I’ll have a look at it :)


I've used this in the past: https://hub.docker.com/r/oznu/cloudflare-ddns/

Cloudflare is a nice option.


I’ve used http://www.duckdns.org/ with a raspi for this purpose.


Docker has just been getting too good.

Now I’m waiting for someone to create a docker fork where docker has access to the host system directly outside of the VM and shared volumes.


https://github.com/89luca89/distrobox may be of interest to you.

Although I'd argue "Docker without containers" is a UX achieve.


> Now I’m waiting for someone to create a docker fork where docker has access to the host system directly outside of the VM and shared volumes.

They're not VMs, they're containers. And it already supports accessing the host filesystem, see the `--volume` flag.


They're VMs on Mac and maybe Windows (dunno if it uses WSL).


It uses WSL2 on windows.


What is the advantage of this compared to create some pages on for example neocities?


Educational purposes and bragging rights




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: