How to Set Up a NeoForge Server
Updated · MCJarHub
Download the NeoForge installer for your Minecraft version, run java -jar neoforge-<version>-installer.jar --installServer in an empty folder, set memory in user_jvm_args.txt, then start the server with run.sh or run.bat.
Pick the right NeoForge version
NeoForge builds belong to one Minecraft version. For Minecraft 1.20.2 to 1.21.x the first two numbers of the NeoForge version are the Minecraft version: 21.1.x is for Minecraft 1.21.1, 20.4.x for 1.20.4. For the 26.x releases NeoForge uses Mojang's numbers, e.g. 26.3.x for Minecraft 26.3.
Use the version your modpack names. The NeoForge download page lists the newest stable (or, if none yet, beta) build for each Minecraft version, linked from NeoForged's official maven with its SHA-256 — the newest right now is NeoForge for Minecraft 26.3 (26.3.0.99).
Java: Java 17 for 1.20.2–1.20.4, Java 21 for 1.20.5–1.21.x and Java 25 for 26.x.
Install the server
- Put the installer into an empty folder and run:
It downloads the Minecraft server and the libraries and creates
java -jar neoforge-21.1.265-installer.jar --installServer
run.sh,run.batanduser_jvm_args.txt. - Open
user_jvm_args.txtand set the memory (the file ships with a commented-out-Xmx4Gas a starting point):-Xms6G -Xmx6G
- Start with
./run.sh noguion Linux/macOS (chmod +x run.shonce) orrun.baton Windows. Extra arguments such asnoguiare passed through to the server. - Set
eula=trueineula.txtto accept the Minecraft EULA, then start again. - Add the mods to
mods/(for a modpack, copy the pack's server files or itsmods/andconfig/folders) and restart.
Good to know
- NeoForge and Forge split in 2023; from Minecraft 1.20.2 on, mods are built for one or the other. Don't mix them.
- Client-only mods (shaders, minimaps) often crash a dedicated server — remove them from the server's
mods/. - Wrong Java shows up as
UnsupportedClassVersionError— fix. - Memory for modpacks: see how much RAM.
- Choosing a loader? Fabric vs Forge vs NeoForge. Older versions like 1.20.1 or 1.12.2 use Forge.