GamingAugust 4, 20265 min read

How to Install Forge on a Minecraft Server

A step-by-step guide to installing Minecraft Forge on a Linux server so you can run mods like Create, atm, or JEI for your friends.

NBy Nxeon

Forge is the most established mod loader for Minecraft Java Edition, and running a dedicated Forge server lets you and your friends play modded worlds without one person's home PC carrying the whole game. This guide walks through a clean install on a Linux server, from Java to a running world.

What you need first

Forge is version-specific: a 1.20.1 Forge server only loads 1.20.1 mods. Pick your Minecraft version first, then match everything else to it.

  • RAM: 4 GB is a sane floor for a light modpack; heavy packs want 6–8 GB.
  • Java: 1.20.5+ needs Java 21, 1.18–1.20.4 needs Java 17, older packs use Java 8.
  • CPU: Minecraft is largely single-thread bound, so per-core speed matters more than core count.

Install a matching JDK first. For a modern version:

sudo apt update
sudo apt install -y openjdk-21-jdk screen
java -version

Download the Forge installer

Grab the installer for your exact Minecraft version from the official Forge site (files.minecraftforge.net). Copy the download link and pull it onto the server:

mkdir -p ~/forge-server && cd ~/forge-server
wget https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.3.0/forge-1.20.1-47.3.0-installer.jar

Run the installer in dedicated-server mode. It downloads the Minecraft server jar and the Forge libraries into the current folder:

java -jar forge-1.20.1-47.3.0-installer.jar --installServer
Deploying a new server with the Nxeon one-click deploy wizard
Deploying a new server with the Nxeon one-click deploy wizard

Accept the EULA and first boot

Modern Forge creates a run.sh launch script and a user_jvm_args.txt for your memory settings. Accept Mojang's EULA before the server will start:

echo "eula=true" > eula.txt

Set your memory in user_jvm_args.txt (for example -Xmx6G -Xms6G), then launch:

./run.sh nogui

On older versions (pre-1.17) there is no run.sh; you start the generated forge-*-universal.jar directly:

java -Xmx6G -Xms6G -jar forge-1.16.5-36.2.42.jar nogui

The first launch generates world/, config/, and a mods/ folder, then stops (or starts, depending on version). Drop your mods into mods/ — see our full guide to adding Forge and Fabric mods for the details on matching versions and dependencies.

Keep it running with systemd

A screen session works for testing, but a systemd service restarts the server on crash or reboot. Create /etc/systemd/system/mcforge.service:

[Unit]
Description=Minecraft Forge Server
After=network.target

[Service]
User=minecraft
WorkingDirectory=/home/minecraft/forge-server
ExecStart=/home/minecraft/forge-server/run.sh nogui
Restart=on-failure

[Install]
WantedBy=multi-user.target

Then enable it:

sudo systemctl daemon-reload
sudo systemctl enable --now mcforge

Open the port

Minecraft Java listens on TCP 25565. Allow it through the firewall:

sudo ufw allow 25565/tcp

If you are on a home connection instead of a server, you would need to forward the port on your router — a fragile setup we compare in port forwarding vs using a VPS. Modded servers are memory-hungry, which is exactly why how much RAM a Minecraft server needs is worth reading before you pick a plan.

Recommended vs latest Forge builds

Forge publishes two builds for most Minecraft versions: a recommended build (stable, well-tested) and a latest build (newest features, less battle-tested). For a server you and friends rely on, take the recommended build unless a specific mod demands the latest. Both appear on the Forge downloads page for your version — the recommended one is highlighted.

Common startup errors and how to fix them

Most first-boot failures trace back to a handful of causes:

  • Crash on launch / "Unsupported class version": you're on the wrong Java. 1.20.5+ needs Java 21, 1.18–1.20.4 needs Java 17, 1.12.2 needs Java 8. Confirm with java -version.
  • "Mod X requires Y which is missing": a dependency isn't installed. The log names it exactly — download it and drop it in mods.
  • Server starts then immediately stops: either eula=true isn't set, or a mod crashed during load. Scroll up in the log for the stack trace.
  • "Failed to load" with no obvious cause: a mod built for a different Minecraft version. Remove it and re-check its version tag.

Always read the log when something breaks:

tail -n 80 logs/latest.log

Test with screen before going to systemd

While you're setting things up, a screen session keeps the server alive after you disconnect from SSH and lets you type console commands directly:

screen -S mc
./run.sh nogui
# detach with Ctrl+A then D; reattach with:
screen -r mc

Once you're happy it boots cleanly, move to the systemd service above for automatic restarts. Download mods only from CurseForge or Modrinth, filtered to your exact version and the Forge loader — third-party mirrors are a common malware vector. Our mods guide covers resolving dependencies once the jars are in place, and if you'd rather run a ready-made pack, installing a CurseForge modpack bundles Forge and every mod for you.

Keep an eye on memory and performance

Forge servers hold more in memory than vanilla, so watch usage as your pack grows. On the box, htop and free -h show the live picture; in-game, Paper-style profilers aren't available on Forge, but Spark has a Forge build you can add to mods for /spark tps and /spark profiler. If memory climbs steadily and GC runs constantly, either raise -Xmx (within your plan's limits) or trim heavy mods. Two lightweight server-side mods — FerriteCore (lower memory) and Canary/Radium (Lithium-style optimisations for Forge) — reduce load without changing gameplay, and neither needs to be on the client. Pair them with the Aikar JVM flags for the smoothest result, and see the RAM guide to size the server correctly for your pack.

FAQ

Which Forge version should I use?

Match it to your modpack. If you are hand-picking mods, use the latest recommended build for your Minecraft version so more mods are compatible.

Do players need to install Forge too?

Yes. Every player needs the same Forge version and the client-side mods installed. Server-only mods (like performance mods) are the exception.

Can I convert a vanilla world to Forge?

Usually yes — copy the world folder into your Forge server directory. Back it up first, because new mods that add blocks can alter terrain generation.

How much RAM does a Forge server need?

A light pack runs on 4 GB; big kitchen-sink packs like All the Mods want 8 GB or more.

Running a modded server smoothly needs headroom and fast storage. Nxeon's Minecraft server hosting gives you NVMe VPS plans with full root access, so you can install any Forge build you like.

#minecraft#forge#modding#game server#vps#seobatch

Deploy your first server in under a minute

Creating an account is free and takes no card details. You pay when you deploy — choose a billing term and pay from your wallet or by card at checkout.