Is this guide for you?

keyboard_arrow_down
keyboard_arrow_up

If you want a server that is...

  • Owned & Controlled by YOU
  • Easy to run
  • Free (or very cheap!)

If you are familiar with...

  • Navigating between folders
  • Basic command-line usage
  • Basic Networking (What is an IP Address?)

If you have a computer with enough spare resources for your players...

Players
RAM
Storage
1-5 3 GB 10-20GB
5-10 6 GB 20-30GB
10+ 8 GB 30+GB

Then this guide IS for you!

Server mods, plugins, and advanced server administration is out of the scope of this guide. This tutorial assumes knowledge of the topics listed above, and basic minecraft server commands.

Install Java

keyboard_arrow_down
keyboard_arrow_up
info

Do I need to do this?

If you have previously installed Java, that will work for the server.

If you are unsure if Java is installed:
  • Open the run dialog (+R)
  • Type in C:\Program Files\Java and hit Enter
  • If a folder opened, Java is installed (but may not be on your system path!)

If Java is already installed, ensure it is on the system path.
  • Open the run dialog (+R)
  • Type in java and hit Enter
  • If you don't get an error, and can skip this section.

Installing Java

If you are using a Ubuntu/Debian-based Server (If you are using linux, but aren't sure, you probably are), you can use this simple command to install a version of Java suitable for the server.
sudo apt-get install openjdk-8-jre-headless

Putting Java on the Path

  • Get Java's installation folder
    1. Navigate to C:\Program Files\Java.
    2. Select a folder
      • Prefer folders starting with jdk over jre
      • Prefer folders with a higher version number
    3. Enter that folder, and hold shift while right-clicking the bin folder.
    4. Select Copy as path
  • Add the folder to the system or user path
    1. Press the windows key () and type path
    2. Select either Edit the system environment variables or Edit environment variables for your account
      • If you chose the system-wide option, you may have to click Environment Variables... in the window that pops up
    3. Double click on the Path entry to edit it
    4. Click New and paste the previously-copied Java bin folder location into the new row
    5. Hit Ok until the opened windows are closed
Double-check that the installation was successful by running java in your terminal. If you get a command not found error, you may have to repeat the code block above.
For Linux systems, installation should have already put Java on your path.

Download & Install the Minecraft Server

keyboard_arrow_down
keyboard_arrow_up
  1. Create a new folder on your computer to put the server files
    The server will put all of its own files here, so do not use a preexisting folder!
  2. Download the latest Minecraft server .jar file from minecraft.net to that new folder, and rename the downloaded file to minecraft_server.jar
    Your browser may download the file to your Downloads/ folder.
    If so, move the file to your new folder, and rename it.
    If the filename did not originally show .jar when you go to rename it, do not add it (eg: rename to minecraft_server instead of minecraft_server.jar).
  3. Open a terminal inside that new folder, to run your Minecraft server in.
  4. To open a terminal inside a folder, shift-right click on an empty part in the folder, and choose 'Open Powershell Window Here' or 'Open Command Window Here'
  5. In your terminal, run the following command:
    java -Xms1024M -Xmx<amount>M -jar minecraft_server.jar -nogui

    Change <amount> to be 1024 times the suggested RAM amount. (ex: 2 GB * 1024 = 2048 -> -Xmx2048M)

    If the server immediately crashes with the word 'heap', possible culprits include these options or your Java installation.

  6. The server will immediately exit, because you need to agree to the server EULA.
  7. Open the new eula.txt file, read the EULA, and replace eula=false with eula=true
    The eula.txt is in the same folder as your minecraft.jar
  8. Run the same command you used earlier again (you can press keyboard_arrow_up to bring it back)
  9. A window may pop up to allow your Minecraft server through the firewall. You should allow it through.

You now have a fully functioning Minecraft server!

If you would like to test your server at this stage, you can go open Minecraft on the same computer, and use localhost as the server address.

To stop your server, you can type the command stop at the server console, or press ctrl+c.

Configure Your Server

keyboard_arrow_down
keyboard_arrow_up

Common server.properties options

Most options you will want to change for a regular server, will be located inside the server.properties file.

This file can be found in the same folder as minecraft_server.jar and eula.txt

Below are common options, and their function. An exhaustive list is at the Minecraft Wiki.

gamemode

Determines the default gamemode players are spawned in with.

Ex: survival, creative, adventure

server-port

Determines the network port that the server listens to.

25565 by default. Should be left unless there are multiple servers on the same machine.

motd

The message shown in the player's server list.

Can be edited as is. For colors or text effects, use an online editor.

white-list

Typically for private servers. Enable this to only allow players in whitelist.json file to join.

difficulty

Use this option to change the game difficulty. Note that hardcore mode is a different property.

Ex: peaceful, easy, normal, or hard.

max-players

Used to set the maximum amount of players allowed on the server at once.

20 by default. Can be raised or lowered depending on your requirements.

pvp

Enables/Disables players being able to attack each other. Disabling this reduces conflict in survival mode.

spawn-protection

Allocates a square radius of blocks around spawn that can only be edited by moderators.

If this is zero, then only one block at spawn is protected. Remove all server OPs to disable protections.

How do people connect?

You should be able to connect to your server via an IP address.

For players outside of your home or local network, you can search what's my ip on Google and get your public IP address.

For players inside your home or local network, you can use a similar console to the one you opened for the server and run ipconfig to get your private IP address.

  • One of the lines saying IPv4 Address (there may be multiple!) is the address others should use.
  • For most homes, this will usually start with 192.168., 172.16., or 10.0..