How to host a Minecraft Server

This guide will show you how to install Spigot on a VPS (Virtual Private Server) and open it up for other players to connect. This will require $3.50 depending on the options that you choose. If you'd rather make a Minecraft Server for free, check out How to make a Minecraft Server.

How to host a Minecraft Server

Table of Contents

  1. Download Spigot
  2. Preparing to launch Spigot
  3. Launch Spigot
  4. Let other players join your minecraft server
  5. Connect to your VPS
  6. Put Spigot on your VPS
  7. Starting spigot on your VPS
  8. Keeping your server running
  9. Add your minecraft server to our server list!


Requirements
Benefits:
Drawbacks:

Step 1: Download Spigot

To get started, we're going to set up the server on your computer. Once that's up and working, we'll move it to a server so you let other people join your server. We'll be using Spigot, which is an optimized version of CraftBukkit.

Download the latest version of Spigot at GetBukkit.org


In my case I downloaded Spigot 1.13:


Before we move on, create a new folder wherever you want and move your spigot-{version}.jar file into it. You should now have a folder with your spigot-{version}.jar inside of it.



Step 2: Preparing to launch Spigot

We'll be starting the minecraft server on your computer. Note that other people won't be able to connect just yet. For this step, follow the instructions for your operating system.

Windows

Create a new file in the same folder where you placed your spigot jar with the contents below. Make sure to replace spigot-1.13.jar with the name of your spigot jar file. Save this file as run.bat. It may be helpful to also create run.sh now too, as you will need it later on.

Linux

Create a file in your server's directory named run.sh with the following content.

Once you've set up your launch file, you're ready to move on to Step 3.



Step 3: Launch Spigot

Once you launch your server, you'll see an error asking you to agree to the EULA.


To fix this, open the folder where you've placed your files so far and you should see a file called eula.txt. Open this file and agree to the eula by changing the line eula=false to eula=true. This means that you agree to Mojang's EULA agreement.

Once you've fixed eula.txt, you can restart your server using the same steps as above. Congratulations! Your server has been started!



Step 4: Let other players join your minecraft server

Right now, you and the other people on your network are the only ones who can join your minecraft server. You probably want to let other players connect to your server. Next, we'll go through a couple of different ways this can be done, one of which is free and the other which costs a little bit of money.

Option 1: Port-forwarding (free)

This option involves opening up a port on your router. If you choose this option, it will be free and you can skip the rest of the guide, but it has several downsides:


To set up port forwarding on your computer, follow this guide. If you don't like this option, continue on with the rest of the guide.


Option 2: Setting up your server on a VPS

VPS stands for Virtual Private Server. In layman's terms, this is a small virtual computer where you can run your server and anyone can connect to it. With a VPS, you'll have a static IP (meaning it won't change, so once other players have it it will always work), and your server will always remain online, even when your computer isn't on. There are lots of different VPS providers on the internet, and you're free to use whichever one you want to. In this guide, we'll be using OVH because it's cheap and easy to set up.


Head over to OVH.com. Scroll down a bit and you should see a couple of VPS options. Choose the cheapest one (pictured on the right).

Click "Choose" to select this VPS and you'll be directed to a page where you can set up your VPS:


Once you're on the setup page, there's a few things you'll want to change:



Click Continue when you're ready to move on.


From this point on, you'll need to go through the rest of the form and complete your payment. OVH usually takes 1 hour to 24 hours to set up a server. In my experience it has taken a couple of hours.



Step 5: Connect to your VPS

Once OVH has set up your VPS, you should receive an email that will instruct you on how to log in to your VPS:


We're now going to connect to the VPS. Windows users should download Putty, which you'll be using to interact with your server. Go ahead and open up putty once you've downloaded it and you should see something like this:


In the field where it says Host Name (or IP address), enter the IP of your VPS that OVH emailed you. Leave the port set to 22. Click Open to open a connection to your VPS. You might see a Putty Security Alert pop up, but this is expected and you should click Yes to continue connecting.

Once you've connected, you'll be prompted for your login information that OVH emailed to you. Your login will be root and your password will also be in the email. Congratulations! You should now be connected. You can close Putty for now, and next we'll move on to putting Spigot on your VPS.


Step 6: Put Spigot on your VPS

If you didn't create run.sh in Step 2, now is the time to do so. Follow the instructions under Linux in Step 2 to create run.sh. You will need run.sh because we'll need to start the minecraft server on the Linux VPS. Next, to transfer files from your computer to your VPS, we're going to download WinSCP. Download WinSCP.

Go ahead and launch WinSCP. You'll need to agree to the terms. You should choose Typical Installation and Commander when asked. Click Install. Once you've installed and opened WinSCP, you should see a screen asking you to Login. Fill out these fields with the same information that you used for Putty (your VPS login information).


You might receive a warning again. Click Yes. You should now be presented with a split window showing you your computer's files (left side) and your VPS (right side).


On the left side, navigate to the folder where you placed your server. On the right side, create a new folder by right clicking, selecting New, and then Directory. Name it whatever you want.

Now drag all of your server files from your computer on the left over to your VPS on the right, into the folder you just created. Congratulations! Your minecraft server is on your VPS! Only one more step before other players will be able to connect to your minecraft server.



Step 7: Starting spigot on your VPS

The last step is just to use Putty to log in to your VPS and start your server. Open up Putty and use the instructions in Step 5 to connect to your server again. Once there, we'll be using a couple of commands:


cd into your server's folder, and then type sh run.sh. Congratulations! Your server should now start! Open up Minecraft and connect to your server using the IP that OVH emailed you. You should be able to connect, and so should anyone else!

Note: Press Ctrl+C to terminate your server.



Step 8: Keeping your server running

As soon as you close your Putty client, your server will die. To prevent this, we're going to install a program called tmux. On your vps, run these commands:

Once tmux finishes installing, you can type tmux new. This will open a new session of tmux. Go ahead and start your server up again using sh run.sh, and then close Putty. You should still be able to connect!

Note: When you want to terminate your server, you'll need to use Putty to connect to your VPS again, and then type tmux attach. You can then press Ctrl+C to terminate your server.



Step 9 (optional): Add your minecraft server to our server list!

McGuys has a list of servers submitted by server owners. Submitting your minecraft server IP to our server list is a great way to attract new players.

Click here to add your minecraft server to the McGuys server list.










Further reading...