Decentralised Minecraft Server with Dynamic Host Switching
说明与用途
Nomad 让玩家自动成为 Minecraft 服务器的主机,将世界同步到云存储,并在没有中央协调器的情况下管理租约。
问题
A Minecraft server was unavailable when the sole host stopped playing, causing a week-long downtime for the group.
结果
Nomad eliminates single‑point‑of‑failure hosting by allowing any online player to become the host, automatically synchronising worlds to cloud storage and handling lease management without a central coordinator.
工作流
- Detect first online player and start local Minecraft server
- Publish host address to lease.json in storage
- Redirect subsequent players to the active host
- Host renews lease every 20 s; lease expires after 5 min of inactivity
- On host shutdown, upload world.tar.gz to cloud storage
- Release lease and allow next player to acquire it
证据
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.
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.
- 记录日期: 2026-09-15T08:46:41.113Z