Modded Minecraft (tech packs, magic packs, kitchen-sink modpacks, or a few quality-of-life mods) needs a server running a mod loader. The main loaders are Forge, its fork NeoForge, and Fabric. Mods are built for one loader and one Minecraft version, so the server must match the modpack exactly.
Want plugins rather than mods? See Paper server with plugins.
Forge, NeoForge or Fabric?
| Loader | Strengths | Typical use |
|---|---|---|
| Forge | Huge library of older mods | Packs for older versions (1.12, 1.16, 1.18–1.20.1) |
| NeoForge | Actively developed Forge fork; most big new mods | Big modern modpacks (1.20.2+) |
| Fabric | Lightweight, updates quickly; performance mods | Small packs, performance mods (Lithium and others) |
Use whatever the modpack uses. Server packs tell you the loader and version.
Requirements
- Java version matching Minecraft: Java 8 for 1.16 and older, Java 17 for 1.17–1.20.4, Java 21 for 1.20.5+. See install Java.
- RAM depends on the pack:
| Pack size | RAM for the server |
|---|---|
| A few mods (≤ 50) | 4–6 GB |
| Medium pack (100–200 mods) | 6–10 GB |
| Large kitchen-sink pack (300+ mods) | 10–16 GB |
- Fast single-thread CPU. Modded tick lag is usually CPU-bound. See how much RAM a VPS needs.
Option 1: use the modpack’s server pack (easiest)
Most CurseForge and Modrinth modpacks publish a server pack (a zip with mods, configs and a start script):
sudo -iu minecraft
mkdir pack && cd pack
wget -O server.zip "<server pack download URL>"
unzip server.zip
cat README* 2>/dev/null; ls
# usually: ./startserver.sh or ./run.sh (installs the loader on first run)
Accept the EULA (eula=true in eula.txt), and set RAM in the pack’s user_jvm_args.txt or variables file. Client-only mods are usually already removed from server packs.
Option 2: install a loader manually
NeoForge or Forge:
wget https://maven.neoforged.net/releases/net/neoforged/neoforge/<version>/neoforge-<version>-installer.jar
java -jar neoforge-*-installer.jar --installServer
echo "-Xms8G -Xmx8G" > user_jvm_args.txt
./run.sh --nogui
(Forge works the same with its installer from files.minecraftforge.net.)
Fabric:
wget -O fabric-server.jar "https://meta.fabricmc.net/v2/versions/loader/<mc-version>/<loader-version>/<installer-version>/server/jar"
java -Xms6G -Xmx6G -jar fabric-server.jar nogui
Most Fabric mods also need Fabric API in mods/.
Then put the mod .jar files into mods/. Use exactly the versions the clients use, and leave out client-only mods (shaders, minimaps, HUD mods), which can crash servers.
Run it reliably
- Run it in tmux, or as a systemd service with
Restart=on-failure. See tmux and systemd unit files. - Use G1GC flags (Aikar’s flags) for Java 17/21 packs, or follow the pack’s recommendation.
- Pre-generate the world (Chunky has Forge, NeoForge and Fabric versions) to avoid lag during exploration.
- Restart daily. Many modpacks slowly leak memory.
Firewall
sudo ufw allow 25565/tcp
See UFW.
Common problems
| Symptom | Cause / fix |
|---|---|
Crash on start mentioning a client class (e.g. net.minecraft.client) |
A client-only mod is in mods/. Remove it |
| “Mod X requires Y” | Missing dependency, or wrong mod version |
| Clients get “mismatched mod list” | Server and client mods or configs differ. Use the same pack version |
| Unsupported class file version | Wrong Java version |
| Heavy lag (“Can’t keep up!”) | CPU-bound tick. Use a profiler (spark), reduce chunk loaders, pre-generate |
| Out of memory | Raise -Xmx (and the plan’s RAM), or remove heavy mods |
Crash reports are in crash-reports/, and logs in logs/latest.log.
Backups
Modded worlds can be corrupted by bad mod updates. Back up world/, config/, mods/ and defaultconfigs/ before every update, and regularly with a backup mod or a script. See backup strategy.
Quick reference
| Item | Value |
|---|---|
| Port | 25565/tcp |
| Mods folder | mods/ (server and client must match) |
| RAM settings | user_jvm_args.txt (Forge/NeoForge) or -Xmx |
| Java | 8 / 17 / 21 depending on Minecraft version |
| Logs | logs/latest.log, crash-reports/ |
Related: Minecraft Java server on Linux and game server VPS.