Do you host your own server on a raspberry pi? How do you deal with non static ip? Is it safe to self-host?
Sorry for dumb questions but that could help us with server charges.
What material do you advice?
Thank you for your contributions.

@apps Did you need help to manage your server ? Pleasure to help you in any case.

For non static IP I recommended to use a dynamic DNS services like duckdns.

@apps ISPs generally don't mind giving you a static IP address instead of a dynamic one, you just have to ask.
Self-hosting is safe as long à you remember to keep your system up to date.
A Raspberry Pi is OK for a small server but will struggle to handle a heavy load, so consider usage and requirements before choosing your hardware.

@apps @Whidou And do your backups! I think SD are not the safest drives…

Yes. You're right. And that would be easier to save data without paying extra services.

@apps @marcelcosta @Whidou with regard to the SD card, it is possible to use the SD card for boot partition only and have everything else on an SSD connected to one of the USB3 ports. On the 4B, power over USB is enough to power an SSD as well. I run a Nextcloud server and a Lightning node on separate 4Bs with terabyte SSDs.

USB 3 also seems to be faster than SD on the Pi, so performance is another reason to limit what's on the SD card.

@Whidou @apps Regarding static IPs: That differs from country to country, in Germany you most likely have to pay more for a static IP address (and it's not even possible for every ISP).

@apps not just for myself, but everyone else that wants to think along; what do you specifically want to run on your #RPi? Which RPi do you have or want to purchase?

You can give any device a static address, I prefer giving it with the router by MAC address filtering. Or do you mean your home connection not having a static address?

Yes, I thought to buy a because I have no other devices that are done to be turned on h24.
I have no idea of what model should be used and the price.
But we do need to find alternative to services that we currently use.

Honestly, I think that an used notebook is a better choice, since it's way more powerful and (probably) way cheaper than the Raspberry Pi. My stuff is running on a 40€ notebook with a low-tier i3 from 2014 and it's doing a great job. It is also pretty power-efficient. You can also upgrade a notebook easily (storage and ram).

@apps You can even buy a broken notebook with a smashed screen and/or a non-working keyboard.

@apps I use Google Domains which has a easy to use interface for updating domain records with a non-static IP.

But I only use it for me and my partner so far, so it hasn't been stress tested.

Thanks, but we would like to avoid Google stuff. A lot of our users (especially Fdroid ones) don't want to see any links to Google.

@apps depending on your domain registrar's API, you could update your DNS records everytime your IP changes directly. [This tool][1] works well with for example.


@apps A cheap VPS would be much more suited for those in my opinion. Raspis are great for personal use cases, but not for hosting services for many other users.

@apps Aw, shucks.

But for $5/month you would probably be able to host both of those on a VPS from e.g.

Yes, Raspberry Pi with #yunohost . Dyndns for free or with little money, a VPN will help you get one fix IPv4.


I have several self-hosted servers on Raspberry Pi's, one with Pleroma, one with FreedomBox and one more with a couple sites and things.

I have public IP that doesn't change.

It costs me the Internet connection plus domains.

@apps I am in the process of (as time permits) migrating services I've hosted from virtual machines on a couple of10 year old Supermicro servers in my garage to a cluster of little ARM SBCs. You obviously have to watch things closer than cloud compute instances but in my 20+ years of hosting from home it has been safe and functional enough.

If you have reasonable firewall rules...and if you want added peace of mind and intrusion detection system like Zeek or isn't all that risky for smaller, lower traffic sites. It only becomes a problem for really big well known high traffic websites which attract bad actors looking for high impact targets.

Your internet service may need an upgrade depending on what you currently have. I have always had "small business" internet service which offers a fixed IP and permits servers listening on standard ports, though upload speed is not quite what I want it is adequate. A local ISP is rolling out symmetrical gigabit fibre which I will be moving to...

@apps ...if ISPs in your service area are unwilling to provide "small business" level service to your location, or the cost difference is too high, you could always get a minimal $5/month VPS and set it up as a tunnel/vpn server with a reverse web proxy to your home rig tunnel/VPN client(s). That would get around the dynamic IP and blocked ports of home internet service and keep cloud hosting costs to a minimum.

@msh and in addition that would probably also make it easier to nullroute the IP in the event @apps does get DDoS'ed, as it should help keep their home IP private.

@apps how is a non-static IP related to a pi? ;)

I have a server with a non-static, daily changing ip. With dynamic-dns this is usable. If you are able to determine when your ip change happens, it is possible to do this with ~2-3 mins downtime per day. It is merely impossible without at least a little downtime.

In my case it is a private server that is not used at night when the ip change takes place. Can't tell you anything about pi, not using any anymore.

@apps But wouldn't a cheap VM be much more practical? You can get those for 2-3€/month.

@apps I've been running several self-hosted applications, such as cloud storage, for my family in past few years... in a cheap NAS hardware (ARMv7 Processor / 1GB RAM). It runs from my house non-stop in a non-static ip... Nice and cheap solution to this was to buy a domain from namecheap (which is cheap and nice panel), and you can setup infinite subdomains for free, each having dynamic dns support. Any questions, feel free to ask.

@apps openwrt router with ddns client that updates a corresponding record in my BIND. works like a charm but took a bit of tinkering. Any ddns service should do though.

@apps look into #yunohost. All this "boring" stuff built in

I use it to host many things on an extra computer at home.

@apps I have some thoughts to share on this but I'm exhausted from moving all day. Will reply when I have rested and have clear head.

@apps yes, I deal with dynamic DNS using ddclient and a curl to an IP returning api enpoibt like whatsmyip or other.

As far as security, don't use apache, use ufw firewall to turn off unused ports, make sure all servers running on the machine don't have write or execute permissions to directories outside of the ones they need. I'm no security expert but if nobody can even get access to anything you should be good.

I have been using cloudflare tunnels which works quite well.

@apps you should really try @yunohost it's amazing, it even gives you a free subdomain:)

pros of selfhosting:
+ independence
+ MAYBE lower cost

pros of a cheap VPS:
+ stable internet connection
+ stable connection speed
+ static IPv4/IPv6 (no need for dyndns)
+ data savety (runs already on a RAID)
+ easy framework to create and roll back snapshots

Doing your selfhosting *right* is not that trivial.
I'd suggest to go for a small VPS. It should not be that much more expensive than a selfhosted system.

@tootpaste @apps 100% this. And maybe stay away from those gimicky $5 super low powered VPSes. I went with Contabo and I love it for my self hosting needs.

I use a raspi 3 at my home router with DynDNS in conjunction with free for the dynamic IP issue. Performance is horrible, though. If it was for anything public I would upgrade (to not-at-home hosting most likely).

I doubt the reverse-proxying required by ActivityPub would work on a domestic internet connection?

What you want here is called Dynamic DNS, or DDNS. Some companies offer both the domain and DDNS in a bundle, I personally use Dynu
@apps I host my own. Have a HP Proliant G8, so a little bit more oomph. 😁 But I use dynu for being behind a dynamic IP. It has a URL that can update all of your domains every 5 minutes using a hashed password and your account. Just set it on crontab and never have to think about it.
Sign in to participate in the conversation

A friendly instance about tech, apps and for having fun.