Watch the video:
0:00 - Explanation
0:18 - What Spigot BuildTools are
0:33 - Open PowerShell as Admin
1:23 - One-line jar download/build command
3:16 - Configuring 1.19 Spigot/Bukkit server
4:17 - Running your server
4:37 - Joining your server
5:40 - Port Forwarding & Firewalls
7:30 - Port Forwarding info
8:20 - Saving and exiting Spigot/Bukkit 1.20 server
Why Spigot/Bukkit 1.20 for a server?
Spigot is a powerful modding platform for Minecraft servers. Spigot, Bukkit and CraftBukkit are all created and maintained by the SpigotMC team, and serve their own purposes. Following this guide you can build not only Spigot, but CraftBukkit as well – The official way.
While this method may seem like a long way around as we’re not just downloading a complete .jar file, it’s the ONLY official and officially supported way of doing this. There were legal and other consequences for the SpigotMC team when they distributed the original JAR files - From what I understand. Downloading servers from Minecraft’s website and building your own server jar file from scratch is the only offical way to do this, and that’s what the SpigotMC BuildTools does.
OPTION 1: Autorun SpigotMC BuildTools
This can be a long process, but I’ve gone through the effort of creating a super simple open-source script that does everything the official way for you. It’s even simpler than downloading a JAR file and creating your own start.bat
file.
Open PowerShell as admin, or Terminal as admin and select PowerShell and run: iex (irm spigot.tc.ht)
.
This will automatically download and set up a server .jar (or jars - both Spigot and Bukkit if you choose) and even make sure that Java is installed - and install it if it’s not! This script is powerful.
You should be eventually left with a spigot and optionally bukkit jar file in the folder it opens at the end of the process. Super simple.
OPTION 2: Manual SpigotMC BuildTools
You can download the official SpigotMC BuildTools from the forum page.
You’ll also need to make sure that Java is installed. If not, download and install it.
Now, open a commnand prompt, terminal or powershell window and type: CD <path to the folder with BuildTools in it>
and hit Enter.
Then type either java -jar BuildTools.jar --rev 1.20
or java -jar BuildTools.jar --rev 1.20 --compile craftbukkit
if you want to build CraftBukkit as well.
After hitting enter the same process happens where everything is created for you.
Now to create the start.bat
file my script automatically makes for you. Simply enter the following into it:
|
|
Now we’re at the same place.
Preparing your Spigot/Bukkit 1.20 server
Now you’ll need to navigate to where you installed it. Once there, open the start.bat
file and a few files will be generated.
You will see an error on the first launch, but this is normal!
All you need to do is open the newly generated EULA.txt
in the same folder and change eula=false
to eula=true
.
Now you should also see a plugins
folder where you can place plugins for your server to use.
To give your server more RAM, which is really nessecary for bigger plugins: You’ll need to open start.bat
with a text editor such as Notepad.
Look for the line that contians -Xmx2G
and edit it. This is how much RAM is given to your server.
The 2G
part means 2 Gigabytes of RAM is how much your server can use. You can customize this to be almost whatever you want, provided you have enough available RAM for the server to run. You can give it as much RAM as you have available, but just remember to leave for other programs on your computer - including Minecraft if you’re choosing to play it on the same computer you’re hosting a server on. That’s fine, just make sure there’s enough RAM to go around, otherwise EVERYTHING may crash…
2G
means 2 Gigabytes. You can set this to 6G
for example, as in -Xmx6G
. You can also use M
to show Megabytes instead for more precise measurements. 1G
= 1000M
.
Launch your Spigot/Bukkit 1.20 server
Finally you’re able to play Spigot/Bukkit 1.20 on your new server.
Head to your 1.20 Spigot server folder and open start.bat
. Now your server should start up.
Connect to your Spigot/Bukkit 1.20 server
Finally you can actually connect to your own shiny new sererr!
On the same computer you’re hosting it on, you can connect to 127.0.0.1
, otherwise known as home, or localhost
- This other option may work too!
Remember to type op <your username>
in the server console to give yourself permission to run /gamemode
and other commands as a server admin!
Letting other people connect
The first thing is the firewall. The Windows Firewall, and antivirus software with firewalls or third-party filewalls that listen to the Windows Firewall rules are easy – Others may need a more in-depth Google session to solve.
Usually you’ll open Windows Defender Firewall with Advanced Security
, but no more! Here are some simple commands to save you LOTS of clicks.
Open PowerShell
as admin by searching for it in your start bar, or open the Terminal
as admin, if you have that installed, and then make sure PowerShell
appears as the top - otherwise select it from the dropdown.
Now, run the following commands to allow traffic for port 25565 through to your computer:
|
|
If you ever wish to remove your Firewall rules for this, run the command: Remove-NetFirewallRule -DisplayName "Minecraft Server"
Now, people on your local network can connect (the same router as you)
For people outside of that, things get a little more advanced…
Port Forwarding
This is an often scary sounding topic, but it shouldn’t be.
Simply put: When someone asks for a connection to port 25565 at your internet router’s IP address, they expect to be sent to your computer, but are instead rejected as the router has strong security rules. We need to tell the router that “it’s okay” and “send the traffic to this computer instead”.
That computer may either be your computer, or another router/s between you and the internet access router.
The first step is finding your local IP address. Open Command Prompt
or PowerShell
and run the command ipconfig
. Find the way that you’re connected to the internet through, for example Ethernet or Wi-Fi and look for the IPv4
address. Copy this and keep it in mind. It should be something along the lines of 192.168.x.x
.
Head to your routers config page or admin page that you’re connected to. This needs to be the first router after your computer on the way to the internet. If you’re connected straight to a fiber box or something of the sorts then it’s easier and you only have to do this once.
Log in with your administrator credentials. There are often defaults set, and there are far too many brands to cover… So this is up to you.
Heading to the Port Forwarding section, or Application Forwarding section and creating a new application should let you type in ports as well as where to send them to.
You’ll enter port 25565
as well as your local IP address, and select UDP
to allow traffic to your computer.
Multiple routers lead to confusion as the furthest router needs to point to the next router, all the way to your computer. When I say ‘furthest’ I mean the one connected to the internet, and ‘closer’ as in the ones in-between you and the internet router connected via Wi-Fi or Ethernet cable in order. This can be a lengthy process with an advanced network setup.
This guide has a simplified explanation of how to port forward:
You can start from 3:30 as we’ve already covered the firewall!
Otherwise, if you have a multi-router network, this guide is for you as well:
Saving and exiting
Because your server runs on your own hardware: It’s free - other than what you paid for your computer hardware, electricity and internet. There are no hosting fees or anything of the kind! The server is free to run for you and your friends – as many as you want to join! You could have hundreds connected to your server assuming your internet and computer are powerful enough.
When everyone’s done having fun and you want to save and close your server, run the following in the server’s console:
save-all
stop
The first command saves everything, and the second brings the server to a gentle stop allowing it time to prepare and save things on it’s way to a safe exit.
Abruptly exiting your server could cause corruption, data loss and worse! It’s always a good idea to run stop
, even if you Spigott to run save-all
.
It may not be nessecary to run the save command, but I like to make absolutely sure that our progress is saved before stopping and exiting a server.
Have fun
That’s it for setting up your server. Feel free to fill your plugins
folder with anything, and set it up the way your heart desires.
Everything from here out is on you and whoever you want playing on the server.