back

Setup A Minecraft Server

Setting up a minecraft server isn’t hard but it really depends on what you want your minecraft server to be like. This post goes over some things but I will not go into extreme detail on each point because this post will be needlessly long and parts will become outdated very quickly.

Requirements

The minimum requirement is to have a computer that works. That is pretty much it. It is only as complicated as you make it. The more you want, the more you will need.

Hardware, Networking And Domains

You need hardware to run it on. If you are going the home server route, try to choose some hardware that is low power usage, has an okay amount of RAM (minimum 1GB) and not too old of a CPU. You may also want to consider purchasing a UPS for a home server in case of power cuts. If you do not want to run the server at home, you can go use a VPS. There are many to choose from. An example is linode. The number of players you have and if and how heavily modded your server is will determine how much power you need.

Depending on how big you expect your server to become, you need to think about storage too. A normal minecraft server with some friends won’t go past 1GB of storage. A server like 2b2t is sitting at over 20TB of storage use.

If you have a home server, make sure to have an ethernet connection to your router. You need to be able to open a port for the minecraft server. The default is 25565 but it can be whatever you want. You must open it on your machine’s firewall and if you want it available on the internet, port forward on your router’s configuration page. Doing this part is different everywhere for different firewall programs on each system and different router software. Search up for your own hardware. Here is an example of port forwarding for virgin media routers. On your router, you should also configure your DHCP to keep the local IP of your server the same.

If your server is available across the internet, try to get an internet connection which is stable and if you are only having people connect to you by IP address, you should check if your server’s IP is static or dynamic. If it is static, it means the public IP for your server will not change as long as you do not request for it to be changed or switch internet service providers. If it is dynamic, this means every now and then (every 30 days, each time your router restarts, etc), your IP changes. If this is the case. You need to tell people that want to connect to your server the new IP every time.

A good option is to set up a domain name for your server. This means if your IP is dynamic, people can still just type in the same thing to connect. If you just want a more simple name like “diyarciftci.xyz” instead of something hard to remember and less human friendly like “90.193.120.143”, using a domain is also a good idea. Landchad has a great guide to setting up your own website. A good place I think to buy a domain is at namecheap.com. They also have a good page on setting up a minecraft server with a domain. If your IP changes frequently, just make sure to configure the TTL for you DNS to be low. The program I use to automatically update the records is ddclient but you can use whatever works best for you.

If you do not want to go the domain route but still want the same IP to stay even though you have a dynamic IP, you might want to look at using something such as ngrok.

If you want to connect to manage the server easily, I suggest using SSH. There are many guides to setting up SSH. Here is one of them. I suggest using RSA 4096, login with keys only and disable root login. This is especially useful if you want to run the server on something like a SBC without a display output.

Software, Operating System And Modding

For your OS, you can go with whatever you want but I would strongly suggest using some kind of simple linux distribution so more of the computer’s resources are available for the minecraft server. A decent option is debian without a GUI.

You need java to run a minecraft server. Different versions of minecraft server software will require a certain version number or range for java. Some different versions may perform better than some others.

There is different minecraft server software. There is the standard minecraft java edition server but I would suggest going with something like paperMC for better performance and being able to use mods. Others too like forge, magma or spigot. Go with what works for you. Make sure to download the version you want too. For updating versions, it is usually as simple as placing in the new minecraft server jar, removing the old and starting it up. Some new features in the new version may not be very apparent until you go to blocks that have not been generated on the map yet.

Place the minecraft server file in a folder, change directory to that folder in a terminal and type java -jar name of your jar.jar. When complete, you will find a eula.txt file in the server folder. Modify this file changing “false” to “true”. You cannot continue without agreeing to the EULA. After this, run the previous command again. After you see Done, type in stop and enter. You can modify the server.properties to your liking for server port, build height, allow flight for laggy players to not get disconnected (or as part to enable cheating on the server), difficulty or whatever you want to do. You can find more info on the fandom. After configuring, you can start the server again. Example given to start the server on minecraft.net is java -Xmx1024M -Xms1024M -jar minecraft_server..jar nogui. Xmx1024M means the max amount of memory the server can use (1GB), Xms is minimum (make sure to not have a large difference between minimum and maximum otherwise this can result in poor performance), specifying it is a jar file with -jar, followed by the jar file name and nogui so there isn’t a GUI menu to manage the server. Installing mods for paperMC server can be found here.

When it comes to mods, just be careful and not go overboard. There are many guides. One place to download mods is the cureseforge site. When setup on your server, your clients will need to install the right client to be able to connect so make sure they do that.

You should also learn the server commands for your minecraft server. Here is an example for the vanilla version. I suggest giving yourself operator permissions.

Backups

Make sure to keep backups of your server. If you do not do this, you will regret it later. I speak from experience from my first minecraft server. There are many backup solutions so look into using a program that works for you.

Connecting

When in the game, you can connect on localhost:port, localnetworkip:port, publicip:port, or domain:port. It depends on how you configured it.

Alternative Networks

You may be interested in serving your minecraft server across networks like I2P or Tor. I wouldn’t suggest this because the performance will be very bad. I won’t go through it but you can find plenty of guides on this setup. It is pretty much the same procedure as creating an eepsite or tor service but instead you are plugging minecraft into it.

Conclusion

There are a few things here and there that you may come across that wasn’t mentioned here that you want to do but you can just STFW. Hosting and managing a minecraft server for yourself and some others isn’t difficult. If it grows to a large size, you will need to do more.