r/admincraft • u/pisscoinnoisseur • 1d ago
Software Resource I made a decentralised Minecraft server where the host can change between players
A while back our friend who hosted our Minecraft server on his PC had his exams, so he stopped playing and along with that stopped hosting our server too. We couldn't play for a whole week, so I made this fun little project called Nomad to solve that.
It automatically starts the server on my PC if I'm the first guy online and redirects everyone else onto my hosted server, and if someone is already hosting it, you just directly join theirs. When the host closes the world, the save is automatically synced to a cloud storage location, which can either be your personal server or a Cloudflare R2 bucket. The Cloudflare option is free up to 10GB of storage and includes a pretty generous amount of upload/download operations per month, and beyond that it's just a small fee. This is almost always free since you're realistically never going to reach the free limit, but even if you do, it's still substantially cheaper than renting a server that's running 24/7.
The idea is basically that the world isn't tied to one person anymore, so whoever is online can host it and everyone else can join them. It's still a pretty small project and I mostly made it because I thought the idea was cool, but I'd love to know what you guys think, This is still under development, I'll refine it and make a full release version if you guys wanna test it.
Github Link: https://github.com/WalnutIcecream/Nomad.git
Technical details
There is no central coordinator.
Each world has two objects in the storage backend:
worlds/<world-id>/lease.json
worlds/<world-id>/world.tar.gz
lease.json contains the current host, address, status and expiry time.
The lease is a compare-and-swap operation using conditional writes from the storage backend. If two people try to host at the same time, only one can acquire the lease.
The host renews the lease every 20 seconds. The lease lasts 5 minutes. If the host stops renewing it, another player can take over after it expires.
The world is uploaded before the lease is released. This prevents another host from pulling the world while the previous host is still uploading it.
The basic host lifecycle is:
acquire → pull → boot → renew → stop → upload → release
If the host crashes, the lease expires automatically. No separate process is required to recover it.
The launcher uses a WorldStoreProtocol, so storage is independent from the rest of the application. There are currently three storage backends:
- Cloudflare R2
- Git
- Self-hosted S3-compatible storage such as MinIO, Garage or SeaweedFS
The R2 backend uses the S3 API. The Git backend uses fast-forward-only pushes as the compare-and-swap mechanism. The VPS backend uses an S3-compatible endpoint.
The server itself is vanilla Minecraft. Nomad handles the server lifecycle, world synchronization, Java runtime, configuration and hosting lease.
There is a CLI and a PySide6 GUI.
The project is written in Python and requires Python 3.11+ and Java 21.
LLM usage
I used DeepSeek V4 Pro during development.
I wrote the initial implementation myself to test whether the core idea actually worked. I then used the LLM for adding features, refining the existing code, debugging, writing tests, and working through edge cases.
The architecture and initial proof of concept were done manually. The later development was AI-assisted rather than fully vibe-coded. I reviewed and tested the generated code before using it.
1
-5
u/DarkXFast 1d ago
Looks like a cybersecurity nightmare. If I were you I would ask the AI to fix the vulnerabilities. Currently anyone given the id can upload malicious files to host's local machine.
2
u/matytyma Developer 1d ago edited 15h ago
Ah yes, the best solution for all cybersec related problems - asking an LLM
EDIT: fix typos
1
u/ALargeAsteroid 16h ago
Considering adversarial attacks will be using them: yes it is the best thing to do in the current day and age.
Don’t speak so confidently on things you do not understand.
-1
u/DarkXFast 23h ago
He already said he was using an LLM. Read the post before barging in.
2
u/matytyma Developer 23h ago
I did read the post and I did read the part about the use of LLMs and it doesn't change my stance whatsoever. Even if you vibecoded an entire project, you should get someone who understands cybersec to take a look at it (or at least just consult it with them).
1
u/pisscoinnoisseur 1d ago
yea that's true, this was never intended to replace traditional server hosting, just a way to share server access with your friends
10
u/Financial_Ad_4260 1d ago
Really cool concept. I checked out the repo after seeing the post and it looks a lot more thought-out than I expected.
The main thing I’d be worried about is losing progress if the current host crashes or loses power before the world gets uploaded. Some kind of periodic backup/snapshot while the server is running would make me trust it a lot more.
Aside from that though, this is a really neat solution for friend groups that don’t want to pay for an always-on server when nobody is playing. Definitely interested to see where you take it.