Get your free server today! View Plans →
Home Plans Blog About Contact Panel Join Discord
Minecraft

How to make a modded Minecraft server with Forge

A full step-by-step guide to running a Forge modded Minecraft server, from a CurseForge modpack server pack to the right Java version, RAM, and server.properties tweaks.

How to make a modded Minecraft server with Forge

By the end of this guide you'll have a working modded Minecraft server running on Forge, either with a handful of your own mods or with a full CurseForge modpack that you and your friends can join. This is written for someone who has maybe run a vanilla server before but has never touched mods on the server side. You don't need to be a Linux wizard. You just need to follow the steps in order.

Forge or Fabric, and why the version matters so much

Before you download anything, you need to make one decision: Forge or Fabric. Both are mod loaders. They sit between the base game and the mods, and they let mods hook into Minecraft without rewriting the game. They are not compatible with each other. A mod built for Forge will not load on Fabric, and the other way around.

So how do you choose? Look at the mods you actually want to run. Big content packs like the popular all-the-mods style packs, magic and tech mods, and most kitchen-sink modpacks are built for Forge. Fabric tends to win for performance mods and smaller, lighter setups. If you already picked a modpack from CurseForge, the pack already chose for you. The pack page will say Forge or Fabric right at the top. This guide focuses on Forge, which is what most heavy modpacks use.

The second thing, and people get burned by this constantly, is the Minecraft version. Everything has to match. The Forge version, the Minecraft version, every single mod, and every player's client all need to agree. A mod for 1.20.1 will not run on a 1.19.2 server. So pick one Minecraft version and lock it in. We usually tell people to pick a slightly older, stable release like 1.20.1 instead of the very newest one, because mod authors take time to catch up to fresh releases and you want a full set of mods available.

What you need before you start

The right Java version

Modded Minecraft is picky about Java. Get this wrong and the server simply won't start, often with a confusing error. As a rough guide:

Minecraft versionJava version to use
1.16.5 and olderJava 8
1.17 to 1.20.4Java 17
1.20.5 and newerJava 21

Use a build like Eclipse Temurin (Adoptium). On a Debian or Ubuntu box you can install Java 17 quickly:

sudo apt update
sudo apt install temurin-17-jdk

# check it worked
java -version

You want output that mentions the version you expect, for example:

openjdk version "17.0.11" 2024-04-16
OpenJDK Runtime Environment Temurin-17.0.11+9

How much RAM

RAM is the number one cause of a laggy or crashing modded server. Vanilla is happy with very little. Mods change that fast. A reasonable starting point:

Give the server room but don't hand it every byte the machine has. The operating system needs some too. We'll set the actual numbers in the start script later.

Option A: installing a CurseForge modpack server pack

If you're running a named modpack, do not try to download every mod by hand. CurseForge gives you a server pack, which is a ready bundle with the right Forge build and every mod already inside. It saves you hours.

Step 1: download the server pack

Go to the modpack's page on CurseForge. Open the Files tab. For most packs there is a button or a separate file labelled Server Pack or Additional Files. Download that, not the client zip. The file name usually looks something like ModpackName-Server-1.5.2.zip.

Step 2: upload and unzip it on the server

Put the zip in the folder where your server will live, then unzip it:

mkdir -p ~/forge-server
cd ~/forge-server
unzip ModpackName-Server-1.5.2.zip

Inside you'll usually find a mods folder, some config folders, and a start script. Many packs ship a start.sh for Linux and a start.bat for Windows. Some packs also need you to run the Forge installer first, which they explain in an included readme. If a script is there, you can often skip straight to the first run section below. If not, follow Option B to install Forge, then come back.

Option B: installing Forge yourself

This is the path for a custom set of mods, or for a pack that only gives you the mod list. It's not hard.

Step 1: get the Forge installer

Go to the official Forge site (files.minecraftforge.net), pick your Minecraft version in the left column, and download the Installer. Grab the recommended build if there is one. You'll end up with a jar named like forge-1.20.1-47.2.0-installer.jar.

Step 2: run the installer in server mode

Drop that installer into your server folder and run it with the server flag. This does not open a window. It just builds the server files:

cd ~/forge-server
java -jar forge-1.20.1-47.2.0-installer.jar --installServer

You should see lines about extracting and downloading libraries, ending with something like:

The server installed successfully
You can delete this installer file now if you wish

After this you'll have new files, including a libraries folder and a run script. On modern Forge (1.17 and up) you get a run.sh and run.bat plus a user_jvm_args.txt file. That's where your RAM setting goes. On older versions you get a single forge-...-universal.jar or similar that you launch directly.

Adding your mods

If you used Option A, your mods are already in place. If you installed Forge yourself, you need to add them.

First, make sure the mods folder exists. If it isn't there yet, the first launch will create it, or you can make it now:

mkdir -p ~/forge-server/mods

Now copy your mod jars into that folder. Each mod is a .jar file. Just drop them in:

cp ~/downloads/*.jar ~/forge-server/mods/
ls ~/forge-server/mods/

Two rules will save you a lot of pain here. First, every mod must be built for the exact Minecraft and Forge version you installed. Second, watch for dependencies. Many mods need a library mod to run, things like a core API mod. If mod A says it needs mod B, you have to add mod B too or the server won't start.

Clients need the same mods. This is the part beginners miss. A modded server and a vanilla client cannot talk to each other. Every player has to install the same mod loader, the same Minecraft version, and the same set of mods you put on the server. The easiest way is for everyone to install the modpack from the CurseForge or Prism launcher, which keeps the whole group in sync.

First run and the EULA

Now start it once. The first launch will fail on purpose, because you have to accept Mojang's license first. Launch with the run script if you have one:

cd ~/forge-server
sh run.sh

You'll see a message like this and the server will stop:

[main/ERROR]: You need to agree to the EULA in order to run the server.
Go to eula.txt for more info.

Open eula.txt and change the one line from false to true:

eula=true

Now set your RAM. On modern Forge, open user_jvm_args.txt and add a line. For a 6 GB allocation:

-Xmx6G -Xms6G

If your version launches a jar directly instead, your start command looks like this:

java -Xmx6G -Xms6G -jar forge-1.20.1-47.2.0-universal.jar nogui

Start it again. This time it'll load every mod, which takes a while on a big pack, then settle on a line like:

[Server thread/INFO]: Done (42.317s)! For help, type "help"

server.properties tweaks for modded

After the first successful start you'll have a server.properties file. A few settings matter more for modded play than they do for vanilla. Stop the server with stop in the console, then edit the file:

online-mode=true
view-distance=8
simulation-distance=6
max-tick-time=60000
spawn-protection=0
allow-flight=true

A couple of notes on why. Keep view-distance modest, because modded chunks are far heavier than vanilla, and a high view distance multiplies that load. Raising max-tick-time, or setting it to -1 to disable it, stops the server from killing itself during slow modded chunk loading, which is common right after a restart. And allow-flight=true matters because many tech and magic mods give players legitimate flight, and without this the server kicks them for cheating.

Troubleshooting

Missing dependency or "missing mods" on launch

The server crashes on startup and the log lists a mod it expected but couldn't find. This means a mod you added needs another mod that isn't there. Read the log carefully, it usually names exactly what's missing, then download that dependency for the same version and drop it in the mods folder.

Mod id mismatch when a player joins

A player gets kicked with a message about a mod id mismatch or missing mods. That player's client does not match the server. Either they're missing a mod the server has, or running a different version of one. The fix is to make their mod folder identical to the server's. Using the same modpack install for everyone avoids this entirely.

Out of memory or constant lag

You see java.lang.OutOfMemoryError in the log, or the server stutters and chunks load slowly. You haven't given it enough RAM. Raise the -Xmx value, but never above what the machine actually has free. If the box only has 8 GB total, don't set 8 GB for the server, leave a couple of GB for the system. If you're already maxed out, you need a bigger host.

Wrong Java version

The server refuses to start and complains about an unsupported class file version, or a message about a major version number. That's a Java mismatch. A common one is a number like 61, which means the code wants Java 17 but you're running an older Java. Check the table near the top, install the matching version, and confirm with java -version before trying again.

Forge installer says it failed to download libraries

If --installServer errors out partway, it's usually a network hiccup or an old installer build. Run it again, since it resumes most of the way. If it keeps failing, grab a different recommended Forge build for your version and use that installer instead.

Wrapping up

That's the whole loop. Pick a Minecraft version and stick to it, match your Java to it, install Forge with --installServer or unzip the CurseForge server pack, fill the mods folder, accept the EULA, set your RAM, and tune a few lines in server.properties. The single thing that causes the most grief is mismatched versions between the server, the mods, and the players, so keep everyone on the same pack and you'll dodge most problems. Once it boots cleanly, share your IP, and if your players still can't connect, double check they're on the exact same mod set before you go hunting for anything fancier. If you'd rather skip the manual setup, a panel host like Bytte.cloud can spin up a Forge or modpack server for you in a few clicks, but the steps above work the same on any machine.

Common questions

Do players need the same mods as the server?

Yes. A modded server and a vanilla client cannot connect. Every player needs the same Minecraft version, the same Forge loader, and the exact same set of mods. Installing the modpack through CurseForge or Prism keeps everyone in sync.

Should I use Forge or Fabric?

Use whatever your mods are built for, since the two are not compatible. Most large content and tech modpacks use Forge, while Fabric is common for performance mods and lighter setups. A CurseForge pack page tells you which one it needs.

How much RAM does a modded server need?

Far more than vanilla. Plan on about 4 GB for a small pack, 6 to 8 GB for a medium modpack, and 10 GB or more for a large kitchen-sink pack. Always leave some RAM free for the operating system.

Which Java version should I use?

Match Java to the Minecraft version. Use Java 8 for 1.16.5 and older, Java 17 for 1.17 to 1.20.4, and Java 21 for 1.20.5 and newer. A class file version error almost always means the Java version is wrong.

How do I install the Forge server?

Download the Forge installer for your Minecraft version, then run it with java -jar forge-installer.jar --installServer. That builds the server files. Accept the EULA on the first run, set your RAM, then start it again.

ML
Marcus Lee
Infrastructure Lead at Bytte.cloud

Part of the Bytte.cloud team. We run game servers, bots and websites for a living, and we write these guides from what we see day to day in support and on our own servers.

Want to try this on real hardware?

Bytte.cloud has free plans for game servers, bots and websites. No credit card, set up in seconds.

Start for free See the plans