This walkthrough goes through how to setup a Minecraft Forge server. This should work with your own hardware or on hardware in a cloud. If you need to use hardware in a cloud, I recommend Linode.
To get started download the Linux operating system that you want to use for this setup. I used Ubuntu 22.04 LTS and the installation worked fine. Go through the normal installation steps for the server. I recommend setting a static IP address on the server if you are working with your own hardware.
Once the server is installed, make sure the following applications are installed and configured:
SSH (sudo apt install ssh
). Check this other article for how to setup SSH in the most secure way.
Tailscale - go here and run the script at the top of the page. Follow the steps to get it installed. Tailscale is a wireguard enabled system to system connectivity application similar to VPN.
Install java. For most all newer Forge servers you will need Java OpenJDK 17. The command for that is sudo apt install openjdk-17-jdk
Then, configure the server for a specific minecraft user. It's best to keep the installation under a specific user for security and separation of responsibilities. To do this check out this other article.
The next step is to download the Minecraft Forge server. You can find it here. Once you've downloaded it, get it onto your server via SSH with the minecraft user..
Once you are SSH'd in, create a new directory under your home path mkdir ~/minecraft
. Copy the forge installation file into this folder with SCP. You can use command-line SCP in Linux or WinSCP in Windows.
You then run this command to install the server java -jar forge-x.xx.x-installer.jar --installServer
. Change out the 'X's to the version that you downloaded.
The first time you run this command it will stop and say that you must accept the EULA. A EULA.txt file will be created. Open this file with nano and change the value to true. Close it out and run the installation Jar again.
This should install the forge server and will create a run.sh file. To start the server, you can just run this file by typing ./run.sh
.
The purpose of Minecraft Forge is to be able to install mods on the server. Keep in mine, you have to have the same version of the mod on the PC you will use to play Minecraft (as well as the same version as forge).
There are multiple ways to get the mods into the $HOME/minecraft/minecraft/mods folder. You can check out this article to see a way to do this using syncthing or you can just SCP these files to the server each time.
Keep in mind as well that you will have to stop the server with /stop
and then start the server again with ./run.sh
after adding the mods in the mods folder for them to take effect.
Also a note, I run the ./run.sh
command inside of a Linux screen. This ensures I can keep it running in the background and can visit it if anything crashes to see the latest logs.
For any questions or updates that you have for this material, please reach out to me through Discord