Managing servers in multiple locations
from skywhale241@lemmy.one to selfhosted@lemmy.world on 23 Apr 02:56
https://lemmy.one/post/13555619

How do you manage multiple machines in different locations. The use case is something like this, i want self hosted different apps in different locations as redundancy. Something like i put one server in my house, one in my dad’s house, couple other in my siblings/friends house. So just in case say machine in my house down or internet down. It can fallback to the other machines. I was thinking using docker swarm on multiple raspberry pis. But opening port on router seems not secure at all. How do i connect those machine together? Should i put wireguard on server # 1 and other servers will connect to that server. But if the network/machine failed on thar server; everything else will not work.

#selfhosted

threaded - newest

five82@lemmy.world on 23 Apr 03:02 next collapse

Tailscale. Use Headscale if you prefer self hosting over using their cloud service.

skywhale241@lemmy.one on 23 Apr 03:14 collapse

Never use tailscale before but this is good opportunity to learn.

sandalbucket@lemmy.world on 23 Apr 03:04 next collapse

Tailscale might be the best bet at this point. It will manage the wireguard mesh for you, and use nat holepunching for handshaking instead of needing listening ports.

sntx@lemm.ee on 23 Apr 08:27 next collapse

This, or slackhq/nebula

BearOfaTime@lemm.ee on 23 Apr 13:42 collapse

And enable subnet routing on the Pi.

I’ve done this, it works very well. And since a Pi is small, you can keep a “hot spare” ready to send to anyone.

possiblylinux127@lemmy.zip on 23 Apr 03:55 next collapse

What services are you running? You don’t want to cluster with multiple locations as the latency will kill you and it will eat bandwidth like crazy.

Maybe use something like syncthing to sync data directories across. I would use Netbird to connect them and the. Ansible for administration.

catloaf@lemm.ee on 23 Apr 04:15 next collapse

You might just run it in the cloud. A DR failover process is a bit more complex than most home server environments, and is rarely automatic or smooth.

atzanteol@sh.itjust.works on 23 Apr 04:21 next collapse

This will be a good lesson in how difficult it is to setup servers with high availability.

I’d suggest getting redundancy working on your own network first before distributing it. How do you plan to handle storage? Will that be redundant as well?

mhzawadi@lemmy.horwood.cloud on 23 Apr 06:19 next collapse

The comments about storage still stand, that’s a tricky thing to do over the internet.

But I would recommend a meshing VPN, tinc can mesh and will route round network problems.

Also don’t forget about backups, as that could be a better thing to have off site

theroff@aussie.zone on 23 Apr 12:29 collapse

You could use HAProxy on the client side to load balance apps in multiple locations, but it really depends on the application.

I like to manage my software with Ansible but Docker stack files might make it simple enough for you.