minecraft-server icon indicating copy to clipboard operation
minecraft-server copied to clipboard

Implement Multi-backend server support

Open Dan-megabyte opened this issue 7 months ago • 0 comments

Now for the big one!

A full revamp of the installer/bootstrap script, which in the future could lead to support for setting up more than one server...

  • Moved installation-only files from contrib/ to installer/, to organize the folder hierarchy and reduce the clutter in contrib/
  • Moved backend minecraft server from server/ to servers/backend/, to support multiserver setups
  • Future updates to installer could prompt users for the server names, and auto number the ports they will be using.

Also:

  • The root deploy/update.sh now loops through all the folders in servers/ in addition to proxy/, calling the update.sh in each of them.
  • Added wget to the bootstrap requirements because we use it to fetch the server files (velocity.jar AND paper.jar)

With this PR, to set up another server with name <SERVER_NAME>, just:

  • change into the deploy directory as minecraft
  • cp -r installer/default_config/server servers/<SERVER_NAME>
  • add another server entry to proxy/plugins/vane-velocity/config.toml and proxy/velocity.toml
  • configure your server
  • make sure you chose and configured a different port for your server (25502, for instance)
  • run servers/<SERVER_NAME>/update.sh to get server files
  • as root, systemctl enable --now minecraft-server@<SERVER_NAME>
  • join and /server <SERVER_NAME> You can start and stop any server with the minecraft-server@<SERVER_NAME> service!

However, server administrators now need to use sudo minecraft-attach server-backend instead of just sudo minecraft-attach server. This is to differentiate between the proxy (velocity) and a backend server (paper) named proxy.

As always, welcome to any edits or suggestions!

Dan-megabyte avatar Jul 01 '25 13:07 Dan-megabyte