Setting up a Forge server on a Virtual Private Server (VPS) is one game-changing option for avid Minecraft players who are always looking for ways to improve their gaming experience. This tutorial will walk you through the process of configuring a Minecraft Forge Server on a virtual private server (VPS), going over all the requirements to make sure everything goes smoothly.
Preparing Your VPS
VPS Hosting Options
Before diving into the setup process, it is necessary to choose the right VPS hosting provider that aligns with your needs and budget. We recommend considering the Server Gigabit Minecraft VPS 2 for its resources, making it ideal for hosting a Minecraft Forge server with mods and playing together with friends.
Accessing Your VPS
Getting access to your VPS is the next step after selecting it. This entails using SSH (Secure Shell) to connect to your server. For a comprehensive guide, see our article “Decoding SSH: Encryption, Ports, and Connections Explained.” In order to make sure you have the required permissions, you must also log in as the root user.
System Requirements and Optimization
To host a Minecraft Forge server, make sure your VPS satisfies the system requirements. Generally speaking, a VPS with a respectable CPU and at least 2GB of RAM is advised. As previously stated, our VPS satisfies these specifications thanks to its 16 GB of RAM and 6 CPU cores, providing a fluid gaming experience for friends and mods without breaking the bank.
Installing Other Minecraft Versions
How to Install Forge on a Linux VPS (Pre-1.16, Manual)
Let us first ensure that your VPS has the necessary packages installed before proceeding with the Forge installation:
Screen:
By offering a virtual terminal session, Screen enables you to run your Minecraft server in the background. To install it, use:
sudo apt-get update
sudo apt-get install screen
Wget:
We’ll download the required files with the aid of the command-line tool Wget. To install it, use:
sudo apt-get install wget
Install Java 8
Different Minecraft versions may require specific Java versions.
Minecraft Version | Required Java Version |
1.7.10 – 1.16.5 | Java 8 |
1.17.x | Java 16 |
1.18+ | Java 17 |
For this Minecraft version, we will need to install Java 8, like below:
sudo apt update
sudo apt install openjdk-8-jdk
Downloading and Installing Forge server
Now we need to download all the files needed to run your own Forge server.
Start by creating a dedicated directory:
mkdir forge_server
Now, navigate to the directory:
cd forge_server
Finally, download the Forge server jar:
wget <Forge-Server-URL>
Replace ” Forge-Server-URL“ with the actual domain of the version you want to download. The URLs can be found on the Forge official website.
Install Forge-Server:
Now run the installer with:
java -jar [name_of_the_forge.jar] --installServer
Replace [name_of_the_forge.jar] with the actual name of the forge.jar you have just downloaded!
Creating a Starting Script & Launching Server
Now, let us create a script with which we can start our Minecraft Forge server:
First, create the script file with this command:
nano start.sh
And paste in the following content:
#!/bin/bash
screen -S Minecraft java -Xmx8G -Xms512M -jar [Name_of_forge.jar]
Save you changes with [CTRL] + [O] and exit the editor with [CTRL] + [X]
Pro-Tip: If necessary, please modify:
-
-
- Xms for the minimum amount of RAM you want to allocate
- Xmx for the maximum number of RAM you want to allocate
-
Now, let us make it executable with the help of this command:
chmod +x start.sh
Quickly accept the EULA (End User License Agreement) by creating a file called “eula.txt” with this command:
nano eula.txt
And paste in the following content:
eula=true
Now save you changes with [CTRL] + [O] and exit the editor with [CTRL] + [X]
It is finally time to launch the server:
./start.sh
How to Install Minecraft Forge on a Linux VPS (1.16+, Manual)
Again, before diving into the Forge installation, ensure your VPS is equipped with the necessary tools. For this, install required packages:
Screen:
Screen provides a virtual terminal session, allowing your Minecraft server to run in the background. Install it using:
sudo apt-get update
sudo apt-get install screen
Wget:
Wget, a command-line utility, will help us download necessary files. Install it using:
sudo apt-get install wget
Install Java 17
Different Minecraft versions may require specific Java versions.
Minecraft Version | Required Java Version |
1.7.10 – 1.16.5 | Java 8 |
1.17.x | Java 16 |
1.18+ | Java 17 |
For this Minecraft version, we will need to install Java 17.
sudo apt update
sudo apt-get install openjdk-17-jre-headless
Downloading and Installing Forge server
Now we need to download all the files needed to run your own Forge server.
Start by creating a dedicated directory:
mkdir forge_server
Now, navigate to the directory:
cd forge_server
Finally, download the Forge server jar:
wget <Forge-Server-URL>
Replace “Forge-Server-URL“ with the actual domain of the version you want to download. The URLs can be found on Forge’s official website.
Install Forge-Server:
Now run the installer with:
java -jar [name_of_the_forge.jar] --installServer
Replace [name_of_the_forge.jar] with the actual name of the forge.jar you have just downloaded!
Creating a Starting Script & Launching Server
Now, let us create a starting script with which we can start our Minecraft Forge server. And here is the main difference between Forge Pre-1.16 and now – The file structure.
To change the amount of RAM that you want to allocate to your Minecraft Forge server, open the files called “user_jvm_args.txt” with this command:
nano user_jvm_args.txt
To set the minimum & the maximum amount of RAM add these two lines:
-Xms512M
-Xmx8G
Save you changes with [CTRL] + [O] and exit the editor with [CTRL] + [X]
If necessary, please modify:
- Xms for the minimum amount of RAM you want to allocate
- Xmx for the maximum number of RAM you want to allocate
Now, let us create a start script.
Let us use the template that the installer already created – But let us rename it with this command:
mv run.sh start.sh
Now open the file with the nano-editor:
nano start.sh
Now, add the following content in front of the content of the last line:
After that it should look similar to this:
screen -S Forge java @user_jvm_args.txt @libraries/net/minecraftforge/forge/1.20.1-47.2.1/unix_args.txt "$@"
Please keep in mind that your forge version number may differ based on the version you have installed!
Now, let us make it executable with the help of this command:
chmod +x start.sh
Let us quickly accept the EULA by creating a file called “eula.txt” with this command:
nano eula.txt
And paste in the following content:
eula=true
Now save you changes with [CTRL] + [O] and exit the editor with [CTRL] + [X]
It is finally time to launch the server:
./start.sh
By using these commands, you will successfully install Forge on your Linux VPS, accommodating both older and newer Minecraft versions. In the next chapter, we will explore essential configurations to optimize your Forge server for the best gaming experience.
Installing Forge through an Installer Script
This method is great for anyone who wants to set up their own Spigot server but found the steps above a bit tricky.
We will use “mcserver_installer” by realTM – an open–source, powerful and extensive Bash-Script to install Minecraft servers on your Linux server.
More information and the source-code of this project can be found on the official GitHub page here: https://github.com/officialrealTM/mcserver_installer
Prerequisites/Requirements
- A Linux server with a supported Linux distribution (Debian & Ubuntu) and enough resources (We recommend at least our Minecraft VPS)
- Root & SSH Access to your Linux server
Downloading the Script
To download the script, the git-package needs to be installed on your server. To install it use:
apt install git –y
Now download the script with this command:
git clone https://github.com/officialrealTM/mcserver_installer.git
Running the Minecraft Spigot Installer Script
After downloading the script go into its directory with this command:
cd mcserver_installer
And execute the script with this command:
./mcserver_installer.sh
When starting the script for the first time, it wants to install some required packages. Hit “Yes” to continue.
This process can take a few moments to finish.
After the initial setup process, the script will ask you which type of Minecraft server you want to install. From now on this will be the menu you will get every time you start the script.
Select Server Type
As you can see, this script can install Minecraft Vanilla, Forge, Spigot and Paper servers. In this case we will go with “Minecraft Forge” – so we use the up and down keys to navigate to “Minecraft Forge” and hit enter to select it.
Select the Major Version
Now it prompts us to select the major Minecraft version you want to run Spigot on:
We will select the, as of today, newest version, which is 1.20 using the up and down keys again, followed by pressing enter.
Installation of Java 17
The script automatically detects that to run a Minecraft 1.20 server, Java 17 is required and asks you if you want to install it:
Hit “Yes” to install it. This process will take a few moments to finish.
Select the Subversion
In the next screen you will be able to select the exact subversion:
In this case, for Minecraft Spigot 1.20 there are only two subversions available, 1.20 and 1.20.1. Confirm your entry by pressing enter again.
Enter Forge Build
Now you need to enter the exact Forge build number for the build you want to install:
The build numbers can be found on the official Forge website.
The build number for the latest build of Forge Minecraft 1.20.1 is “47.2.1”.
So that is the number we will insert into the script:
Confirm this by pressing enter again.
Now all needed files will be downloaded, installed, and moved to their right positions.
Set the RAM of the Minecraft Server
After the installation has finished, you can either select a pre-defined amount of RAM to allocate to your Minecraft server or set a custom amount.
Pro-Tip: If you do not want to run anything on the server except the Minecraft server, you can allocate up to 75% of the Linux server’s RAM. In this example, our VPS M SSD has 16GB of RAM, so we could allocate a maximum of 12GB of RAM to the server. If you want to run other things on your Linux server besides the Minecraft server, we recommend you allocate no more than 50% of the RAM to the Minecraft server – so in our example, no more than 8GB.
Finished Installation
After selecting the amount of RAM, your Minecraft server has been set up.
Your server has been saved in the displayed directory.
To start it go to this directory. In our example use this command:
cd Servers/Forge-1.20.1
To start the server, use this command:
./start.sh
Congrats! Your Minecraft Forge 1.20.1 server is up and running in just a few minutes! If you want to learn more about the other features of the script and how to use them check out the official documentation of the script.
Renting a Minecraft Server at GPORTAL
For an effortless Minecraft server setup without the hassle of manual configurations, GPORTAL provides an ideal solution. Their user-friendly platform prioritizes gaming over server management, making it perfect for players seeking convenience.
Benefits of Choosing GPORTAL Server Rental
Renting from GPORTAL means skipping the complexities of manual setup and upkeep. Their intuitive platform caters to both beginners and seasoned users, offering seamless server management.
GPORTAL Rental Process
Visit GPORTAL’s website and navigate their straightforward interface to select server specifications—RAM, player slots, and more. Complete the configuration and initiate the rental process. In just a few minutes, your Minecraft server will be up and running.
Advantages of GPORTAL Hosting
Enjoy a hassle-free experience with GPORTAL’s user-friendly interface and dedicated customer support. Benefit from automated updates, ensuring your server operates on the latest version. It’s a managed hosting solution, perfect for casual or dedicated players seeking maximum enjoyment with minimal effort in the Minecraft world.