Our server Your next world? minecraft.pl Join
Discord
Our server Adventure? Jump in with us. minecraft.pl • Java & Bedrock Join the game
Servers - Guides

How to set up a modded Minecraft server

Want to play modded Minecraft with your friends? A modded server is a completely different challenge from a regular survival server: you need the right loader (Forge, Fabric or NeoForge), hardware with plenty of spare RAM and some patience during setup. This guide walks you through the whole process step by step.

What a modded server is

A modded server is a Minecraft server extended with extra content in the form of mods: .jar files that change the game at the code level. Unlike plugins (which run only on the server and change game mechanics), mods usually add new blocks, items, biomes, mobs and entire game systems. They have to be kept in sync between the server and every player.

On a modded server you can run packs like Feed The Beast, All The Mods or RLCraft: thousands of hours of extra content that vanilla Minecraft simply doesn't offer. Popular server mods include Tinkers' Construct (advanced tools), Mekanism (tech and power), Biomes O' Plenty (new biomes) and Create (rotational mechanics).

The key difference from a regular survival server: every player must have exactly the same mods installed as the server. Otherwise the connection won't work.

Forge vs Fabric vs NeoForge: comparison

Choosing a mod loader is your first and most important decision. Each loader has a different mod base, different performance and a different level of community activity.

Feature Forge Fabric NeoForge
MC versions 1.1 - 1.21+ 1.14 - 1.21+ 1.20.1 - 1.21+
Mod base Largest (years of history) Large, growing fast Growing (Forge fork)
Performance Average Very good Better than Forge
Server startup time Long (3-10 min) Short (30-90 s) Medium (2-5 min)
Classic modpacks Yes (FTB, ATM, RLCraft) Partly Yes (new modpacks)
Optimization mods Embeddium, Rubidium Sodium, Lithium, Starlight Embeddium
Active development Yes (slower) Very active Very active

Our recommendation: if you want to run a ready-made modpack (e.g. ATM9, RLCraft, Valhelsia), check which loader it needs. If you're building your own pack for newer versions, consider NeoForge or Fabric. Forge remains the best choice for legacy modpacks (1.12.2, 1.16.5).

Hardware requirements

A modded server is far more demanding than vanilla. Mods add extra calculations, blocks, entities and processes: the more mods, the harder the server works the CPU and RAM.

RAM: minimum and recommended amounts

  • Small pack (up to 50 mods): 4 GB RAM, e.g. a simple tech or RPG pack
  • Medium pack (50-150 mods): 6-8 GB RAM, e.g. SkyFactory 4, Valhelsia 3
  • Large pack (150-400 mods): 8-12 GB RAM, e.g. All The Mods 9, FTB Revelation
  • Very large pack (400+ mods): 12-16 GB RAM, e.g. ATM8-ATM10, Tekkit Legends

These amounts are for a server with no players on it. Each extra player online adds about 500 MB-1 GB of RAM load, depending on what they're doing.

CPU and storage

Minecraft is largely single-threaded: what matters is single-core speed, not the number of cores. A good processor with a high clock speed (e.g. Ryzen 5 5600X, Intel i5-13600K) will handle more players than a 16-core server with a low clock speed. An SSD (ideally NVMe) is strongly recommended, because generating chunks with lots of mods is very I/O intensive.

Note: On a home computer, run the server instead of playing, not while you play, unless you have 32+ GB of RAM and a strong CPU. Hosting and playing on the same machine at the same time is a recipe for lag for everyone.

Installing a Forge server step by step

Forge is the oldest and best-known loader. Installing a Forge server is different from installing the client: you download an installer file that generates the server files.

Step 1 - Download the Forge installer

Go to files.minecraftforge.net, pick a Minecraft version (e.g. 1.20.1) and click Installer next to the build you want. Download the forge-1.20.1-XX.X.X-installer.jar file. You need Java 17 (for MC 1.17-1.20) or Java 21 (for MC 1.21+). Check your version with: java -version

Step 2 - Run the installer in server mode

Create a new empty folder for the server, copy the installer into it and run:

java -jar forge-1.20.1-XX.X.X-installer.jar --installServer

The installer downloads the Minecraft and Forge files and generates the server structure. This can take a few minutes.

Step 3 - Accept the EULA

After the installation you'll find an eula.txt file. Change eula=false to eula=true in it. Without this, the server won't start.

Step 4 - Create a start script

Newer Forge versions come with a run.sh (Linux/Mac) or run.bat (Windows) file: use them directly. On older versions, create your own script:

On Windows, create a start.bat file:

java -Xmx6G -Xms2G -jar forge-1.20.1-XX.X.X-server.jar nogui
pause

Replace 6G with the amount of RAM you want to give the server. More on JVM flags in the Performance and RAM section.

Step 5 - First launch

Run the start script. The Forge server downloads all the libraries it needs (this can take up to 10 minutes on the first launch) and generates the default world. When you see Done! For help, type "help", the server is ready.

Installing a Fabric server

Fabric is lighter and faster than Forge. Installing it is simpler: there's no separate Fabric server file; instead, Fabric works as a loader that runs through the standard Minecraft jar.

Step 1 - Download the Fabric installer

Go to fabricmc.net/use/server. Pick the Minecraft version and the Fabric Loader version, then click Download server jar. This downloads a fabric-server-mc.X.XX-loader.X.X.X-launcher.X.X.X.jar file.

Step 2 - Run the installer

Create a folder for the server, copy the downloaded file into it and run:

java -jar fabric-server-mc.X.XX-loader.X.X.X-launcher.X.X.X.jar server -downloadMinecraft

The -downloadMinecraft flag automatically downloads the matching Minecraft server file. The installer generates the Fabric server directory structure.

Step 3 - Accept the EULA and start the server

Change eula=false to eula=true in the eula.txt file, then create a start script:

java -Xmx4G -Xms2G -jar fabric-server-launch.jar nogui

A Fabric server starts much faster than Forge, usually in 30-90 seconds.

Step 4 - Add Fabric API

Most Fabric mods need the Fabric API library. Download it from Modrinth or CurseForge and put it in the mods/ folder. It's the Fabric counterpart to the Forge API: without it, most mods won't work.

Installing a NeoForge server

NeoForge is a fork of Forge started in 2023. Installing it is very similar to Forge, since NeoForge is practically a drop-in replacement.

Step 1 - Download the NeoForge installer

Go to neoforged.net or download it from Modrinth. Pick a version (NeoForge is available from MC 1.20.1) and download the neoforge-XX.X.X-installer.jar installer.

Step 2 - Install the server

Same as with Forge:

java -jar neoforge-XX.X.X-installer.jar --installServer

The installer downloads all the dependencies and generates the run.sh / run.bat start scripts.

Step 3 - Configure and start

Accept the EULA, edit the start script (adjust the RAM) and run it. NeoForge starts faster than classic Forge and manages memory better. Mods written for Forge 1.20.1 often work on NeoForge without changes, but always check the mod's page.

NeoForge vs Forge: If you're building a server from scratch on 1.20.1 or newer, NeoForge is the better choice: more active development, faster security patches and better compatibility with new versions. Old modpacks made for Forge (e.g. 1.12.2) need Forge itself; NeoForge won't run them.

Installing mods on the server

Whatever the loader, you install mods the same way: copy the mod's .jar file into the mods/ folder in the server directory. The server loads them on the next start.

Where to download mods

  • Modrinth (modrinth.com): a modern platform with strict malware checks, recommended
  • CurseForge (curseforge.com): the biggest mod library, older projects
  • GitHub Releases: straight from the mod developers

Never download mods from random websites: the malware risk is real. Stick to Modrinth and CurseForge.

Server-only vs client-side mods

Not every mod has to be installed on both the server and the client:

  • Mods required on both sides (required): most mods that add blocks, items or mobs, e.g. Tinkers' Construct, Mekanism, Create. They must be on the server AND on the client in the same version.
  • Server-only mods (server-side): e.g. Chunky (world pre-generation), ServerCore. Players don't need them.
  • Client-only mods (client-side): e.g. OptiFine, Xaero's Minimap, JEI (Just Enough Items, which also works without the server having it). You can have them on your client even if the server doesn't.

Check the mod's description: developers usually state clearly which side it's needed on.

Mod compatibility

Every mod must be built for exactly the same Minecraft and loader version as your server. A mod made for Forge 1.20.1 won't work on Fabric 1.20.1 or on Forge 1.19.4. Always check the version before you download.

When building your own modpack, test compatibility regularly: some mods conflict with each other and crash the server. Add mods a few at a time and restart the server after each batch, so you can easily pin down the problem.

Server configuration

server.properties

The server.properties file controls the server's basic settings. The key options for a modded server:

  • max-players=10: the limit of players online (match it to your server's power)
  • view-distance=8: chunk loading range; lower it to 6-8 on weaker hardware
  • simulation-distance=6: simulation range (tick rate); lower it for better performance
  • online-mode=true: leave it on true for security (requires a genuine copy of Minecraft)
  • difficulty=normal: Normal difficulty
  • spawn-protection=0: turns off spawn protection (optional, for PvP)

Mod configuration

After the server's first start, every mod generates its own config file in the config/ folder. The format depends on the mod, usually TOML or JSON. That's where you adjust the mod's settings: for example how tough the mod's mobs are, which resources generate in the world, or whether specific features are turned on.

Always read the mod's documentation before editing configs: wrong values can stop the server from starting.

Modpacks on a server: CurseForge and Modrinth

Ready-made modpacks are the easiest way to run a modded server. Instead of picking and configuring dozens of mods by hand, you download a single pack that contains everything with a tested configuration.

Modpacks from CurseForge

Most popular modpacks (All The Mods, FTB, RLCraft, SkyFactory) are available on CurseForge. Many of them offer a ready-made server pack:

  1. Find the modpack on CurseForge and go to the Files tab
  2. Look for a file with server or serverpack in its name
  3. Download the ZIP archive (.zip)
  4. Extract it to a new folder
  5. Run the included install script (usually install.sh or startserver.bat)

The server pack contains all the mods, configs and a start script ready to use.

Modpacks from Modrinth

Modrinth uses the .mrpack format for modpacks. You can install them with the mrpack-install tool:

./mrpack-install server modpack.mrpack

The tool automatically downloads all the mods from Modrinth and sets up the server structure. It's faster and doesn't require copying files by hand.

Important with modpacks: client vs server

The client pack and the server pack are different: the server pack doesn't include client-side mods (rendering, UI and client-side optimization mods). Joining players must install the client version, not the server one. Use the same modpack, just download the client version from CurseForge/Modrinth through a launcher.

Pro tip: The popular Prism Launcher installs modpacks from CurseForge and Modrinth in a few clicks. Instead of explaining to players how to install mods by hand, just send them the link to the modpack on Modrinth/CurseForge and tell them to install it through Prism Launcher.

Port forwarding and outside access

If you host the server at home, you have to set up port forwarding on your router so that players outside your network can connect.

The default Minecraft port

TCP port: 25565. You can change it in server.properties (the server-port option), but 25565 is the standard: with it, players can enter just the IP address without a port number.

Router setup

  1. Open your router's admin panel (usually 192.168.1.1 or 192.168.0.1)
  2. Find the Port Forwarding section (sometimes called NAT, Virtual Server or Applications)
  3. Add a rule: external port 25565, internal port 25565, protocol TCP, internal IP set to the IP of the computer running the server
  4. Save the changes. You may need to restart the router

Players from outside connect using your external IP, which you can check on whatismyip.com. Note: your external IP can change (dynamic IP). Consider a free Dynamic DNS service (e.g. No-IP) or an ngrok tunnel.

Alternative: playit.gg or ngrok

If you don't want to configure your router, or your internet provider blocks ports, use playit.gg. It's a free tunnel made specifically for Minecraft servers. You install a small client on the server and get a permanent domain address without touching your router.

What joining players need to do

This is an important point that raises a lot of questions: a player without the right mods can't connect to a modded server. Here's what people joining need to do:

Installing the same modpack

The simplest solution is to share the modpack through CurseForge or Modrinth. Players:

  1. Download Prism Launcher or the CurseForge Launcher
  2. Search for your modpack (or import the .mrpack file you send them)
  3. Install it: the launcher automatically downloads Forge/Fabric/NeoForge and all the mods
  4. Launch the game and connect to your server

Installing mods by hand

If you don't have a ready-made modpack, players have to install the same mods as the server by hand:

  1. Install the same loader (e.g. Forge 47.2.0 for MC 1.20.1, exactly that version)
  2. Copy all the mods from the server's mods/ folder into their own mods/ folder
  3. Optionally add client-side mods (OptiFine, a minimap): the server will ignore them

The most common connection error

The message "Forge mod rejection" or "missing mods" means the player doesn't have all the required mods (or has the wrong versions). Check the player's game log: it lists the mods that are missing or in the wrong version.

Performance, RAM and JVM flags

With a poor JVM (Java Virtual Machine) configuration, a modded server can lag even on strong hardware. The right startup flags can noticeably improve stability and shorten GC (garbage collection) pauses.

How much RAM to allocate

The basic rule: allocate as much as you need, but not too much. A heap that's too large causes longer GC pauses. For a machine with 6 GB of RAM in total, give the server 4-5 GB at most.

  • -Xms: the minimum (starting) amount of RAM. Set it to about half of Xmx, so the server doesn't eat up memory at startup
  • -Xmx: the maximum amount of RAM. This is your main setting

Aikar's Flags: the best JVM flags for modded servers

Aikar's Flags are a proven set of JVM options that tune the G1GC garbage collector for Minecraft servers. For a server with 8 GB of RAM:

java -Xms8G -Xmx8G -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 -jar server.jar nogui

Replace 8G with the amount of RAM you want, and server.jar with the right server file.

Optimization mods for the server

Instead of (or on top of) JVM tuning, add mods built for server performance:

  • Forge/NeoForge: Canary, FerriteCore (lowers RAM usage), Radium, EntityCulling
  • Fabric: Lithium (general optimization), FerriteCore, Starlight (lighting), C2ME (multi-core chunk generation), ServerCore

FerriteCore is especially recommended for big packs: it can cut RAM usage by 20-40%.

Pre-generating the world

Before players start playing, generate the world in advance. Generating chunks during play puts a heavy load on the CPU and causes lag. Use the Chunky mod (available for Fabric and Forge) to generate an area of e.g. 5000x5000 blocks before you open the server. On a big server pack this can take a few hours, but gameplay will be much smoother afterwards.

Common errors and how to fix them

Crash on startup: "A fatal error has occurred"

The most common cause: a conflict between mods or an incompatible mod version. Check the crash-reports/ folder in the server directory. The last "Caused by" line points to the culprit. Remove the most recently added mods and restart the server, narrowing it down by elimination.

"java.lang.OutOfMemoryError"

Not enough RAM. Raise the -Xmx value in the start script. If you can't add more RAM, trim the modpack, add FerriteCore and limit view-distance to 6.

Server not responding: "Can't keep up"

The server can't keep up with processing ticks (normally 20 TPS). Causes: not enough CPU, too many players, a view distance that's too high, lag machines in the world or poorly optimized mods. Lower view-distance and simulation-distance and add optimization mods.

Players can't connect after you mod the server

Check that the clients have identical mods. The server sends a list of required mods: compare it with what the player has. The quickest fix: prepare a downloadable mod pack as a ZIP archive containing the mods/ folder.

The world doesn't generate / biomes are wrong

Mods that change world generation (Biomes O' Plenty, Terraforged, TerraBlender) need to be set in server.properties: level-type=biomesoplenty:bcl_biomes (example). Check the documentation of the specific world generation mod.