Before setting up your own Minecraft server, ensure that your computer meets the minimum requirements for memory, processor speed and internet upload rate. In case your system gets a tick at each of these check-points, you can dive into setting up your computer as a Minecraft server. On the other hand, if your desktop does not meet the requirements, you can always approach a provider who rents out and manages servers for you.
You can get the Minecraft Server installable directly from the official Minecraft webpage or you can as well opt for custom servers. While the official Minecraft server installable is developed and supported by Mojang AB, the custom servers are developed by third parties. These custom servers offer new/additional features, when compared to what the original server offers. Another difference between these servers is that, the original one is coded in Java, while the other custom ones employ various other languages like C++, C#, Python, Perl and more.
In case you’re wondering whether your computer is powerful enough to run the Minecraft server, then this article on minimum system requirements can help you.
This article focuses on the original Minecraft server from Mojang. There are essentially 3 steps to setting up a Minecraft server:-
1) Install Java or upgrade to the right version.
2) Download and install the latest Minecraft server.
3) Configure it to suit your needs.
You might have to forward your port, in case you’re using a router.
You might also want to set up a private network (set up VPN) for your Minecraft server. These are explained later in the article.
The Minecraft server can be downloaded from the official minecraft download page. For Windows users, a Minecraft_Server.exe is available. For all platforms (including Windows), minecraft_server.jar is available.
A list of custom servers and their details are mentioned in the Minecraftwiki custom server list
Let’s take a look at Windows, LINUX and Mac OS X, separately.
As mentioned above, this server code has been written in Java. Your system should be running Java 1.6 or above. [Java 1.6 is the minimum version required at the time of writing this article].
If Java is not present on your system, then you will get a message like this:-
‘java’ is not recognized as an internal or external command, operable program or batch file.
If this is the case or if the version_number is below 1.6, then you can get the necessary download from here – Java website
1) Right click on Computer.
2) Select Properties.
3) Open Advanced system settings
4) Under the Advanced tab, click on Environment Variables.
5) Under System variables, find and edit Path.
6) Add the system location of java after a semi-colon (;) to the end of this list. This location is usually – “C:\Program Files\Java\jre6\bin”.
7) Click OK.
If you do not want to meddle with the system path, then, when creating the .bat file, add the following in the beginning:-
path= C:\Program Files\Java\jre6\bin
So the batch file should finally contain this:-
path= C:\Program Files\Java\jre6\bin
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
Just for Info:- The command line instruction – “java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui”, tells the computer to run java.exe, creating the (JVM) Java virtual machine, allotting 1GB of RAM, and also starting the minecraft_server.jar file on this Java platform, without a graphical user interface. The computer will initially look in the same folder as the batch file, to find the specified files (java.exe and minecraft_server.jar). It then looks into the paths mentioned in the system path. Since we add the path of Java to the system path, the computer will know where to find the java.exe. And since minecraft_server.jar is present in the same folder as the batch file, it can be found too. As such, the command line instruction can as well be framed as follows:-
“C:\Program Files\Java\jre6\bin\java.exe” -Xmx1024M -Xms1024M -jar “D:\Minecraft\minecraft_server.jar” nogui
Assuming the minecraft_server.jar is located at “D:\Minecraft”.
For setting up Minecraft servers on LINUX machines, you can either have a dedicated server, or a VPS (virtual private server). There are several providers who offer both types of servers for reasonable fees. You can sign up with a provider and you’ll be given the access details [IP address and password], to your server.
In-order to access your server, you’ll need an SSH client. PuTTY is the most commonly used Telnet SSH client. This is readily available for download from the internet. The default username is usually ‘root’. Enter the IP address, the username and the password to login. You should then see something like this:-
If Java is installed in the system, it will give the path.
In-order to check the version type ‘java -version’
In case you do not already have java, you’ll need to install it. And if the version is lower than 1.6, you’ll need to upgrade it. Check how to install Java on LINUX.
The official Sun Java is recommended over OpenJDK, as there have been several problems reported when using the latter.
A new user, a new group and home directory are created automatically. You should be able to see these details on the screen. You will then be prompted to enter a new UNIX password, and then to re-type it. A few other details, like full name, room number, phone and more will be asked. You can either enter in the details or simply press Enter to assign the default values.
Login to the new username as follows:-
su -l minecraft
Using wget you can get the Minecraft server jar file.
Once this is done, run it as follows:-
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
We first need to create the shell script with a text editor. We’ll use nano here for this purpose. Install the nano package if you don’t already have it:-
apt-get install nano
Ensure that you’re in the same directory as the minecraft_server.jar. Create a shell script using the nano command:-
Type the following as it is, in the file :-
java -Xmx1024m -Xms1024m -jar minecraft_server.jar nogui
Change only the Xmx and Xms values if required.
Save the file by pressing Ctrl+O. Exit the file by pressing Ctrl+X.
Set the permissions to make this file executable. The line below gives only you (only the user who created the file) the permission to execute it:-
chmod u+x start_minecraft_server.sh
To run the file, type the following (dot forward-slash filename without any space between them):-
This will start the minecraft server.
Note 1:- When running minecraft server on Linux, you can always use an FTP client such as FileZilla, to make transporting and editing files easy on the Linux machine. FileZilla usage has been explained in the article – How to install Minecraft server on Ubuntu (find the link below).
Note 2:- The nano command mentioned above can be used for editing files as well. To do this type
This will be useful for editing and making changes to the configuration files (mentioned in the Configuring section below) of minecraft server. Again, an easier way of editing these files could be by using an FTP client.
Apple offers Mac OS X with its own Java version already installed. Even updates happen automatically, as and when newer versions are available.
Download the minecraft_server.jar file from http://www.minecraft.net/download.jsp
Create a folder, on your desktop for convenience. You can name it whatever you want. However, for convenience again, we’ll call it Minecraft. Drag and drop the minecraft_server.jar file into this folder. Open TextEdit. Set the format to plain text, by clicking on the Format menu and selecting ‘Make Plain Text’.
Copy and paste the following text in this file:-
cd “$(dirname “$0″)”
exec java -Xmx1G -Xms1G -jar minecraft_server.jar
Here, we are allocating 1GB of RAM to the server. You can even give a larger value if your RAM is more capacious. Save this file as start_minecraft.command in the same folder (Minecraft).
Next, open Terminal. Type in the following to set the run permission for the script:-
chmod a+x path_of_command_file
Instead of typing in the path manually, just drag and drop the start_minecraft.command file on to the Terminal after typing chmod a+x and press Enter.
Once, this is done, double click the start_minecraft.command file, to get the server running.
When the minecraft server is run for the very first time, it creates certain files (like server.properties, ops.txt etc.) and the World folder. You will first have to configure your server. Therefore, after starting the minecraft server for the first time, once it has completed all required processes (you’ll get a message saying “Done” with some additional text), stop it, by typing stop at the command terminal of minecraft server.
Here are a list of files that are generated when you run Minecraft server for the first time. You might want to customize them.
You can configure the Minecraft server by editing the server.properties file. This file contains the settings for a multi-player server. However, you must be extremely careful when making changes to this file. Ensure that all the keys (words before the ‘=’ sign) are untouched. Change only the values after the ‘=’ sign. The ‘#’ sign indicates a comment, and has no effect even if altered. Edit this file using Notepad, or Textpad or any other text editor. For more details check the post on server.properties minecraft server file.
You can enter names of players who you wish to give admin rights to. You might want to add your name as well. These players can perform admin actions from the game console itself, using server commands, prefixed with /.
You can enter names of players you wish to ban from your server.
You can enter IP addresses that you want to ban from connecting to your server.
You can enter names of players who will be allowed to connect to your server. Set the white-list= key in server.properties file to true to allow your server to check the players connecting to your server, against the ones mentioned in white-list.txt.
Here is a list of all the Minecraft server files and folders, with descriptions.
Note:- If any changes are made to any of the files, you need to restart the server for the changes to take effect.
In case you are using a router then you will have to do something called port forwarding for the minecraft server. Else, other people will not be able to connect to your server. For different routers, there are different ways of port forwarding. Visit portforward.com and scroll to the bottom, to get a list of routers. Select your router, (you can skip the ad that might come up) and then select Minecraft server from the list of games given. You will be guided step-by-step in the port forwarding process. Once this is done, your server users will be able to connect to your server.
In case you wish to set up a VPN (virtual private network) for minecraft, you can refer to the post – How to set up VPN for Minecraft.
Anyone who wants to play Minecraft must first purchase the game from minecraft.net, and must also register with the website. If you want to play on the same computer on which you’re hosting the server, then start the minecraft client, choose Multiplayer mode and enter ‘localhost’ (without the quotes). People who wish to connect to your server must also choose Multiplayer mode. Friends on your same network (LAN) will have to enter your internal IP address and port number. Friends outside your network will have to enter the external IP address of your router and port number. You should also have forwarded the port in case you have a router. The server’s IP address and port number must be separated by a colon. For example:- a.b.c.d:25565. Click on Connect, to start the game.
For those connecting from a browser, here’s the URL to use:-
Replace your_ip_address with your IP address and port_number with the port you’re using.
To know more about finding the IP Address of your server check the article on How to find IP address of Minecraft Server.
If you’re having trouble with your Minecraft server, here are a few things you could try:- Does your server not work?