Live data from Hacker News

Raspberry Pi as a local server for self hosting applications

cri.dev

41–50 of 321 posts

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

#41

I have a RP4 on my desk collecting dust, need to get it up and running for something useful. This post has got me motivated to find a use for it.

They're great as dust collectors but not as good as arduinos. You can always use it to run nextcloud if you want your own services.

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

#42

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…

ZeroTier uses central servers to assist machines behind NATs in finding each other.

These central servers basically exchange the external IPs of each machine on the virtual network. The nodes on the virtual network then try their best to establish peer-to-peer connections using those external IPs.

I use it all the time with a number of colleagues working from home and it works great! We can all join a virtual LAN and see each others machines behind our home broadband routers.

ZeroTier runs fine on Raspberry Pi. I use it to link machines at home with machines at work, on AWS, Azure, etc.

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

#43

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 was going to do this, but you can usually just change the DNS and add a hosts file to your router assuming it can run firmware that allows it (like tomato or ddwrt). It seemed pointless to try since the charts work for http and everything is https now. I didn't setup specs for traffic but the setup I use is much lighter. Just wanted to suggest this for anyone who might want to block on their home network. I also us…

You can set up DNS over https with pi-hole btw, I did that for mine. It's definitely not the only way to achieve this kind of ad blocking but if you're like me and have several old raspberry pi's laying around from abandoned projects then it's a nice way to put one to good use.

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

#44

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…

For whatever it's worth, I use Samsung Endurance SD cards [1] in all of my Raspberry Pi 4s. While I wouldn't say any of them are subjected to heavy load, I've never had an SD failure in the ~1 year of usage they've each seen.

[1] https://www.samsung.com/us/computing/memory-storage/memory-c...

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

#45
I'm using my old Thinkpad T510 as a home server. It's been running for 7+ years already. I only need to dust the vents once in a while.

It has PiHole, Nextcloud, my humble little Netflix clone, and a few other things. If you use ffmpeg a lot, you ought to have more power than the RPi offers. I often SSH into it to use it as a SOCKS proxy in other countries.

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

#46

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…

> How do people access these servers off of their home network (or do they not?).

Wireguard, listening on the public IP with port forwarding, and using a dynamic dns client to ensure I can always connect even if the public IP changes.

> It seems like most residential ISPs don't provide a static IP and some block port 80?

Not the case here in my experience (Spain), but if you're fine being the only one with access you only need to forward the VPN port.

> I know Zero Tier, and Tailscale exist - but I don't really understand how they work

I only used ZeroTier a bit, but IIRC it was something like:

1) Create a new network in the ZeroTier One website 2) Download the ZeroTier client on your machine(s) 3) Enter the network ID 4) (optionally) authorize the device on the web UI 5) Now the device can connect to other ZeroTier peers on the network you created!

(So yeah, at least the "easy" way involves using their server, no need to selfhost it). Also this option should work without port forwarding.

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

#47

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…

Dyndns to solve the static IP issue, and if not all ports are blocked setup WireGuard on an open port and connect via that. To be honest I prefer to not expose a lot of these home server type projects directly on the web as a lot aren’t that secure. You’re better of going via WireGuard.

The only place you get stuck and need an intermediary vps is if you are behind CGNAT. I came across this recently that helps set all that up. https://github.com/erikespinoza/v4raider

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

#48
post #30

I like my rpi but my life got better when I bought a mini pc instead. Its pretty common to get a 16GB mem micro for not much more than an rpi with power supply, sd card, case. https://computers.woot.com/offers/lenovo-thinkcentre-m73-240...

Yup, similar. I have a thinkcenter m600 series. Quite old but works really well.

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

#49

I recently thought about getting an RPi4 but ultimately spent about a hundred dollars more to get a cheap NUC. It was a bit more expensive but it seems like a more robust platform. A real AC adapter instead of USB (apparently the RPi4 kind of botched it in some revisions? What I read wasn't confidence inspiring), takes normal SO-DIMM ram and a typical SSD, doesn't have a reputation for overheating.. it seems generall…

Which NUC did you end up with?

NUC7CJYH1. With RAM and an SSD it was about $200, while the RPi4 kit I was considering was about $100.

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

#50

I have a RP4 on my desk collecting dust, need to get it up and running for something useful. This post has got me motivated to find a use for it.

My favorite use of a Raspberry Pi has been to run a Jenkins instance.

I use it for CI/CD on projects, but also for automating other tasks -- You can use Jenkins to wrap any arbitrary script with more higher-level logic and extensibility than a cron job.

For example, I use Jenkins to automate multiplatform builds for some side projects, to periodically ingest data into a database, perform cleanup jobs, etc.

Post reply on HN