How to setup a Minecraft server on Windows

How to setup a Minecraft server on Windows

The sandbox game Minecraft is quite a popular game and there are many servers that you can join and play on, but what if you and your friends just wanna play together and build something amazing? Then one of these big servers might not be the place for you and your friends, luckily it’s really easy to setup your own server at home using something called Bukkit – this is a snippet from their website.

Bukkit is an up-and-coming Minecraft Server mod that will completely change how running and modifying a Minecraft server is done – making managing and creating servers easier and providing more flexibility.

Bukkit is easy to get started with, and has amazingly 13,249 plugins as of  2015-03-01, you can even easily make your own plugins if you have some basic Java knowledge, but that’s out of this tutorials scope and we’re going to focus on setting up the server. In this article I will walk you through all the steps to setup a Minecraft server on Windows, all the way from getting the files needed to logging in to the server.

What you’ll need to get started

Minecraft is as you might know written in Java and you’ll need it to play Minecraft and also to run the server.  You’ll also need to setup a path to your Java if you’ve not done it, don’t worry it’s easy and you can read my tutorial on how to set system path variables. You’ll also need Git for windows, this is only needed to build the necessary files you’ll need. To sum up you’ll need to complete these following things before we can really get started.

Download Java

Go to Java’s official homepage and download and install it by following the easy instructions.

Setup System Path variables

This step is not required, but it will make it a lot easier to get started, just follow my tutorial on how to setup System Path Variables in Windows, it only takes about a minute to complete.

Install Git for Windows

You will need to have git on Windows for using the Bukkits build tool, you do not need after you’ve initialized the tool for building the structure, I will explain further down this article – and everything will make sense. Download Git for Windows here, and just follow the instructions.

Download Bukkit/SpigotMC build tool

In the autumn of 2014 there was a lot of confusion going around because of rights disputes and currently you will have to download Bukkit via SpigotMC which is the same as Bukkit with some custom hooks for developers, but don’t worry! Plugins will work on both Bukkit and SpigotMC – and you actually get both craftbukkit and spigotmc when you download the build tools I mentioned above. This tool will when run download the the latest files and build the structure you need using git, and that is why you need to have Git for Windows installed. Everything I’m talking about now you can read more about on Spigot’s Wiki about Build Tools here.

Now begin by downloading the build tool and place it in a folder where you wish to download and build – you will need to move the craftbukkit file into your desired Minecraft server folder later on, right click in the folder and select Git Bash as the image below shows.

open_git_bash_to_begin_the_installation

This will open the Git Bash command prompt with the location of the build tool, so it’s as easy as it can be. Well then, now it’s time to start building with this tool and you start by entering this in the command prompt, java -jar BuildTools.jar just as the image below shows.

time_to_build_the_structure_with_this_commandThis will start the process of downloading the files that you need, at this point I would suggest you to go grab a cup of coffee or tea since this will take about 15 minutes of downloading, unpacking and setting up everything it needs – just enjoy the magic!  When everything is done you can see all the magic that the build tool has setup for you.

Setting up our Bukkit or SpigotMC server

To start of with a clean folder structure for our server, you will need to choose if you want Bukkit or SpigotMC as your server – if you’re unsure just pick the Bukkit jar-file. Copy the jar file and the eula.txt file into the new folder you’ve chosen to be the Minecraft server location.

clean_server_folder

Now is a good time to make a batch file that will run the Java command to start your server. Before we can actually setup the basic server settings we need to run our RUNME.bat we created, and Bukkit will install the rest of the files needed for our server. The code snippet below is what you need to save into your RUNME.bat using notepad.

java -Xmx2G -jar craftbukkit-1.8.jar -o true
PAUSE

But right before we can actually run this batch file, we need to read the EULA (End User License Agreement) before accepting it, when you’ve read the EULA and you agree to it’s terms you just open up the EULA.txt in our server folder and change the boolean value from false to true. Now when you’ve saved the file you can run our RUNME.bat and as you can see a lot new files have been put into your folder (Sidenote: When I did this during the tutorial, I got a stacktrace error – but everything still works, if you also get an stacktrace, ignore it and it will disapear the next time you start). When it’s finished just enter stop into the console to give it a graceful shutdown.

clean_server_folder_first_bukkit_run

We’re actually already done and your friends can join as long as the server is up, but I always do a few settings before I give my IP to my friends. These are not required but it’s always good to look through a settings file before you open it up to others so that you don’t need to restart because you in hindsight remembered that you should have done.

level-seed=<some cool seed>
difficulty=3
enable-command-block=true
max-players=10
motd=JejjE's network

Usually I find a cool seed unless I actually like the random generated one, a quick Google search will help you find some cool ones. I personally also find that Easy in Minecraft is too easy and I always change it to Hard by setting difficulty=3 but you can always change this later if you find it too hard or easy. Lastly I set the MOTD to the name of my server so that my friends can easily see that it’s the right server.

Time to play some Minecraft

Now when everything in the server.properties file it’s time to login to it and test so that everything works. If you like the vanilla Minecraft as it is, nothing more is needed at this point. But I would recommend you to read my article about the plugins every server needs and see if any of them seems like something you want on your server. If your friends is not in your local lan, don’t forget to open up the port 25565 and forward it to your computer. In the image below you can see that everything seems to work, and I even found a pretty nice spot to start out with, wood, sand and a cow – a cow that will become food pretty soon.

2015-03-02_18.31.45

Jimmy Nelsing's Picture

About Jimmy Nelsing

I'm a computer enthusiast who loves the web and web development, I've used Wordpress for a long time on and off for different web pages for many years. I also like to develop in PHP, especially with Laravel and have also started with Java programming as side projects - testing out Bukkit and Android.

https://jejje.net/

Comments