Spigot is a modification of the Minecraft server software, CraftBukkit. Spigot optimizes server resource usage, ensuring your players have the best experience and is also backwards compatible with most CraftBukkit modifications, allowing you to make your server unique. In this guide, we will setup Spigot on Ubuntu Server.
It is recommended to run all commands as a user with sudo privileges that is not root.
Start by ensuring that your server is up to date.
sudo apt-get update && sudo apt-get upgrade -y
Install the needed packages.
sudo apt-get install git openjdk-7-jre tar -y
Allocate the desired amount of memory. Replace 1G accordingly.
sudo fallocate -l 1G /swapfile
Secure the permissions of your new swap file.
sudo chmod 600 /swapfile
Allocate the swap space.
sudo mkswap /swapfile
Turn on swap.
sudo swapon /swapfile
Make your swap file permanent. Add the line below to the bottom of the
sudo nano /etc/fstab /swapfile none swap sw 0 0
Ensure you are in the home directory of the user used for installing Spigot.
Create a folder for BuildTools.
mkdir build cd build
Download BuildTools.jar Look for updates on their Jenkins page.
wget -O BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
git config --global --unset core.autocrlf
java -jar BuildTools.jar
Make note of the name of your
spigot.jar file. For example,
Make a directory for your server.
cd ~ mkdir server cd server
spigot.jar into your server directory. Replace
spigotname.jar with the name of your file.
mv ~/build/spigotname.jar ~/server/spigot.jar
Create a start up script for your server.
start.sh match the following, replacing
-Xmx1024M with the amount of RAM installed on your server.
#!/bin/sh java -Xms512M -Xmx1024M -XX:MaxPermSize=128M -jar spigot.jar
chmod +x start.sh
Start your server.
sudo apt-get install screen -y
Open an instance of screen.
screen -S "Spigot Server"
Start your server script.
If you are asked to confirm
BuildTools.jar wont run?
You need more RAM on your server or a larger swap file.
start.sh can't run the
file command on your jar file?
Check to ensure everything is typed exactly the same, Linux IS case sensitive.
Want to download a specific Minecraft version?
java -jar BuildTools.jar --rev 1.8.4
Replace 1.8.4 with the version of your choice.