I guess nobody needs an introduction to Minecraft.
Running a vanilla Minecraft server is surprisingly easy. Pretty much everything you need is a relatively modern Java Runtime Environment.
- Install Java, so you can run the
java -hcommand on your command line.
- Go to Minecraft's official server download website
- Create the directory where you want your Minecraft server to live in.
This will be referred to as
- Copy the
Start the Server
Before you can actually use or configure the server, you need to start it once.
This initializes some crucial files, such as the
eula.txt and the server configuration file
To start the server, go into
$GAME_DIR and run this command:
java -Xmx1024M -Xms1024M -jar server.jar nogui
Explanation of parameters:
-XmxThis is the maximum amount of RAM your Minecraft server is allowed to use. For a normal vanilla world 1GB (1024M) should be enough. If you're running into problems, try increasing it, but there's no need to always increase this value.
-XmsThis is the amount of allocated RAM the Server starts with and the minimum of RAM the Server will allocate. It's recommended to set this to the same value as
Xmx. This results in the Server ALWAYS using a fix amount of RAM, but also might speed up your server.
server.jarThis is the server file you previously downloaded.
noguiSince this will most likely run on headless server, you have to specify
nogui. The server will otherwise try to open a graphical user interface.
To be able to run the server, you need to accept the end-user license agreement.
To do so, open the generated
eula.txt. It should look something like this:
#By changing the setting below to TRUE you ... #Fri Jul 10 15:22:48 CEST 2020 eula=false
To accept to their terms, update the
eula value in this file to
When running the command again, the server should now start up and create a new world.
Minecraft offers a configuration file named
A detailed description on every option can be found on the minecraft wiki.
However, the most important variables for setting up the server will be cover over here as well.
server-ipLeave blank, if you want to serve your server on all interfaces. If you want to only serve from specific interface, specify the IP of that interface.
server-portThe port your server accepts connections from. Default is
25565. If you change another value than
25565, you have to also specify the port on the client when manually adding the server. This might look something like this:
white-listA white list specifies a list of users that's allowed to connect. ONLY these specified users can connect to the server, if this is set to
true. However, administrator (OPs) are always white-listed.
max-playersThe maximum amount of concurrent users.
level-nameThis is the name of the folder your world will be stored in. Default is
online-modeIf set to
truethe server will query Mojang and only allow users with verified accounts to connect to your server. If you have friends with cracked Minecraft versions, set this to
motdThe name of the server that will be shown to your clients.
level-seedIn case you want to play a specific world, enter your seed before starting the server and agreeing to the
eula. If you already created a world, either delete the existing world folder (default name is
world) or change the
view-distanceThe radius of chunks a user can load. Has a direct impact on player's viewing distance.
If you enabled whitelisting on your server, only whitelisted users will be able to connect.
To add a user to your whitelist, start the server and add them via the server cli interface with
/whitelist add USERNAME.
You can also enable/disable the whitelist on the live server with
Whenever you add/remove a user to/from the whitelist, the
$GAME_DIR/whitelist.json file will be automatically updated.