Tutorials/Setting up a server

= Windows =

Verifying and Installing the Latest Java

 * 1. Make sure that you have Java 6 installed. To do so first we need to open up CMD.
 * In Vista/7 open the start menu and enter cmd in the search field, and press enter.
 * In XP open the start menu and click Run, then enter cmd and press enter. You can also hold the Windows key down and press R to open Run.
 * At the command prompt, enter the following command, and press enter:
 * Java then should display it's version, and should read "java version 1.6"
 * 2. If you have a previous version (less than 1.6) or you get this error: " ", then you need to install/update the computers java version. You can do so at the java download page
 * 3. After you installed the latest java try again with.
 * If you get an error at this point, try the following to add java to your system path.
 * Right click Computer
 * Click properties
 * Click "Advanced system settings"
 * Click "Environment Variables"
 * Under system variables, find the Path variable
 * Click edit, and append to the end of the value: ";C:\Program Files (x86)\Java\jre6\bin"
 * Now re-open the command prompt and try again.

Download the Minecraft Server

 * 1. Download minecraft_server.jar from the Minecraft multiplayer page or  download custom server software elsewhere.
 * 2. Create a new folder called "Minecraft Server", and extract the files from the zip file you downloaded.
 * Some folders may require admin rights to write files to, and thus require admin rights to run.

Start the Minecraft Server

 * 1) Create a new file named "start server.bat"
 * 2) Open with notepad and add: java -Xmx1024M  -Xms1024M -jar minecraft_server.jar
 * 3) Start the Minecraft server by running "start server.bat", and it should start.
 * 4) The server will generate files on it's first run. Now shut down the server by closing the windows in order to edit these files.

Configure the Minecraft Server

 * 1. Configure the server by editing the server.properties.
 * 2. Add your username to the admin.txt and op.txt. Admin.txt allows you to execute server commands, and op privileges allows you to destroy/place blocks.
 * 3. If your computer is connected to a router, open and forward the port that is set for use with the server (The default is 25565). For help with port forwarding, portforward.com is a good source, alternatively one can read the documentation supplied with the router, modem, or other ISP related hardware.
 * 4. Verify the port is open and note your external IP by using a open port check tool.

Connect to the Minecraft Server
To test your server (even if the ports aren't open), select the "Multiplayer" option in the game client (or browser client), and type in the local address (e.g. 127.0.0.1) include the port number only if you aren't using the default (25565) (e.g. 127.0.0.1:1234).

To allow yourself and other players to destroy and build blocks, add their user names to the ops test document.

For people connecting from the internet, they must connect using your external IP. This can be found using the open port check tool mentioned earlier. The port must show as open for these users to connect.

For more information about how to run and maintain a server check Maintaining a server.

If all else fails, the official Minecraft forums have users with information and tutorials for hosting servers.

= Linux = This tutorial for how to set up a Minecraft server on Linux was designed for people who don't have a lot of experience with Linux. There is a more advanced tutorial in the forums. This tutorial was tested on Ubuntu 9.10 32-bit but should work with the descendants of Debian.

Verifying Java version
This step is pretty much the same as in Windows. Open the terminal from Applications > Accessories > Terminal. Enter. It should look something similar to this screenshot from Windows:

Make sure that you got version 1.6 (marked with a red box in the image)

Installing Java
If you get  (which may be followed by more text) or if you do have another java version than 1.6 then you need to install java. Simply type this in terminal and press enter:

(Note: In Fedora and Red Hat you use )

If it asks for a password enter your password. If you get asked "Is this OK [y/n]" Enter Y and press enter if required.

Java is now installed

Setting up the Minecraft Server
Download the latest Minecraft server here.

Create a new folder in your home folder (Places > Home) called "minecraft_server" or something similar. Extract the contents of the .zip file to this folder.

To change the server settings edit the Server.properties file.

Start the Minecraft server
Open the terminal again (Applications > Accessories > Terminal). Enter the following commands: (change minecraft_server to the same name of the folder you extracted the server to)

= Mac OS X = Setting a server up in Mac OS X is more difficult than in Windows, but is still relatively easy.

Installing Java
Mac OS X comes with it's own version of Java that is updated via Software Update (Apple menu > Software Update) This is all that is needed to be done to get the lastest version of Java.

Setting up the Minecraft Server
Download the latest version of minecraft_server.jar from here

Create a folder for the mincraft_server.jar to go into and name is appropriately also put this new folder somewhere where it will not be accidentally deleted such as the desktop. Then double click minecraft_server.jar.

Files should be created in the folder.

When the GUI for the server is open. You may get a warning about low RAM. To fix this: First close the server GUI then open Terminal. cd into your folder. For the folder used above then type

This will give the server software 1GB of RAM.

To change the server settings edit the Server.properties file.

= Reporting problems in the forum = Before you can ask for help in the forums make sure that your problems is not listed in the Common Problems

If your problem is not listed you can create a new thread asking for help in the Server Administration Make sure to include as much information as possible:
 * Operating system
 * What you were trying to do
 * What you did so far
 * Any errors you encountered
 * Screenshots of the problem (if possible)

= Other tutorials = Here are some other tutorials on how to set up a Minecraft server. Linux tutorial for more advanced users Windows tutorial with focus on how to forward a port Guide to setting up an alpha server using Virtualbox.