How to Create a Modded Minecraft Server with Forge
Want to play with mods like Better Minecraft, RLCraft, or your own custom pack? This guide walks you through setting up a Forge server from scratch.
What is Forge?
Forge is a modding API that allows you to run mods on your Minecraft server. It's required for most popular modpacks and custom modded experiences.
Alternatives:
- >Fabric - Lighter weight, faster updates
- >NeoForge - Modern Forge fork (1.20.2+)
Prerequisites
Before starting, ensure you have:
- >Java 17 or newer (Java 21 recommended for 1.20+)
- >At least 6GB RAM for the server
- >Basic command line knowledge
- >A copy of each mod (client and server versions)
Checking Your Java Version
Windows:
java -version
Mac/Linux:
java -version
You should see something like:
openjdk version "21.0.2" 2024-01-16
If you need to install or update Java, download from Adoptium.
---
Step 1: Download Forge
Find the Right Version
Run the Installer
.jar fileWhat gets installed:
- >
forge-1.20.4-xxx.jar- The Forge server file - >
libraries/folder - Required libraries - >
run.bat/run.sh- Startup scripts
Step 2: First Server Start
Windows Setup
Run the run.bat file or create a custom start script:
start.bat:
@echo off
java -Xmx8G -Xms8G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar forge-1.20.4-*-server.jar nogui
pause
Linux/Mac Setup
start.sh:
#!/bin/sh
java -Xmx8G -Xms8G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar forge-1.20.4-*-server.jar nogui
Make it executable:
chmod +x start.sh
./start.sh
First Run
stop in console)eula.txt and change eula=false to eula=true---
Step 3: Install Mods
Finding Mods
Download mods from trusted sources:
Server vs Client Mods
Server-side only (doesn't need client install):
- >Performance mods (Spark, Phosphor)
- >Admin tools (LuckPerms, CoreProtect)
- >World management (WorldEdit)
- >Shaders (Optifine, Iris)
- >Minimaps (JourneyMap - server optional)
- >UI improvements
- >Content mods (new items, blocks)
- >Tech mods (Create, Mekanism)
- >Magic mods (Botania, Ars Nouveau)
Installing Mods
.jar format)mods folderImportant: All players must have the exact same mods installed!
---
Step 4: Server Configuration
server.properties
Key settings for modded servers:
# Basic settings
server-name=My Modded Server
server-port=25565
max-players=20
# Performance for modded
view-distance=8
simulation-distance=6
max-tick-time=60000
# World settings
level-name=world
level-type=minecraft:normal
generate-structures=true
# Connection
online-mode=true
enable-query=true
Memory Allocation Guide
| Modpack Size | RAM Needed | Players |
|---|---|---|
| Light (50 mods) | 4-6 GB | 2-10 |
| Medium (150 mods) | 6-8 GB | 2-10 |
| Heavy (300+ mods) | 8-12 GB | 2-5 |
| Expert packs | 10-16 GB | 2-5 |
- >Frequent "can't keep up" warnings
- >High memory usage in
/spark sampler - >Chunk loading issues
- >Random crashes
Step 5: Performance Optimization
JVM Flags Explained
The flags in our start script optimize for Minecraft:
- >
-Xmx8G- Maximum memory - >
-Xms8G- Start with full memory - >
-XX:+UseG1GC- Modern garbage collector - >
-XX:+DisableExplicitGC- Prevent lag spikes
Mod-Specific Optimizations
Reduce tick-heavy features:
- >Lower mob caps in mod configs
- >Disable unnecessary world gen features
- >Use chunk loaders sparingly
config/
├── betterfps.txt
├── journeymap/
├── fertility.properties
└── [modname]/config.toml
Pre-generate Chunks
Reduce lag by pre-generating your world:
Using Chunky (recommended):
/chunky radius 5000/chunky start---
Step 6: Port Forwarding
Finding Your Local IP
Windows:
ipconfig
Mac/Linux:
ifconfig
ip addr show
Router Configuration
- >External Port: 25565
- >Internal Port: 25565
- >Protocol: TCP
- >Internal IP: Your computer's local IP
Get Your Public IP
Visit whatismyip.com to find your public IP.
Players connect using: your-public-ip:25565
---
Step 7: Common Issues & Solutions
Server Crashes on Start
Check:
Finding crash reports:
crash-reports/
├── crash-2024-01-15_10.30.00-server.txt
└── crash-2024-01-15_12.45.00-server.txt
"Missing Mods" Error
Players must have:
- >Same Forge version
- >Same mod versions
- >All required dependencies
mods folder with players or create a modpack.Extreme Lag
Quick fixes:
server.propertiesConnection Refused
Windows Firewall:
netsh advfirewall firewall add rule name="Minecraft" dir=in action=allow protocol=tcp localport=25565
---
Creating a Modpack
Manual Method
mods foldermods/modlist.html (optional)CurseForge Modpack
---
Recommended Modpacks
For Beginners
- >Better Minecraft - Vanilla+ with quality of life
- >All the Mods 9 - Kitchen sink pack
- >FTB Academy - Learning-focused
For Experienced Players
- >Create: Above and Beyond - Tech-focused
- >Roguelike Adventures and Dungeons - Adventure
- >Nomifactory - Tech expert
Hardcore Challenges
- >RLCraft - Brutal survival
- >Stoneblock 3 - Skyblock variant
- >Divine Journey 2 - Expert progression
Backup Strategy
What to Backup
world/ # World files
mods/ # Your mod collection
config/ # Server configs
server.properties
banned-players.json
banned-ips.json
ops.json
whitelist.json
Backup Script (Linux)
#!/bin/bash
DATE=$(date +%Y-%m-%d_%H-%M-%S)
tar -czf "backup_$DATE.tar.gz" world/ mods/ config/ server.properties
# Keep only last 7 backups
ls -t backup_*.tar.gz | tail -n +8 | xargs rm -f
---
Conclusion
You now have a fully functional modded Minecraft server! Remember:
- >Keep mods updated together
- >Monitor memory usage
- >Regular backups are essential
- >Share the exact modpack with all players
- >Install server management mods (LuckPerms, CoreProtect)
- >Set up automated backups
- >Consider a hosting provider for 24/7 uptime
- >Join modding communities for support