Server setup
How to Install a Forge Server
Vanilla won't run mods. A Forge server does the heavy lifting: you run the installer with --installServer, accept the EULA, drop your mods into /mods, and watch the console report Loading N mods before it prints Done. Here is the exact sequence, with the two errors everyone hits.
forge-1.20.1, server console
~/forge $ java -jar forge-installer.jar --installServer
Extracting main jar:
Downloading library net.minecraftforge:fmlcore
Downloading library net.minecraftforge:javafmllanguage
Successfully installed server into this directory
~/forge $ java -Xmx4G -jar forge-server.jar nogui
[main/ERROR]: Failed to load eula.txt, you need to agree to the EULA
~/forge $ sed -i 's/eula=false/eula=true/' eula.txt
[Server thread/INFO]: Loading 6 mods:
- minecraft 1.20.1 - forge 47.2.0
- jei 15.2.0.27 - create 0.5.1
[Server thread/INFO]: Preparing level "world"
[Server thread/INFO]: Done (18.402s)! For help, type "help"
~/forge $
The install in one pass
Work in a fresh, empty directory. Run java -jar forge-1.20.1-47.2.0-installer.jar --installServer and wait for Successfully installed server into this directory. Start it once with java -Xmx4G -jar <server-jar> nogui so it generates eula.txt, flip eula=false to eula=true, then start again. On modern versions (1.17+) launch through run.sh and set memory in user_jvm_args.txt. Add server-side mods to /mods, restart, and confirm the Loading N mods list matches your client.
Quick answers
+Why does the server stop on the first launch?
Forge cannot run until you agree to Mojang's EULA. The first boot generates eula.txt with eula=false. Change it to eula=true and start again. This is normal, not an error.
+What does --installServer actually do?
It runs the installer in headless mode: it downloads Forge's libraries, the vanilla server jar, and writes the run scripts (run.sh / run.bat) plus a user_jvm_args.txt. It does not start the server.
+Why won't my mods load?
Every mod must match the Minecraft AND Forge version, and must be a server-compatible build. Client-only mods (shaders, minimaps) crash a dedicated server. Check the latest.log line that names the failing mod.
+How much RAM should I give a Forge server?
Start at -Xmx4G for a small modpack and 6-8G for heavy packs like All the Mods. Never set -Xmx above your machine's physical RAM, and leave headroom for the OS.
+Modern Forge (1.17+) uses run.sh instead of a single jar?
Yes. From 1.17 onward Forge boots through run.sh / run.bat which reads user_jvm_args.txt. Put your memory flags there (-Xmx6G) rather than editing the command each time.
+My client can't join the modded server.
The client must run the identical Forge version and the same set of mods that have a client side. Mismatched mod lists are rejected at the handshake. Match the modpack exactly on both ends.
Guides that go with this one
How to Make a Minecraft Server (Java, 2025)
Set up your own Minecraft Java server from scratch: install Java, run the Paper jar, accept the EULA,...
How to Add Mods to a Minecraft Server
Install mods on a Forge or Fabric server: pick a loader, drop jars in the mods folder, match every...
How to Change the Time With Commands in Minecraft
Use /time set day, night, and midnight plus /time add to control the day-night cycle on your Minecraft...
How to Set Up a NeoForge Server Properly
Step-by-step guide to setting up a NeoForge server properly, covering installer usage, Java 21...
How to Run Mixed Forge/Fabric Server (Sinytra Connector)
Guide to setting up a Sinytra Connector server that runs Fabric mods on Forge, covering installation,...
How to Use the Teleport Command in Minecraft
Use /tp and /teleport to move players to another player, to exact coordinates, or with relative ~ ~ ~...