This article has 324 words in total, and the estimated reading time is around 2 minutes.
Want to know how long your article takes to read? Why not »Click Here« to try it out!
Prerequisites you may want to read: »Build A Vanilla Server« | »Build A Paper Server«
Prerequisites
Before diving in, ensure you have:
Ubuntu 24.04 LTS installed and running.
Java Development Kit (JDK) 17 installed (Forge for newer Minecraft versions requires Java 17).
Basic command-line proficiency.
An active internet connection.
Step 1: Update, Java and Directory
First things first, let’s make sure your system is up-to-date, Java 17 is installed and a dedicated server directory is created. Just like what you have done a few moments ago.
Step 2: Download, Install and accept EULA of Forge Server
Visit the Forge Website:
Go to the official Minecraft Forge download page.
Select the Minecraft Version:
Choose the version you want to run (e.g., 1.20.1).
Download the Installer:
Click on the Installer link to get the
forge-x.x.x-installer.jar
file.Alternatively, use
wget
to download directly:wget https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-xx.xx.x/forge-1.20.1-xx.xx.x-installer.jar -O forge-installer.jar
- Use the installer to set up Forge:
java -jar forge-installer.jar
This process:
Downloads the necessary libraries.
Creates aforge-1.20.1-xx.xx.x.jar
file (the Forge server jar).
- Before launching, agree to Mojang’s EULA
Step 3: Start Up with a Script
- Create a Startup Script: Let’s make it starting the server easier with a script:
nano start.sh
In the editor, add the following lines:#!/bin/bash
java -Xms4G -Xmx4G -jar forge-1.20.1-xx.xx.x.jar-Xms4G: Sets initial RAM allocation to 4GB.
-Xmx4G: Sets maximum RAM allocation to 4GB.
Adjust based on your server’s RAM.
- Make this script executable by
chmod +x start.sh
.
After that, you can start your server under current directory using./start.sh
Step 4: Install Mods
Create the Mods Folder:
If it’s not already there, use mkdir to create a mods folder:
mkdir mods
- Add your mods:
Ensure mods match your Minecraft and Forge versions.
Place the mod
.jar
files into themods
folder.
v1.0.0 - Updated on 2024-11-01.