How to set up a Minecraft server

What is a Minecraft server?

Minecraft servers allow players to host a public online session for others to join via an IP address or a server name such as coolserver.com Paying for a server subscription can often be a cheap way to play with friends or random people in the community if you want to make a public community.

Minecraft Server Server setup

How to make a self-hosted Minecraft Forge Server

A good article for setting up a self-hosted server can be found on Minecraft Wiki.

There are risks when hosting any game server on your own network read the Risk section above for more information.

Risks

Running a Minecraft server on your network can open up your network to risk if you don't have a good understanding of networking and how to protect yourself from attacks.

With that being said, there are other options such as server providers and dedicated servers that can allow you to pay for services without needing good Internet and know-how on networking.

Step 1: Download Java JRE and JDK

A JRE (or Java Runtime Environment) allows you to run Java applications, while a JDK (or Java Development Kit) allows you to make Java applications as well as run them.

You will need Java Runtime Environment to extract the server files and Java Development Kit to run the server.

Both JRE and JDK can be found downloaded from Oracle's website. However, there's also an easier alternative called OpenJDK. MCreator uses AdoptOpenJDK (now Adoptium). You can download both JDK and JRE here.

Step 2: Download the Forge installer

Once Java is installed, you need to download Forge, the same way you would install Forge for the client. 

You can download Minecraft Forge from the official site below.

Step 3: Extract the Forge server

The first thing you need to do is to make a new folder and ensure it's empty.

Once this is done you can run the forge.jar file like an executable application, a window will appear giving you three options.

Select the server options and then select the folder you just created.

Once done, you can click "Ok" and the files will start to extract.

This may take some time, but it will let you know when it's done.

Step 4: Run the server for the first time.

Inside the folder you created, you will have a run.bat which is used for running the server. There is also a run.sh file that is used for Unix systems. For Windows users, run the run.bat file and let it do generate some files.

You will need Java JDK for this step, so make sure you have it installed or the run.bat file will run into issues.

Once done, it should say click any key to continue press enter and the window should go away.

Step 5: Accepting the Minecraft EULA

A file called eula.txt should be in your folder at this point. open the file with a text editor and change the line that says "eula=false" to "eula=true" By doing this you agree to Mojangs terms and conditions for running a server. 

You should make sure to read the EULA so you have a good understanding of what is allowed in not allowed when it comes to running a Minecraft server. Even though you're running Forge, you still need to comply with Minecraft's EULA agreement.

Once it's done, save the file.

Step 6: Run the server again.

By running the run.bat or run.sh file you will boot the server and more files will generate. This time your world will be created along with the needed files for running the forge server. The first time running the server may take a few moments to finish the next time you run the bat it should only take a few moments to generate the file.

Step 7: Testing if the server is running.

On the same computer, boot up Minecraft using the same version of Forge.

Once this is done, go to multiplayer and type localhost for the IP address.

If you see a server in the list with green bars, then you have a server set up.

Step 8: Port forwarding your router.

In most cases, you will need to port forward your router to make sure the IP stays static. In some cases, this is not possible on public networks so you may need to talk to your Internet Service Provider (ISP) and ask for a static IP Address. You will also need to allow the port 25565 through the router.

Every router is going to have a different way of doing this, but the concept is generally the same. If you have a bridged router, you can look up the router manual and figure out what needs to be done to port 25565 through the router.

Keep in mind that if you don't have a static IP, you will need to use a service such as No-IP to mask your IP so it will not change for people connecting to your server.

Minecraft Server hosting providers

Depending on the provider you end up going with, you will need to pick a plan for your subscription and then you will need to select what options in some cases that the host provides.

Often the server provider will have tutorials for managing your server on their website, topics may vary a bit differently. 

In most cases, though setting up the jar will already be done on their side, all you need to do is agree to the EULA for Minecraft and configure your server settings to your liking and run the server

Multi-craft

In most cases, server providers use a tool called Multi-Craft which is a server interface that gives you the tools to manage your server. You generally need to make an account to use this tool and is pretty common across most server hosts.

Minecraft Server properties file

Some key settings in this config file are listed below.

Op-Permission-Level This controls the command permission level, in most cases, you will want to have it set to 3.
Server-IP This should be the IP for your server.
Server-Port This value is the number after your server IP 25565 is the default Minecraft port.
White-List This will enable or disable the server for using the whitelist.
Online-Mode If this is set to false no players can join the server.
MOTD This is the server message in the main menu that is displayed.
Max-Players This is how many players that can be on the server at the same time.
Level-Name This is the name of the world that you wish to run.
Level-Seed This is the seed of your world.
Level-Type This controls the generation type of the world. Normally it should look like this "minecraft\:normal" without quotes. But it may vary depending on what generation type you want to use.

Root folder

The main folder of your server should have these files and folders listed below.

  • config 
    • A folder that some mods may use.
  • defaultconfig 
    • A folder
  • libraries 
    • A folder
  • logs 
    • A folder where the game stores files with things that happen on the server.
  • mods 
    • A folder for modded games
  • "world"
    • your words also go in your main folder, they can be any name but use letters, numbers and underscores
  • banned-ips.json 
    • A file where banned player IP addresses are stored.
  • banned-players.json
    • A file where banned players are stored.
  • eula.txt 
    • The agreement must be set to true to run your server
  • jar files
    • Minecraft.jar or Forge.jar files are placed in the root folder.
  • ops.json
    • A file where all your ops are stored.
  • server-icon.png 
    • the icon for your server, a 64 by 64 image.
  • server.properties 
    • your main file for server configuration
  • usercache.json
    • Caches for the game you should not edit this file.
  • usernamecache.json
    • Caches for the game you should not edit this file.
  • whitelist.json
    • The file where white-listed players are stored.

Basic Minecraft server information

IP address This is the string of numbers that the router gives to your game for players to connect.
Player slots How many players can be on the server at the same time
RAM The amount of memory your game can use. (modded servers generally need more memory)
Sub-domain This is a user-friendly name that players can connect to your game server rather than using the IP address.
World name This is the name of the world folder that your server is running.
Server properties This is the main file for your game server configuration.
File manager Most hosts will often allow you to add/removed and download files from the server using a remote host app such as FileZilla
OPs This is the list where players you op using the /op command are added. Keep in mind you should never give out op to people you don't trust or know that won't abuse the power of the commands they have. You can also use the /deop command to remove their operator privileges.
Whitelist A white list is used to restrict access. Only people on this list can join your server, anyone else will not be able to connect. You can manage the whitelist using this command /whitelist
Ban/Pardon Operators (Ops) can ban players from your game server, often this would be used if players a breaking your server rules or are causing enough problems to be worth removing the player from the community. This will make the player not able to join the server once they are banned. This can be done using the /ban or /ban-ip commands. If you use the banned IP it will ban their IP address but they may be able to still join if they use a VPN or have a dynamic IP address. If you want to allow a player that was banned from the server to rejoin then you can use the /pardon and /pardon-ip commands.

Minecraft Server Communities

Large communities

If you are planning to host a server for a large community you may want to consider going with a dedicated server option. Dedicated servers are a bit more work to manage but offer the most stable way for servers of all kinds to allow many players to connect to your game and worlds. Minecraft is no exception. 

One thing to keep in mind is dedicated servers often cost the most in regard to hosting but you don't share your hardware with other game servers.

Small communities 

If you want to play with friends or a small group of people, then server providers can often be a good alternative at a lower price to host your game server. This way is often the easiest way to get your community up and running and often you will use a tool called Multi-Craft.

With that being said all service providers that charge a much lower price will often use the same dedicated server to host more than one game server, this can, at times, leads to performance issues based on what is going on in those game servers and how overloaded the dedicated server is at the time of day.



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.