How to Setup a Minecraft Forge Server on a VPS

How to Setup a Minecraft Forge Server on a VPS

Minecraft fans are always looking for ways to make their gaming experience better, and one game-changing option is setting up a Forge server on a Virtual Private Server (VPS). This guide will take you through the steps of setting up a Minecraft Forge Server on a VPS, covering all the necessary prerequisites to ensure a smooth and hassle-free setup.

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 Zumiv VPS M SSD for its resources, making it ideal for hosting a Minecraft Forge server with mods and playing together with friends.

Accessing Your VPS

Now that you have chosen your VPS, the next step is gaining access. This involves connecting to your server via SSH (Secure Shell).  for a detailed guide. Additionally, it is necessary to log in as the root user, ensuring you have the necessary privileges. For insights into managing superuser accounts, sudo, and root access,Let us ensure a secure and empowered start to your Minecraft server journey.

System Requirements and Optimization

Ensure your VPS meets the system requirements for hosting a Minecraft Forge server. Generally, a VPS with at least 2GB of RAM and a decent CPU is recommended. As mentioned above, our VPS M SSD meets these requirements with its 16 GBs of RAM and 6 CPU cores, offering a smooth gaming experience with mods and friends without emptying your pockets.

Installing Other Minecraft Versions

While Forge is a fantastic choice for many, Minecraft offers a diverse range of experiences with different server versions. Here, we will briefly guide you to resources for installing Vanilla Minecraft and setting up a Spigot server on your VPS.

How to Setup a Minecraft Server – The Ultimate Guide

If you are inclined towards the purity of Vanilla Minecraft,  walks you through the step-by-step process.

How to Setup a Minecraft Forge Server on a VPS

For those who crave the excitement of modded gameplay.

See Also: Experience Our for Free VPS Hosting: Enjoy a 30-Day Trial with Risk-Free Servers

How to Install Forge on a Linux VPS (Pre-1.16, Manual)

Before diving into the Forge installation, let´s make sure your VPS is equipped with the 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

Learn more about Screen and how it works in our dedicated article called “What is Screen and How to use it on a VPS”

Wget:

Wget, a command-line utility, will help us download necessary files. Install it using:

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

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  

Save you changes with [CTRL] + [O] and exit the editor with [CTRL] + [X] 

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 VPS M SSD)
  • 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.

See Also: Experience Our for Free VPS Hosting: Enjoy a 30-Day Trial with Risk-Free Servers

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 those who find the prospect of setting up a Minecraft server on a VPS too involved or time-consuming, consider renting through GPORTAL as a user-friendly alternative. This efficient solution prioritizes gaming over server management, providing a hassle-free experience for players with diverse preferences.

Benefits of Choosing GPORTAL Server Rental

Opting to lease a server from GPORTAL eliminates the need for manual setup and maintenance, making it an ideal choice for those who want to concentrate on gaming rather than dealing with server configurations. GPORTAL’s intuitive platform simplifies server management, catering to both novices and experienced users.

GPORTAL Rental Process

Renting a server through GPORTAL is a straightforward process. Visit their website, navigate the user-friendly interface to choose your server specifications, including RAM, player slots, and additional features. After configuring, proceed with the rental process, and within minutes, you’ll have a fully operational Minecraft server.

Advantages of GPORTAL Hosting

GPORTAL hosting offers several benefits, including a user-friendly interface designed for simplicity, dedicated customer support for assistance, and automated updates to ensure your server always operates on the latest version. This managed hosting solution is a viable option for those seeking a streamlined experience, allowing players—casual or dedicated—to immerse themselves in the Minecraft world with minimal effort and maximum enjoyment.

See Also: Experience Our for Free VPS Hosting: Enjoy a 30-Day Trial with Risk-Free Servers

COMPLETE DIGITAL SERVER SOLUTIONS FOR ALL

Bare Metal Dedicated Servers

A single tenant, physical server allowing you full access to its resources

Read More

Cloud VPS

The cheapest way to get your own independent computing instance.
Read More

Cloud VDS

Virtualized server platform hosted on enterprise-grade physical servers

Read More

10 Gbps Unmetered Servers

zomiv offers high bandwidth dedicated servers up to 20Gbps.

Read More

ZOMIV NEWSLETTER

Receive the latest news, updates and offers. You can unsubscribe at any time.

ZOMIV NEWSLETTER

Receive the latest news, updates and offers. You can unsubscribe at any time.

zomiv footer logo

HOSTING REDEFINED

44-7-441-399-305
Support Hours: 24x7x365
Sale Office Hours: M-F, 7AM-5PM EST

We accept the following:

visa
mastercard
paypal
download (6)

PRODUCTS

SERVICES

© Copyright 2024, All Rights Reserved by DataCamp Int Limited.

zomiv is a trading name of DataCamp Int Limited. Registered Office: 71-75 Shelton Street, Covent Garden,
London, United Kingdom, WC2H 9JQ. Registered Number 15527709. Registered in England and Wales.
certifications

ZOMIV NEWSLETTER

Receive the latest news, and offers. You can unsubscribe at any time.

  • PRODUCTS
  • LOCATIONS
  • SOLUTIONS
  • COMPANY
This is a staging enviroment

Please tell us more about yourself.

Complete the form below and one of our experts will contact you within 24 hours or less. For immediate assistance contact us.

In order to finalize your application, please read and accept our Terms and Conditions*.

CUSTOM QUOTE REQUEST

Complete the form below and one of our experts will contact you within 24 hours or less. For immediate assistance contact us.

We promise not to sell, trade or use your email for spam. View our Privacy Policy.