Run Minecraft (Spigot) and Geyser server in Containers

Did you ever wanted to run a Minecraft server, but after looking at the instructions, tried different ways, at in the end, gave up? Or you just want a quick and easy way to run a Minecraft server? Well this article is for you.

I am going to show you how to quickly get a integrated Minecraft server, bedrock and Java into a single configuration executed in docker containers.

In order to accomplish this, we need to run two products, a spigot server and a geyser server, a spigot is a high performance Java Minecraft server, and a geyser server is a gateway for bedrock clients to use a Java server.

I developed two GitHub repository that will guide us in setting this up:

https://github.com/globular/spigot-container

and

https://github.com/globular/geyser-container

The repository’s instructions assume that you are familiar with Linux and assumes that you know how to open up tcp and udp ports to reach your server. Oh, did I mention that you need a server to run a minecraft server? And it has to be pretty powerful.

First of all, follow the instructions listed here, once done, head over to the instructions listed here. Ay this point, you should have two containers running, a geyser-run and a spigot-run container.

Now it’s time to configure geyser with the key from spigot to be able to communicate with the following steps. This article assumes that you setup the directory structure just like the instructions recommend:

  • Simply stop geyser and spigot with the instructions provided, but pretty much you execute ./stop.sh for both containers
  • Head over to https://geysermc.org/download#floodgate and download the Spigot/Paper plugin jar file
  • Copy the floodgate-spigot.jar to spigot plugin directory, if you followed the instructions, the directory is ~/git-repos/spigot-container/workdir/plugins
  • Start the spigot server with ./run.sh, wait for the server to completely boot by monioring the logs with ./logs.sh
  • Copy the key.pem file generated from the directory ~/git-repos/spigot-container/workdir/plugins/floodgate to ~/git-repos/geyser-container/workdir
  • At this point depending on your configuration, you have to edit the geyser config.yml file and change the value of auth-type to floodgate
  • You might have to change the address option to specifically point to the listening IP.
  • Now start geyser server by executing ./run .sh
  • Connect with your Minecraft client Java or Bedrock to the IP or hostname (this depends on how the server was setup)
  • to resolve any issues, monitor the  logs with ./logs.sh for each container

At this point, while your Minecraft server booted ok, there are many things that you need to setup to make your server a playable and enjoyable experience. This goes beyond the scope of this article and there are many ways to accomplish this. Search youtube and google for the additional steps.

I hope this helped you in setting up a basic Minecraft server for both bedrock and Java clients.

Enjoy and type away…

Leave a Reply