DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk12 min

How to Set Up a Modded Minecraft Server on Linux (Fabric or Forge)

A practical Linux guide to choosing Fabric or Forge, installing the matching Java runtime, accepting the EULA, adding compatible mods, supervising the server, and letting friends connect safely.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A reliable modded Minecraft server on Linux comes down to matching four things: the Minecraft release, the mod loader, the Java runtime, and every mod installed on the clients and server. Create a dedicated non-root account, install the Java version required by that release, run the official or loader server launcher once, accept Mojang’s EULA, add a version-matched mod set, then supervise the process and expose only the configured port.

This guide covers Fabric and Forge, local and internet play, first boot, firewall and router setup, systemd supervision, backups, upgrades, and the errors that stop most new servers.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What you need before installing anything

Decide the exact Minecraft version and loader first. A mod built for one release or loader is not automatically usable on another. Write down the target release (for example, a specific 1.20.x build), whether you will use Fabric or Forge, and the modpack or individual mods you intend to run. Use the same decisions when configuring every player’s client.

  • A 64-bit Linux installation with shell access and enough disk space for the world, logs, backups, and downloaded libraries.
  • A separate service account that does not have administrative privileges.
  • A compatible 64-bit Java runtime. Fabric recommends Java 17 for Minecraft 1.17–1.20.4 and Java 21 for Minecraft 1.20.5 and newer. Forge’s requirement depends on the Minecraft generation and loader build, so check the documentation shipped with the exact Forge release.
  • The official Minecraft: Java Edition server JAR, or the selected Fabric or Forge server installer/launcher.
  • Permission to change the Linux firewall and, for internet play, the router that sits in front of the server.

Mojang’s server software is for Minecraft: Java Edition; it does not run Bedrock Edition clients. A server can be reachable from the same home network without router forwarding, but players outside that network normally need a forwarded port and a reachable public address.

#1 Best Overall
Minecraft | Java & Bedrock Deluxe Collection | Windows Digital Code
  • DELUXE COLLECTION — Includes Minecraft: Java & Bedrock Edition, three Bedrock add-ons, three exclusive Character Creator items, and 700 Minecoins.
  • CREATE YOUR WORLD — Build whatever you imagine in an infinite world that’s unique in every playthrough.
  • EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world filled with surprises.
  • SURVIVE THE ADVENTURE — Face mysterious foes, travel across exciting landscapes, and venture into perilous dimensions.
  • PLAY TOGETHER — Play cross-platform with friends in Bedrock Edition on console, mobile, and PC, or join community servers in Java Edition on PC, Mac, and Linux. Online console multiplayer requires a platform-specific subscription (sold separately).

Choose Fabric or Forge deliberately

Fabric and Forge are separate mod-loader ecosystems. A Fabric mod cannot be assumed to run on Forge, and a Forge mod cannot be assumed to run on Fabric. Choose based on the exact release and the mods you need rather than on a general reputation for either loader.

Decision area Fabric Forge
Java guidance Java 17 for Minecraft 1.17–1.20.4; Java 21 for 1.20.5 and later, according to Fabric’s installation guidance. Requirements vary by Minecraft generation and Forge build; verify the selected release before installing Java.
Installation path Use the executable server launcher or a manual installation that creates fabric-server-launch.jar. Many mods also require Fabric API. Run the Forge installer with its server-install option; it creates a Forge-enabled server layout and launch files.
Mod placement Put compatible mod JARs and required libraries such as Fabric API in the server’s mods directory. Put Forge-compatible mod JARs in the Forge-enabled mods directory.
Client compatibility Players need the same Minecraft release, a compatible Fabric loader, and the client-side portion of the mod set. Players need the same Minecraft release, a compatible Forge build, and the matching client-side mod set.
Operational guidance The lightweight launcher is convenient for a hand-built server; keep its launcher and loader versions recorded for upgrades. Forge’s documentation emphasizes testing mods on a dedicated server rather than assuming a single-player test is sufficient.

Do not mix loader families in one installation. If a mod page lists only Forge, install Forge; if it lists only Fabric, install Fabric. When a pack author supplies a loader version, treat that version as part of the pack’s requirements.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install Java and verify the runtime

Use your distribution’s package manager where possible so security updates arrive normally. The package name differs by distribution; the important result is a 64-bit Java runtime whose major version matches the Minecraft and loader combination.

Debian or Ubuntu

sudo apt update
sudo apt install openjdk-17-jre-headless

For a Fabric server on Minecraft 1.20.5 or newer, install the Java 21 runtime instead:

sudo apt install openjdk-21-jre-headless

If both versions are installed, select the default with sudo update-alternatives --config java, or call the desired binary by its full path in your service definition.

Fedora, RHEL, or compatible distributions

sudo dnf install java-17-openjdk-headless

Use the corresponding Java 21 package for releases that require Java 21. Package naming and repository availability can differ on older distributions, so confirm that the command installs a 64-bit OpenJDK runtime.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Check the result

java -version
file "$(readlink -f "$(command -v java)")"

The first command must show the intended major version. The second should identify a 64-bit executable on a normal x86-64 host. If the server later reports UnsupportedClassVersionError, return to this check: the Java that starts the server, not merely a Java package installed on disk, is the one that matters.

Create a dedicated server account and directory

Never run a public game server as root. Create a service account with no interactive administrative privileges and give it ownership of one directory.

Rank #2
Minecraft | Java & Bedrock Ultimate Collection | Windows Digital Code
  • ULTIMATE COLLECTION — Includes Minecraft: Java & Bedrock Edition, five Bedrock add-ons, five exclusive Character Creator items, and 1000 Minecoins.
  • CREATE YOUR WORLD — Build whatever you imagine in an infinite world that’s unique in every playthrough.
  • EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world filled with surprises.
  • SURVIVE THE ADVENTURE — Face mysterious foes, travel across exciting landscapes, and venture into perilous dimensions.
  • PLAY TOGETHER — Play cross-platform with friends in Bedrock Edition on console, mobile, and PC, or join community servers in Java Edition on PC, Mac, and Linux. Online console multiplayer requires a platform-specific subscription (sold separately).
sudo useradd --system --create-home --home-dir /opt/minecraft --shell /usr/sbin/nologin minecraft
sudo mkdir -p /opt/minecraft
sudo chown -R minecraft:minecraft /opt/minecraft

Switch to that account for downloads and first-run commands:

sudo -u minecraft -H bash
cd /opt/minecraft

Keep separate subdirectories if you operate more than one instance, such as /opt/minecraft/fabric-1.20.4 and /opt/minecraft/forge-1.20.1. Each instance needs its own world, configuration, logs, and mod directory.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Download and install the selected server software

Obtain the server JAR or installer from the official Minecraft, Fabric, or Forge download page. Verify that the filename and release correspond to the version you chose, then place it in /opt/minecraft and keep the original filename stable. Do not download random reuploads or rename an installer so that you can no longer identify its version.

Vanilla launcher as a baseline

A vanilla server is useful for confirming Java, permissions, and networking before adding a loader. Copy the official server JAR into the directory and run it once:

java -Xms1G -Xmx2G -jar server.jar nogui

The memory values in this example are merely launch parameters; no universal memory amount is established for every modpack. Choose values appropriate to the pack and host, leaving memory for Linux and other services. If the downloaded file has a different name, use that exact name.

Fabric server

Fabric provides an executable server launcher and a manual installation path. With the Fabric installer JAR in the directory, a typical manual command is:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
java -jar fabric-installer.jar server -mcversion <minecraft-version> -downloadMinecraft

Replace the angle-bracketed value with the exact release you selected. The installer creates the Fabric launcher and supporting files. Fabric’s documented launch pattern is:

java -Xmx2G -jar <fabric-server-launcher-jar> nogui

Use the filename actually created in your directory. Many Fabric mods require Fabric API; install the API version that matches both the Minecraft release and the Fabric loader.

Rank #3
Minecraft | Standard Edition | XBOX Digital Code
  • CREATE YOUR WORLD — Build whatever you imagine in an infinite world that is unique in every playthrough.
  • EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world full of surprises.
  • SURVIVAL ADVENTURES — Face mysterious foes, travel across varied landscapes, and venture into perilous dimensions.
  • PLAY TOGETHER — Play solo or join friends in local split-screen and cross-platform play across console, mobile, and PC. Online multiplayer supports up to 8 players.
  • COMMUNITY PLAY — Connect with players on community servers, or subscribe to Realms Plus (sold separately) to play with up to 10 friends on a private server.

Forge server

Place the Forge installer JAR in the server directory and run its dedicated-server installation option:

java -jar forge-<version>-installer.jar --installServer

Forge creates a server layout and launch files for the selected release. Follow the generated instructions for the exact Forge build; do not substitute a generic launch command if the installer supplied one. Forge’s current getting-started material requires a 64-bit JVM.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run the first boot and accept the EULA

Start the selected launcher from the directory it owns. The first run normally creates eula.txt, server.properties, a world directory, logs, and loader-specific files, then stops because the EULA has not been accepted.

cd /opt/minecraft
java -jar <your-launcher-jar> nogui

Read Mojang’s EULA before changing the file. If you agree to it, edit only the value in eula.txt:

sed -i 's/^eula=false$/eula=true/' eula.txt

Inspect the file afterward to ensure it contains eula=true, then start the same launcher again. A server that immediately stops and mentions the EULA is behaving as designed; it will not continue until the value is accepted.

Configure server.properties safely

Stop the server cleanly before editing configuration. Use the console command stop, wait for the save to finish, and then open server.properties. Make one change at a time and keep a copy of the working file.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Core settings to review

  • motd: the text shown in the multiplayer list.
  • difficulty: choose the intended gameplay difficulty.
  • max-players: the connection limit you want to enforce; do not treat it as a performance guarantee.
  • level-seed: leave blank for a random seed or enter a deliberate seed before the world is generated. Changing it later does not retroactively reshape an existing world.
  • view-distance and related simulation settings: balance exploration range against CPU, memory, and network work.
  • white-list: enable it when only named players should join, then add users from the console with whitelist add <name>.
  • server-port: the TCP port on which the Java server listens. The default is 25565; confirm the actual value before changing firewall or router rules.
  • server-ip: normally leave this blank so the process binds to the host’s available interfaces. Entering an incorrect address can prevent startup.

Keep the file’s online-mode setting appropriate for an authenticated Java server. Changing authentication behavior has security and account-identity consequences and should not be used as a casual connection fix.

Install and validate mods

Build the mod set from the exact Minecraft and loader versions. Read each mod’s dependency list and distribution notes, then place only the server-compatible JARs in the loader’s mods directory.

Rank #4
Minecraft
  • Skins! We have biome settlers, city folk, town folk, and more!
  • The Nether and all its inhabitants. Fight Ghasts and make friends with Pigmen
  • Cross platform play for up to five players between Pocket Edition and Windows 10
  • Revamped touch controls, controller support, and a controller mapping screen
  • Enhanced Weather effects! Accumulating snow and more
  1. Stop the server and make a backup of the world and configuration.
  2. Create or verify /opt/minecraft/mods with ownership assigned to the service account.
  3. Copy the loader-compatible mods and required libraries, such as Fabric API when a Fabric mod requires it.
  4. Remove client-only features from the server unless the mod explicitly documents dedicated-server support.
  5. Start the server and watch the log from the first line through world loading.
  6. Connect with a client that has the matching loader, Minecraft release, and required client-side mods.

When a loader reports a missing class, rejected mod, or dependency conflict, do not add random library versions. Compare the error with the mod’s declared Minecraft version, loader range, and dependency version, then correct the set as a group. A client-only minimap, shader component, or visual enhancement may belong only on clients; copying it to the server can stop startup.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run the server under systemd

A terminal session is useful for initial testing, but a long-running server should have a restart policy, a predictable working directory, and logs available through the journal. The official loader documentation does not prescribe one universal systemd unit, so treat this as an operational pattern that you should adapt and test.

Create /etc/systemd/system/minecraft.service as root:

[Unit]
Description=Modded Minecraft Java server
After=network-online.target
Wants=network-online.target

[Service]
User=minecraft
Group=minecraft
WorkingDirectory=/opt/minecraft
ExecStart=/usr/bin/java -Xms1G -Xmx2G -jar fabric-server-launch.jar nogui
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

For Forge, replace the ExecStart command with the launch command generated for your Forge installation. Use the full Java path selected during your version check. Then load and start the unit:

sudo systemctl daemon-reload
sudo systemctl enable --now minecraft
sudo systemctl status minecraft
journalctl -u minecraft -f

Do not use automatic restarts to hide a configuration failure. If the process loops, stop the unit, read the first meaningful exception in the journal, fix the underlying version or file problem, and start it again.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Open the firewall and connect from outside your network

First confirm that the process is listening on the configured port:

ss -ltnp | grep 25565

Replace 25565 if server-port uses another value. Open that TCP port on the Linux host firewall. With UFW, for example:

sudo ufw allow 25565/tcp
sudo ufw status

On systems using firewalld, add the equivalent permanent TCP rule and reload the firewall. Use the tool your distribution already manages; avoid running multiple firewall managers that overwrite one another.

Best Value
Minecraft - Bedrock Edition PS4
  • Play and share with friends on console, mobile and Windows 10
  • discover community creations in the new in-game store
  • access new mini games and game modes through servers

For friends on the internet, create a router port-forward from the public WAN address and chosen external port to the Linux host’s fixed LAN address and the same internal port. Reserve the host’s LAN address with a DHCP reservation or configure a stable address so the forwarding rule does not follow a different device. Give players your public address and port, not the private address beginning with ranges such as 192.168.x.x or 10.x.x.x.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If local players can connect but remote players cannot, test in this order: confirm the server is running, verify the listening port, check the host firewall, check the router’s forwarding target and protocol, and confirm the address players are using. Some internet providers place customers behind carrier-grade NAT; in that case, ordinary inbound forwarding may not be possible without a provider option or a different network design.

Back up worlds, configs, and mods

A modded world is a collection of files, not just the visible world folder. Schedule backups that include the world directories, server.properties, eula.txt, loader files, the mods directory, and any custom configuration directories.

  • Stop the server or use a documented save-and-copy procedure so region files are not captured mid-write.
  • Keep multiple dated generations rather than overwriting one archive.
  • Store at least one copy outside the server machine.
  • Record the Minecraft version, loader build, Java major version, and mod filenames alongside each backup.
  • Periodically restore a copy to a separate directory; a backup that has never been restored is only an assumption.

Upgrade without destroying the world

Do not upgrade Minecraft, the loader, and every mod at once. Before any change, stop the service and make a verified backup. Record the current versions and copy the working configuration.

  1. Test the target Minecraft release and loader in a separate directory.
  2. Update the loader only when it supports the target release.
  3. Update required libraries and mods one at a time or according to the pack author’s tested set.
  4. Start the test instance and inspect the complete log for dependency, registry, or data-fix errors.
  5. Only after the test succeeds, schedule downtime, replace the production files, and keep the old installation available for rollback.

World formats and mod-generated blocks or items can make downgrades unsafe. Preserve the old world and binaries until players have confirmed that the upgraded instance works.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshoot the failures you are most likely to see

UnsupportedClassVersionError

The launcher was compiled for a newer Java class-file version than the runtime starting it. Run java -version as the same user and through the same path used by systemd, then install or select the Java major version required by the Minecraft release and loader.

The server stops and mentions the EULA

Open eula.txt, read the license, and change eula=false to eula=true only if you accept it. Save the file in the server directory owned by the service account and restart the launcher.

Missing classes, rejected mods, or dependency errors

Check all four identifiers: Minecraft release, loader build, mod version, and required library version. Confirm that a client-only mod was not copied to the server and that Fabric API is present when a Fabric mod requires it. Remove the newest addition temporarily to isolate the conflict.

Friends cannot connect

Confirm the process is listening on the configured server-port, allow that TCP port through the Linux firewall, verify the router forwards to the correct LAN address, and ensure players use the public address and correct port. A successful local connection does not prove that internet forwarding works.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The server crashes after an upgrade

Stop it, restore the last known-good world and configuration backup, and compare the recorded loader and mod versions with the new set. Reintroduce changes one component at a time while reading the first stack trace rather than repeatedly restarting a broken service.

Quick Recap

Bestseller No. 4
Minecraft
Minecraft
Skins! We have biome settlers, city folk, town folk, and more!; The Nether and all its inhabitants. Fight Ghasts and make friends with Pigmen
$6.99
Bestseller No. 5
Minecraft - Bedrock Edition PS4
Minecraft - Bedrock Edition PS4
Play and share with friends on console, mobile and Windows 10; discover community creations in the new in-game store
$42.98

Final pre-launch checklist

  • The target Minecraft release and loader are written down.
  • The Java major version matches that release; the runtime is 64-bit.
  • The server files are owned by a non-root service account.
  • The first run created the expected files and the EULA was accepted knowingly.
  • server.properties has the intended whitelist, port, seed, difficulty, and view distance.
  • Every mod matches the exact Minecraft release and loader, with required libraries installed.
  • The server starts cleanly under systemd or another supervisor, and logs are accessible.
  • Backups include worlds, configs, loader files, and mods, with a tested restore.
  • The host firewall and, when needed, router forwarding use the actual configured port.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.