Since I didn't have a dedicated server to run things on, I created a way for my GF and I to take turns hosting our Minecraft Java server on either of our machines—without having to manually trade world folders, wait for each other to be online, or worry about corruption.

**What it does:**

* Syncs the server folder between machines using Syncthing
* Prevents both of us from accidentally running the server at the same time (lock file with heartbeat)
* Automatically pauses Syncthing while the server is running to prevent corruption
* Creates automatic backups before and after each session
* Handles crash recovery gracefully

Basically, either of us can just run the script and play. When we're done, it backs up, syncs, and the other person can pick up right where we left off.

**Check it out!**



**Some notes:**

1. We both have MacBook Air M4s, so that's what it's been tested on. With some tweaks it should work anywhere that can run Python 3.8+
2. You'll need Syncthing installed on both devices. I highly recommend it anyway as a self-hosted alternative to cloud backup tools
3. I kind of threw together the README instructions so please give me your honest feedback and post any issues in the Issues section. I'll try to respond quickly and push updates!
4. If you have ideas for improvements, let me know. I have a few of my own

I also highly recommend Tailscale or similar for connecting your devices over VPN if you'd like to play remotely with this setup too.

Voir le contenu lié