Setting Up a Spigot Minecraft Server

Setting up and maintaining a Spigot Minecraft server can be one of the most educational things anyone can do. In fact, Minecraft was specifically mentioned in CyberWar for “creating a lot of great technologists out there” because of its command-line driven interface used by players in the client and admins maintaining the server.

But First …

Step by Step

These steps can be grouped as follows:

  1. Create a directory in which to put your server.
  2. Download the Spigot BuildTools.jar into that directory.
  3. Start it with java -jar BuildTools.jar first to initialize.
  4. Edit the eula.txt from false to true.
  5. Start again for the main world creation.
  6. Connect and grant op permissions.
  7. Stop the server from the command line.

Change into your home directory. We will be using the home directory because all the Minecraft server files are too large to really store in your repos as a GitLab project repo.

cd

Remember that by default cd automatically takes to your home directory (which is exactly the same as the harder to type cd ~.

Make a minecraft directory and change into it.

mkdir minecraft
cd minecraft

🎗️ Remember that you can tap the tab key to complete the file names and help you with your typing. This is especially useful for long names or names that have weird characters or spaces in them.

You should see you have nothing in your directory. You can check your path to your current location as well with pwd.

ls
pwd
[rob@skilstak minecraft]$ ls
[rob@skilstak minecraft]$ pwd
/home/rob/minecraft
[rob@skilstak minecraft]$

Now might be a good time to read about the Spigot Minecraft Server.

Next we need to download the latest BuildTools.jar

Now we need to run it. This will take a while. It essentially does the following:

  1. downloads a Minecraft server,
  2. decompiles it,
  3. adds in its own stuff,
  4. recompiles it putting it back together.

Don’t worry about the long pauses. You are waiting to see “Success!”

java -jar BuildTools.jar
Starting clone of https://hub.spigotmc.org/stash/scm/spigot/bukkit.git to Bukkit
Cloned git repository https://hub.spigotmc.org/stash/scm/spigot/bukkit.git to /home/rwx/minecraft/minecraft/Bukkit. Current HEAD: ad5d102589cb6a9aa60f0f35a0cf65b4348c7714
Starting clone of https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git to CraftBukkit
...
Success! Everything compiled successfully. Copying final .jar files now.
...

Create a symbolic link so the spigot.jar name is consistent. First let’s see what the name is.

ls
apache-maven-3.6.0  BuildTools.jar      Bukkit       craftbukkit-1.13.2.jar  spigot-1.13.2.jar
BuildData           BuildTools.log.txt  CraftBukkit  Spigot                  work

So in my specific case here spigot-1.13.2. The exact file name might be different for you. Make sure you notice what it is before you just copy and paste the following.

ln -fs spigot-1.13.2.jar spigot.jar
ls -l

The -s means make it a symbolic link.

The -f means force it (useful when you already have one).

The ls -l means do a long listing so you can see that it is a symbolic link.

⚠️ If your text is blinking red the you did something wrong and check what you did.

Starting a Minecraft Server
Backing Up a Minecraft Server