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 set up Spigot on Ubuntu Server.
It is recommended to run all commands as a non-root user with sudo privileges.
Start by ensuring that your server is up to date.
sudo apt-get update && sudo apt-get upgrade -yInstall the needed packages.
sudo apt-get install git openjdk-7-jre tar -yAllocate the desired amount of memory. Replace 1G accordingly.
sudo fallocate -l 1G /swapfileSecure the permissions of your new swap file.
sudo chmod 600 /swapfileAllocate the swap space.
sudo mkswap /swapfileTurn on swap.
sudo swapon /swapfileMake your swap file permanent. Add the line below to the bottom of the fstab file.
sudo nano /etc/fstab
/swapfile none swap sw 0 0Ensure you are in the home directory of the user who installed Spigot.
cd ~Create a folder for BuildTools.
mkdir build
cd buildDownload BuildTools.jar. Look for updates on their Jenkins page.
wget -O BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jarConfigure git.
git config --global --unset core.autocrlfRun BuildTools.jar.
java -jar BuildTools.jarMake note of the name of your spigot.jar file. For example, spigot-1.8.3.jar.
lsMake a directory for your server.
cd ~
mkdir server
cd serverMove your spigot.jar file into your server directory. Replace spigotname.jar with the name of your file.
mv ~/build/spigotname.jar ~/server/spigot.jarCreate a start-up script for your server.
nano start.shMake 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.jarMake start.sh executable.
chmod +x start.shStart your server.
./start.shInstall screen.
sudo apt-get install screen -yOpen an instance of screen.
screen -S "Spigot Server"Start your server script.
~/server/start.shAccept EULA.
If you are asked to confirm eula.txt, change eula to true.
nano eula.txtBuildTools.jar won't 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 that everything is typed the same way. Linux IS case sensitive.
Want to download a specific Minecraft version?
java -jar BuildTools.jar --rev 1.8.4Replace 1.8.4 with the version of your choice.