Spigot is an open-source Java project that allows users to run their Minecraft server. It also allows users to add plugins to extend server features. Note that there are more than 100,000 Spigot servers today. This makes Spigot one of the most stable and diverse Minecraft servers available. In this article, you can review Introduction Spigot and Setup on Ubuntu 21.04 step by step. You may want to use a Linux VPS server. In this case, we suggest you use the plans provided on our website. It should be noted that these plans are delivered in less than 5 minutes.
Spigot is a modified Minecraft server based on CraftBukkit which provides additional performance optimizations, configuration options, and features, while still remaining compatible with all existing plugins and consistent with Vanilla Minecraft game mechanics.
Interestingly, there are more than 150 enhancements in Spigot alone, including BungeeCord support, the configuration of many internal server values such as crop growth rates, hunger, entity tracking, and map seeds; enhanced watchdog and timings profiling to catch plugin issues; further configuration to heavy elements such as entity activation and hoppers; rewritten chunk loading, unloading, and saving; and some useful API additions for developers.
Spigot allows you to customize the server, as Spigot optimizes server resources and is compatible with most CraftBukkit changes. Spigot is a modification of the Minecraft server software, CraftBukkit.
– Processor: Intel Core i3 or equivalent
– RAM: 4GB
– Storage: 10GB of available disk space
First, you need to install the Spigot prerequisites on the Ubuntu.
You need to create a Sudo user. Follow the steps below to create a Sudo user. You can create a Sudo user using the following command:
adduser example_user
By executing the above command, you will see the following output, in which you must set a password for yourself:
Adding user `example_user' ... Adding new group `example_user' (1001) ... Adding new user `example_user' (1001) with group `example_user' ... Creating home directory `/home/example_user' ... Copying files from `/etc/skel' ... New password: Retype new password: passwd: password updated successfully Changing the user information for example_user Enter the new value, or press ENTER for the default Full Name []: Example User Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] y
Now you can easily add a new user to the Sudo group by running the following command:
usermod -aG sudo example_user
You can switch to the new user using the following command:
su - example_user
Finally, you should verify that you are the new user. Then, you can test Sudo access, which should return root:
whoami example_user sudo whoami [sudo] password for example_user: root
Now, you should update your Ubuntu server using the following commands:
sudo apt update
sudo apt upgrade
To Setup Spigot on Ubuntu 21.04, you should install the required utilities. so, enter the following command:
sudo apt-get install wget apt-transport-https gnupg
Import the AdoptOpenJDK GPG key using the command below:
wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
Now run the following command to configure AdoptOpenJDK’s apt repository:
echo "deb https://adoptopenjdk.jfrog.io/adoptopenjdk/deb $(cat /etc/os-release | grep UBUNTU_CODENAME | cut -d = -f 2) main" | sudo tee /etc/apt/sources.list.d/adoptopenjdk.list
Enter the following command to refresh the package index:
sudo apt-get update
Run the following command to install AdoptOpenJDK:
sudo apt-get install adoptopenjdk-11-hotspot -y
In this step, you must setup a swap file according to your needs:
sudo fallocate -l 1G /swapfile
Now it’s time to setup swap file permissions:
sudo chmod 600 /swapfile
You must allocate the swap space by executing the following command:
sudo mkswap /swapfile
In this step, you must turn on the swap:
sudo swapon /swapfile
Swap files permanently by modifying the fstab file:
sudo nano /etc/fstab
Add the following command to the bottom of the file:
/swapfile none swap sw 0 0
It’s time to download and run BuildTools. Note that you are in the home directory of the user used to build Spigot:
cd ~
To build the latest build, first create a folder for Spigot. If the version you want to create is not Spigot 1.16.5, replace it with the following commands:
mkdir buildtools && cd buildtools wget -O BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar java -jar BuildTools.jar --rev 1.16.5
Now you need to write down the file name of the spigot jar:
ls
Enter the following command to create a server directory:
cd ~ && mkdir server && cd server
Enter the following command to move the Spigot jar to your server directory. Now enter the name of your file instead of spigotname.jar:
mv ~/buildtools/spigotname.jar ~/server/spigot.jar
Create a startup script for your server to start the server:
nano start.sh
The 4G parameters in -Xms4G -Xmx4G configure the Java heap space for 4 GB of RAM. Change its value to the amount of Spigot dedicated RAM. You do not have to allocate all available RAM to Spigot. You must paste the following at the start.sh:
#!/bin/sh while true do java -Xms4G -Xmx4G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar spigot.jar nogui echo "restarting in 10" sleep 10 done
Now you should make start.sh executable:
chmod +x start.sh
In this step, you must start your server with the following command:
./start.sh
You must accept EULA, the first time it loads. You must type CTRL+C to exit the script from loop mode.
You can accept EULA with the following command:
nano eula.txt
Now you need to change eula= from false to true and then save and exit the file. Finally, restart your server:
./start.sh
Install the screen with the following command:
sudo apt-get install screen -y
You can open an instance of the screen with the following command:
screen -S "spigot"
Use the following command to start the server script:
cd ~/spigot && ./start.sh
Finally, configure your server settings and install plugins. If your spigot jar does not work, you will need to swap the larger file.
Setting up Spigot on Ubuntu 21.04 involves installing Java, downloading the Spigot server software, building it, configuring necessary settings, and launching the server. Following this guide, you should now have a functional Minecraft server running on your Ubuntu 21.04 machine. Remember to stay updated with the latest Spigot versions.
How useful was this post?
Click on a star to rate it!
Average rating 5 / 5. Vote count: 1
No votes so far! Be the first to rate this post.
The world of Linux is vast and diverse, with numerous distributions catering to different preference...
Asterisk offers voicemail services with listing, voice control, interactive voice answering, and cal...
What is your opinion about this Blog?