Live data from Hacker News

Raspberry Pi as a local server for self hosting applications

cri.dev

121–130 of 321 posts

Re: Raspberry Pi as a local server for self hosting applications

#121

One thing to watch out for when doing something like this is that the Raspberry Pi will by default put your file system on the SD card it boots from. SD cards aren't meant to support a lot of write/erase cycles, so it's easy to end up with a corrupt SD card after a few months to a year depending on what you're doing on your Pi. A workaround that can save you some headaches here is to only boot from the SD card (which…

I've been using a RasPi for a Pihole for years and this is a constant peeve. No matter how many precautions it takes, it eventually dives. RasPi is neat for a lot of things but I'm not convinced it's an ideal selfhosting platform. By the time you invest in the necessary addons, you might as well have gotten a used actual server.

This is where I am at right now.

I have wasted alot of time and lost a not insignificant amount of external data.

I am about to buy a FreeNAS mini tower.

Re: Raspberry Pi as a local server for self hosting applications

#123
post #107

The hardware is there (RPi + USB storage). The server software is there (NextCloud, Plex, n8n, etc). What isn't there is the plumbing. The next logical step after this blog post is making your services accessible to your phone over the public net. You'll immediately find yourself mired in domain name registration, VPS management, TLS cert management, dyndns, port forwarding, hole punching, etc etc. There are lots of…

Most home routers have functionality to do port forwarding and dyndns. Certbot for TLS/cert. Just get a free domain from the dyndns service. No VPS needed if you got your own hardware/Rasbery. Make sure you have backups. Just Dont expect a $30 PC to be without issues.

For me its not the 30$ pc that has issues but the 10$ microsd card the os is on. I had to replace it for the third time in about 6 years now.

But this is not something new of course, everybody will tell you to either use good uSD cards or put the os somewhere else, like an external hdd or so.

Re: Raspberry Pi as a local server for self hosting applications

#124

Setting up a pi-hole DNS server for my wifi network was one of the best decisions I've ever made. Horrifying to see what percentage of traffic is on the ad server blacklist though...

I wanted to do that, but I had a look at Pi Hole and ran away screaming. Instead of proper packaging, they have a 3000 line install script they want you to pipe into Bash.

I went a saner route, and used dnsmasq and a blocklist[1] updated nightly via cron. Dnsmasq in turn queries Stubby that talks to uncensoreddns.org via DNS-over-TLS. Boom, DoT on my entire LAN.

[1]https://github.com/notracking/hosts-blocklists

Re: Raspberry Pi as a local server for self hosting applications

#125
post #95

How do people access these servers off of their home network (or do they not?). That seems like most of the value to me, hosting some service you can access from anywhere without having to use Digital Ocean. It seems like most residential ISPs don't provide a static IP and some block port 80? I think forcing ISPs to allow home users to serve traffic via some standard method would go a long way to enabling a more dece…

My ISP provides me with a CGNAT IPv4 address, so I can't hope to access externally. They delegated a /56 IPv6 subnet to me though. So I just setup Prefix Delegation on my router and allowed in TCP port 443 in the IPv6 firewall. I setup an NGINX reverse proxy. I set a static IPv6 address in my subnet on my servers. My mobile phone provider has IPv6 dual stack. In my public DNS I setup an AAAA record. So I can access a…

This is a good example of the benefits of IPv6.

Interesting.

Re: Raspberry Pi as a local server for self hosting applications

#127

How do people access these servers off of their home network (or do they not?). That seems like most of the value to me, hosting some service you can access from anywhere without having to use Digital Ocean. It seems like most residential ISPs don't provide a static IP and some block port 80? I think forcing ISPs to allow home users to serve traffic via some standard method would go a long way to enabling a more dece…

One way to get a static IP is to rent a cheap VPS, put wireguard on it and use DNAT to forward IP to the client PI as wg client. Works well with an NGINX reverse proxy on the PI redirecting traffic to anything on your LAN.

Re: Raspberry Pi as a local server for self hosting applications

#128

How do people access these servers off of their home network (or do they not?). That seems like most of the value to me, hosting some service you can access from anywhere without having to use Digital Ocean. It seems like most residential ISPs don't provide a static IP and some block port 80? I think forcing ISPs to allow home users to serve traffic via some standard method would go a long way to enabling a more dece…

I just enabled OpenVPN server in my router (gl-inet, openwrt-based), transferred the client.ovpn file to my phone, and bam. Whenever I'm away from home, I light up the VPN on the phone, and bam. There's my TheLounge IRC instance and other stuff just as if I was local.

Oh, I also set up a dynamic DNS service on said router, even though my IP address seldom changes, Murphy's law says the most important time for me to be able to tunnel home would be after an outage or something that reassigns the IP.

Re: Raspberry Pi as a local server for self hosting applications

#129
post #80

My only gripe about Raspberry Pi, and only thing that prevents me from using it as a home server, is that the USB cannot power an external HD

I've wanted to make a headless audio player for my car, and this power issue has been the bottleneck for me. Additionally, spinning disks and moving cars are a bad combination.

Just last week I bought a 500gb SSD and usb adapter for about $75. My Pi 2 powers it without issue. The only problem I see is that the SSD can get fairly warm, so keeping it in my closed center console probably isn't a good idea.

Re: Raspberry Pi as a local server for self hosting applications

#130
post #107

The hardware is there (RPi + USB storage). The server software is there (NextCloud, Plex, n8n, etc). What isn't there is the plumbing. The next logical step after this blog post is making your services accessible to your phone over the public net. You'll immediately find yourself mired in domain name registration, VPS management, TLS cert management, dyndns, port forwarding, hole punching, etc etc. There are lots of…

Most home routers have functionality to do port forwarding and dyndns. Certbot for TLS/cert. Just get a free domain from the dyndns service. No VPS needed if you got your own hardware/Rasbery. Make sure you have backups. Just Dont expect a $30 PC to be without issues.

Of course they do, but a lot of people are behind CGNAT and do not have a public IP address assigned to their CPE, and as such reaching a device in the LAN from the outside - without the device reaching out to you first - is impossible.

And, of course, it can't reach out to your phone because it's also behind CGNAT. So, you need a VPS to act as a bridge between your phone and the device, which would connect to the VPS on boot and route traffic through a tunnel.

Post reply on HN