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

  1. Put the installer into an empty folder and run:
    java -jar neoforge-21.1.265-installer.jar --installServer
    It downloads the Minecraft server and the libraries and creates run.sh, run.bat and user_jvm_args.txt.
  2. Open user_jvm_args.txt and set the memory (the file ships with a commented-out -Xmx4G as a starting point):
    -Xms6G
    -Xmx6G
  3. Start with ./run.sh nogui on Linux/macOS (chmod +x run.sh once) or run.bat on Windows. Extra arguments such as nogui are passed through to the server.
  4. Set eula=true in eula.txt to accept the Minecraft EULA, then start again.
  5. Add the mods to mods/ (for a modpack, copy the pack's server files or its mods/ and config/ 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.

FAQ

Which NeoForge version matches my Minecraft version?
For 1.20.2–1.21.x the first two numbers are the Minecraft version: NeoForge 21.1.x is for Minecraft 1.21.1. For 26.x NeoForge uses Mojang's numbers (26.3.x for 26.3).
Can I use Forge mods on NeoForge?
Generally no for 1.20.2 and newer — use mods built for NeoForge.