How to Make a NeoForge Server (1.21.1 & 26.x Guide)
Most big 1.21 modpacks, like All the Mods 10, Craftoria and a lot of newer kitchen-sink packs, run on NeoForge instead of Forge. If you're trying to host one, you need a NeoForge server, and the setup is a little different from the old "just run the jar" days. Here's how to build one properly, from installer to first boot.
java -jar neoforge-<version>-installer.jar --installServer in an empty folder. Start it with the generated run.sh or run.bat, set RAM in user_jvm_args.txt, accept the EULA, then add NeoForge mods (or the pack's server files) to mods.What NeoForge is
NeoForge is a fork of Minecraft Forge, created in 2023 when most of the Forge team moved to a new project. For 1.20.1 the two were nearly identical, but from 1.20.2 onward they've drifted apart, and most mod developers on 1.21 now build for NeoForge first.
What that means in practice:
- NeoForge mods need a NeoForge server. Don't assume a Forge 1.21 mod will load on NeoForge, or the other way around. Check the loader tag on each download.
- Version numbers follow Minecraft. NeoForge
21.1.xis for Minecraft 1.21.1,21.4.xis for 1.21.4, and so on (the Minecraft version minus the leading "1."). Since Minecraft switched to year-based versions, NeoForge for 26.x has four parts:26.3.0.xis for Minecraft 26.3.
Which NeoForge version should you use?
| Minecraft | NeoForge versions | Latest build (Nov 9, 2026) | Java |
|---|---|---|---|
| 1.20.2 to 1.20.4 | 20.2.x to 20.4.x | n/a | 17 |
| 1.21.1 | 21.1.x | 21.1.265 | 21 |
| 1.21.2 to 1.21.11 | 21.2.x to 21.11.x | n/a | 21 |
| 26.1 / 26.2 / 26.3 | 26.1.0.x / 26.2.0.x / 26.3.0.x | 26.3.0.102 | 25 |
- Running a modpack? Use the exact NeoForge version the pack lists, not the newest one. Packs sometimes need a minimum build (a mod will say "requires neoforge 21.1.y or above").
- Building your own 1.21.1 server? The latest 21.1 build is fine. 1.21.1 is still where most big modpacks are, including All the Mods 10, Create-based packs and Mekanism.
- Versions come from NeoForge's official release server. Check neoforged.net for anything newer.
Step 1: Install Java 21
Minecraft 1.20.5 to 1.21.x requires Java 21, and 26.1 and newer require Java 25. The wrong Java gives you an UnsupportedClassVersionError straight away.
- Get a JDK 21 (or 25) build. Eclipse Temurin is a good choice.
- Confirm with
java -version.
If you have several Java versions installed, you can call the right one by full path in the commands below.
Step 2: Download the NeoForge installer
- Go to neoforged.net and grab the installer for your version.
- If you're running a modpack, use the exact NeoForge version the pack lists. On CurseForge and Modrinth it's in the pack's file details, or inside the pack's server files. Mismatched NeoForge versions are a common cause of startup crashes.
- Save the
neoforge-<version>-installer.jarinto an empty folder.
On a Linux VPS you can download it straight from the command line (replace the version):
curl -LO https://maven.neoforged.net/releases/net/neoforged/neoforge/21.1.265/neoforge-21.1.265-installer.jar
Step 3: Run the installer in server mode
Open a terminal in that folder and run:
java -jar neoforge-21.1.x-installer.jar --installServer
Replace 21.1.x with your actual file name. The installer downloads the vanilla server and libraries and patches everything. When it finishes you'll have:
run.sh(Linux/macOS) andrun.bat(Windows)user_jvm_args.txt- a
librariesfolder
You can delete the installer jar and its .log afterward.
By default NeoForge launches through these run scripts, which pass the right arguments file from libraries. (The installer's window also has a "server starter jar" option if a host needs a single jar, but the run scripts are the standard way.)
Step 4: Set your RAM
Open user_jvm_args.txt and add your memory flags on their own line:
-Xms6G
-Xmx6G
As a rough guide: 4-6 GB for a light pack, 8-10 GB for big kitchen-sink packs like ATM10. Leave some memory outside the heap if your host has a hard memory limit.
Step 5: First launch and the EULA
Run the script:
- Linux/macOS:
chmod +x run.shthen./run.sh nogui - Windows: double-click
run.bat, or run it from a terminal
The first run stops and asks you to accept the EULA. Set eula=true in eula.txt, then start it again. Once you see Done in the console, the server is up.
Step 6: Add mods or a modpack
Adding individual mods
- Download the NeoForge build of each mod for your exact Minecraft version.
- Drop the
.jarfiles inmods. - Leave out client-only mods like minimaps, shader loaders and Sodium/Embeddium-style renderers. If a mod page says "client side only", it does not go on the server.
Setting up a modpack
Most packs publish a Server Pack download. Use it if one exists, because it already strips client-only mods and often includes its own install script. If there isn't one:
- Install NeoForge as above, matching the pack's NeoForge version.
- Copy
mods,config,defaultconfigsandkubejs(if present) from the client pack into the server folder. - Remove client-only mods. If the server crashes with a mention of client classes like
net/minecraft/client, the mod named in the crash is the culprit.
Players need the same pack (same version) installed through their launcher.
Updating NeoForge
- Back up the whole server folder, especially the world.
- Download the newer installer for the same Minecraft version and run
--installServerin the same folder. It replaces the old version's libraries and run scripts. - Start the server and check the console.
Don't jump Minecraft versions this way (for example 1.21.1 to 26.3) on a modded world. Mods have to support the new version first.
Running it for friends
- Open the port: allow port 25565 (TCP) in your firewall and forward it on your router.
- Restart regularly: a daily restart (cron on Linux, Task Scheduler on Windows) keeps a busy modded server healthy.
- Keep it online: a home server only runs while your PC is on. See how to keep a Minecraft server online 24/7.
Common NeoForge server problems
UnsupportedClassVersionError-> wrong Java. Use Java 21 for 1.21.x and Java 25 for 26.x.- "Could not find or load main class" / missing
unix_args.txt-> thelibrariesfolder is incomplete or was moved. Rerun the installer with--installServerin the server folder. - "Mod X requires neoforge 21.1.y or above" -> update NeoForge to at least that version by rerunning a newer installer.
- Crash mentioning a Forge mod -> you've got a Forge-only jar in
mods. Swap it for the NeoForge build. - Players get a mismatched mod list on join -> client and server mod versions differ. Re-sync the pack.
Easier: let FreaksMC do it
On FreaksMC, NeoForge is a one-click loader switch in our custom panel, and the panel automatically picks Java 21 (or 8, 17 or 25 when other versions need it). No run scripts, no user_jvm_args.txt editing. Better yet, we install modpacks for free, so you can tell us which pack you want and it'll be ready to join. Check out our modpack hosting.
Modpack plans run $14-36/mo on AMD EPYC hardware with NVMe storage, plus an Extra RAM add-on for heavy packs, backup slots and real human support. Every first order has a 24-hour money-back guarantee you trigger yourself. See pricing.
Want a server that just runs fast?
FreaksMC runs on NVMe hardware with performance-tuned defaults baked in - pre-optimized Paper, sane view distances, and one-click world pre-generation. Set up in 60 seconds.
See plans from $3/mo