Minecraft Blogs / Tutorial

How to setup a Spigot Minecraft Server!

  • 16,335 views, 3 today
  • 5
  • 5
skewtorprint's Avatar skewtorprint
Level 28 : Expert Miner
1
How to setup a Spigot Minecraft Server!
In this tutorial, I will go through the basics of setting up a Spigot Minecraft Server.

***NOTE: I am not covering port forwarding, as it depends heavily on the router that each user has.


Port forwarding is REQUIRED to host a public server.

You can find out more port forwarding information on port forwarding with your specific router here.

Minecraft uses TCP/UDP port 25565 by default.


Step 1 - Installing Java:


Minecraft is built on Java, as are it's servers. If you don't have Java there's no way you'll be able to host a server (or play the game at all)!
Make sure you have an up to date version of Java installed. If not, you can download it here.

If you can get 64 bit java, I highly recommend it.

Step 2 - Installing Git:


Git is the essential medium for properly installing the spigot/craftbukkit client onto your computer.
You can download Git here.
Follow the install prompt. Just install the program, we don't need it until a little later.

Step 3 - Download BuildTools.jar:





Spigot/Craftbukkit is installed using build tools. This is a jar file that can be run to download all the components of a Spigot Server.

How to setup a Spigot Minecraft Server!

You can find the latest version of BuildTools by clicking on the "Downloads" button on spigotmc.org.



After clicking downloads, you will be taken to the jenkins file manager.


How to setup a Spigot Minecraft Server!



Select the most recent build, and you will be redirected to the page detailing the most recent build.

Once you are redirected, simply click the BuildTools.jar file to download





Step 4 - Creating a server folder


Once you have installed Git, Java, and have downloaded BuildTools.jar, the next step is to create a folder to contain all your server files.




This folder will contain all of your plugins, configuration files, and anything else needed to run your Minecraft server.

I recommend you put this folder on a solid state drive, or a raid array for better speed.

I have my folder on a separate hard drive that I use only for the minecraft server.

Once you have created your server folder, you need to navigate to where
you saved buildtools.jar, and move it into your server folder.


Step 5 - Running BuildTools.jar using Git:



In order to run BuildTools.jar, we need to use Git.

To start, navigate to your server folder where your BuildTools.jar is located.

On Windows 10, right click in the free space of the folder, and click "Git BASH here"




Once Git loads, you want to type

java -jar buildtools.jarand press enter.


Git will begin to automatically populate the folder with all the necessary server files. This could take some time depending on your internet/computer speed. (Took roughly 5 minutes for me, your mileage may vary)

If your BuildTools runs successfully, you will see something close to:




Step 6 - Setting up a launch file:



At this point, we're almost done setting up our server!

Not too hard eh?



The next hoop to jump through is setting up a .bat file for ease of launching.

This allows simply double clicking an icon to launch the server with some specific settings.



Navigate to the file folder that our minecraft server's files are in.

Create a new text file inside the directory, and name it whatever you like.

Inside the text file, we're going to set our launch parameters.

In my launch file, I have the following code:
@ECHO OFF
Java -Xms512M -Xmx4g -d64 -jar spigot-1.13.2.jar nogui
pause
If you are using 64 Bit java, and have more than 8 GB of ram, you can just copy this code. (replace "spigot-1.13.2.jar' with the name of your server jar)

What this file specifies, is that I would like to use 512 megabytes of ram on server startup, with a Max RAM allotment of 4 gigabytes during the operation of the server. You can change these values to your liking, but I see no reason to use more than 512M of ram during launch. Note, if you do not have 64 Bit Java, you will not be able to allot more than ~1500M (1.5 GB) of ram to either value.



-Xms512M is the on startup Ram value
-Xmx4g represents peak ram allotment (The maximum allotted ram for the server to use)
-d64 tells java to use the 64 bit version
spigot-1.13.2.jar is the server file java will run. (Replace this with the file name of your server jar.)

nogui tells java to not open the GUI server console (This reduces CPU load. You will still have a text based console)



A good rule of thumb is to use less than 40% of your total system ram if you plan on using the computer for things other than your server. If your server is a dedicated machine, only being used for your server, allot as much as you can without causing the system to crash.



Once you have adjusted the settings to your liking, save the file inside the server directory as a .bat (or .batch) file. The name of the file doesn't matter.


Step 7 - First Launch:


After you've made your launch file, double click it and let it go through its setup process. This should only take a few seconds.

The server will launch, and then shutdown. This is normal.




Next, you want to look for a file called "eula.txt"

Open the file and replace "false" with "true". Save the file and close it.










Step 8 - Finishing up:



At this point, you should relaunch your server, and it will automatically generate server configuration files.





Give yourself a pat on the back!

You're now the proud owner of your own spigot Minecraft server!

Remember, closing the console window will close the server. so keep it open. (Minimized is fine, just avoid the big red button)

Anyone should be able to connect to your server by using your public IP. (Don't know what your public IP is? Go here.)


Should I write tutorials for configuring common spigot plugins?

Let me know!
Thanks for reading!

If you have any questions, I will try my best to help with them!
Tags

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome