Windows instructions
Verify that Java is installed
To start, you must verify that Java is installed on the system that you choose to run the server from, if you're able to run the game, then you probably already have it installed and can skip these steps.
To do so, follow the following steps:
- Hold your Windows key, then press 'R'; and in the prompt, type "cmd" and press OK.
- In Command Prompt, execute the command:
java -version - If the first line that it returned did not say
java version "???", then you do not have a valid install of Java on your system; and should install the appropriate version from here.
Start the Minecraft server
If you have not already done so, create a dedicated folder somewhere on your computer where you can run the server.
This means that you cannot run the server directly from a place like your Desktop.
Afterwards, you can drag the server file you downloaded to the new folder, and simply double click on it.
And that's it; you have successfully got yourself a working Minecraft server.
Now, to let others join it, you must use a method called #Port forwarding, assuming you have a router (You probably do!); otherwise see #Connecting to your server.
Advanced starting your server
Optionally, you can open the server Command Line; if you really know what you are doing or just want to launch the server with certain parameters.
After you have done that, Shift-Right click on an empty space of the folder, and you should get the option to "Open Command Window Here".
Press it, and in the Command Prompt window, use the following commands:
Using the .EXE version: echo java -jar minecraft_server.exe > run.bat && echo PAUSE >> run.bat
Using the .JAR version: echo java -jar minecraft_server.jar > run.bat && echo PAUSE >> run.bat
Once you have done that, a new file should appear in your folder, called "run.bat", just double click it.
Then the server should boot up just how it normally would.
Adding more RAM
If you have't read the above, please see it.
Simply right click "run.bat", and press Edit.
Once you have that, find the amount of RAM that you want to allocate to the server.
Here's a conversion table you can use for adding more RAM; please keep in mind that if you are on a 32-bit OS or Java installation, you will be unable to allocate more than 1500MB RAM.
| RAM | JVM Argument |
|---|---|
| 1 Gigabyte | -XMX1G |
| 1.5 Gigabyte | -XMX1500MB |
| 2 Gigabyte | -XMX2G |
| 3 Gigabyte | -XMX3G |
| 4 Gigabyte | -XMX4G |
You should never need to allocate more than 4GB to the server.
Once you have the JVM Argument, go back to the notepad file, and at the end of the first line, that should start with "java -jar", replace it with
Once you have the JVM Argument, add it to the line, so replace java -jar
Increasing the amount of RAM allocated to the Minecraft server
If you would like to start your server with more RAM, you will need to create a Windows batch file and run your server that way. Don't worry, it's easier than it sounds.
- Open up Notepad (not Wordpad) to create a text document with no formatting (italics, boldface, etc.).
- Identify your Windows OS type (32-bit or 64-bit), which may be done through the Control Panel. Also, identify which version of Java you are running—32 bit or 64 bit.
- Based on your OS and Java types...
- If Windows is 32-bit or Windows is 64-bit with 64-bit Java, copy this into your document:
javaw -Xms1024m -Xmx1024m -jar "Minecraft_Server.exe"
- If you are, for some reason, running 32-bit Java on a 64-bit system, upgrade Java. Also, if you have installed Java to a different directory or changed the name of your Minecraft server .exe file, see below.
- If you do have 32-bit Java on a 64-bit system, Java.com recognizes Java by browser, and some browsers are 32-bit, so downloading both 32-bit Java and 64-bit Java may be needed to run everything correctly
- So what does all of this mean? The executable command (
"C:\Program Files\Java\jre7\bin\javaw.exe") is the file path to the location of your most current javaw.exe file. javaw.exe is identical to java.exe but there is no associated console window, Since we are starting our own from our .bat. If you installed Java to a different location, you will have to locate it and paste that file path in instead. The next part (-Xms1024m -Xmx1024m) is your RAM allocation, in megabytes (MB). By default, your server runs with about 100 MB of RAM, which is very little. Most people will change their server to run on 1 GB (1024 MB) of RAM; 2 GB of RAM is also common. As for the-jar, this indicates that Minecraft_Server.exe is a Java archive. - Lastly in the executable command is the name of our .exe file (
Minecraft_Server.exe). Typically, it is named Minecraft_Server.exe. Upper and lower case does matter. RenameMinecraft_Server.exeto whatever you named your file. Then clickFile->Save As...and for the file name call itrun.bat, and make sure you select*.* All File Typesfrom the drop-down arrow (Note: If you do not see*.* All File Typesas a file type, you must putrun.batin quotes."run.bat"). Then save it in the same location your server is saved, and double click yourrun.batfile. If all goes well, you will notice that you will have much more RAM available on your server!
- If Windows is 32-bit or Windows is 64-bit with 64-bit Java, copy this into your document:
If Windows does not recognize the filetype (You are being prompted to select a program to open it with), it may be because Minecraft_Server is missing the .exe extension. This can be fixed by renaming the Minecraft_Server file to Minecraft_Server.exe. If it worked, the icon should now be the Minecraft symbol.
If this does not work, you will have to go into a command window by opening Run, typing cmd and pressing enter. Once there you need to navigate to the folder you have created.
To do this:
- Ensure you are in the proper drive (usually C drive). Type
C:and then hit enter to access the c drive - Now you need to call the directory (open the folder). Type
cd \"folder name"then hit enter. Make sure to include the quotation - Ensure you are in the proper directory. Type
dirand command will generate a list of contents of the folder, you should see minecraft_server there. - Rename Minecraft. Type
rename minecraft_server minecraft_server.exethen hit enter. This should add the .exe extension to the executable and it should now operate correctly.