Menu
 

Modded Minecraft Server Won't Start: Client-Only Class Crashes (NeoForge & Fabric)

Modded Server Won't Start: Client-Only Class Crashes

Your modpack runs fine in single-player, you copy the same mods onto a dedicated server, and it dies during startup with a NoClassDefFoundError or a complaint about loading a class "for invalid dist DEDICATED_SERVER". This is one of the most common modded-server crashes filling NeoForge and Fabric bug trackers right now, and it almost always means the same thing: a client-only mod is sitting in your server's mods folder.

This guide explains why it happens, how to read the crash log to find the exact mod, how to bisect a large modpack, and how to tell the difference between a misplaced mod (your fault, easy fix) and a genuine mod bug (the developer's fault).

Last verified: June 14, 2026. Crash mechanism confirmed against current NeoForge and Fabric dedicated-server behavior and live issue reports.

Why This Happens: Client vs Dedicated Server "Sides"

Minecraft is split into two distributions ("dists" or "sides"):

  • Client - has rendering, GUIs, screens, sounds, key bindings, the whole graphics stack (everything under net.minecraft.client).
  • Dedicated server - headless. It runs the world and game logic but has no graphics classes at all. The net.minecraft.client package simply does not exist on a dedicated server.

A correctly written mod keeps its client-only code separated and guards it. On NeoForge/Forge that is the @OnlyIn(Dist.CLIENT) annotation (and dist checks); on Fabric it is a separate client entrypoint declared in fabric.mod.json. The server is told never to touch that code.

The crash happens when client-only code gets reached on the dedicated server anyway - because the mod is a client-only mod that was never meant to run server-side, or because a mod incorrectly references a client class from its common (both-sides) entrypoint. The server tries to load a class like net/minecraft/client/..., finds nothing there, and throws NoClassDefFoundError - or NeoForge stops it first with an "attempted to load class ... for invalid dist DEDICATED_SERVER" error.

What the Crash Looks Like

The tell-tale signatures, any of which point at this problem:

java.lang.NoClassDefFoundError: net/minecraft/client/... Attempted to load class net/minecraft/client/gui/screens/Screen for invalid dist DEDICATED_SERVER java.lang.NoClassDefFoundError: net/minecraft/client/renderer/...

The common thread is a class path containing net/minecraft/client/ (renderers, screens, GUI, particles) being loaded on a server that has no client side. If you see net.minecraft.client anywhere in a startup crash on a dedicated server, you are looking at this family of problem.

Not every NoClassDefFoundError is this. A missing library dependency (for example an Apache Commons class, or a required API mod that is absent) also throws NoClassDefFoundError, but the missing class will not be under net.minecraft.client. Read the actual class name before assuming.

How to Read the Log and Find the Offending Mod

Do not guess. The crash report names the culprit if you read it properly.

  1. Open the right file. Look in crash-reports/ for the latest crash-*.txt, or scroll the logs/latest.log to the first Caused by:/exception. The newest crash report is the one that matches this boot.
  2. Find the missing class. Confirm it is under net/minecraft/client/. That confirms it is a client-side class on a server.
  3. Walk the stack trace down to a mod package. Below the Minecraft class, the trace shows the mod code that referenced it - a package like com.somemod.client.SomeRenderer. That package name is your prime suspect.
  4. Use the mod table. NeoForge and Fabric crash reports include a list of loaded mods with their IDs, versions, and jar file names. Match the suspect package or mod ID to the jar file in mods/.
  5. Read the "mod loading errors" block. NeoForge in particular often prints a clear "invalid dist" message that names the mod and the class directly - sometimes you do not even need the stack trace.

Once you have the jar name, you know which file to pull out of mods/.

Some Mods Are Client-Only - and Must Not Be on the Server

A large category of mods exists purely to change what you see: minimaps, shader loaders, HUD/UI tweaks, dynamic lights, custom particles, sound packs, screenshot tools, control schemes. These are client-only mods. They have no server-side job, and several of them will crash a dedicated server outright if you copy them across.

The fix is simply to not install them on the server. They live only in your client's mods folder. The clean rule:

  • Client-only mods - on each player's machine only. Never in the server mods folder.
  • Server-only mods (some management/admin tooling) - on the server only.
  • Both-sides mods (most content/worldgen/mechanic mods) - on the server and every client, at matching versions.

If you are unsure which category a mod is in, check its page. Mod listings on the major platforms usually state whether the mod is required on the client, the server, or both. When the page says "client" only, keep it off the server.

Bisecting a Modpack

When you run a 150-mod pack and one of them crashes the server, you do not read every line - you bisect. This is binary search on your mods folder:

  1. Make a backup of the full mods/ folder.
  2. Move half the mods out to a temporary folder. Start the server.
  3. Still crashes? The offender is in the half that is still loaded. Starts cleanly? It is in the half you removed.
  4. Take the half that contains the offender, split it in half, and repeat.
  5. Each round halves the search. Even a huge pack narrows to one mod in a handful of restarts.

Watch for dependencies while bisecting. Removing an API/library mod (Fabric API, an architecture/core lib, a shared dependency) can make unrelated mods fail and throw you off. If pulling one mod causes a flood of new "missing dependency" errors, you removed a library, not the culprit - put it back and split differently.

Misplaced Mod vs Genuine Mod Bug

Once you have identified the single mod, decide which of two situations you are in:

  • Misplaced mod (your fix). The mod is documented as client-only (a minimap, shader loader, HUD tweak, etc.). It was never meant for the server. Remove it from mods/ and you are done - no bug report needed.
  • Genuine mod bug (the developer's fix). The mod is documented to work on dedicated servers, yet it still reaches a net.minecraft.client class at server load. That means the developer failed to guard client code behind @OnlyIn(Dist.CLIENT) or a Fabric client entrypoint - the common/server-side code touched a render or screen class it should never see. This is a real bug. Report it with the full crash report and your loader version; until it is fixed, the mod cannot run on a server.

The distinction is entirely about what the mod claims. Client-only mod on a server = working as designed, your mistake. Server-supported mod crashing on a client class = the mod's mistake.

Let the Panel Read the Log for You

Reading crash reports is exactly the kind of thing a hosting panel can automate. Supercraft's crash-diagnostics assistant ("Doctor") scans the server's recent logs and failed startups and surfaces this pattern automatically - it flags a net.minecraft.client reference on a dedicated server, points at the loaded mod, and tells you it is a client-side class on a headless server, so you are not hand-parsing a stack trace at 2am. It is the same signal described above, just read for you.

Quick Checklist

  • Crash names a class under net/minecraft/client/? This is a client-on-server crash.
  • Open the newest crash-reports/crash-*.txt and find the mod package in the stack trace.
  • Match the package/mod ID to a jar in mods/ using the loaded-mods list.
  • Mod is client-only by design? Remove it from the server - it belongs only on clients.
  • Mod claims server support but still crashes on a client class? It is a mod bug - report it with the crash log.
  • Big pack, unknown culprit? Bisect: halve the mods folder, restart, repeat.
  • Both-sides mods must match versions on server and every client.

Related Guides

Tired of parsing modpack crash logs? Supercraft runs managed modded Minecraft servers with automatic crash diagnostics, daily backups, instant setup, and 5 region options. Plans from $5.99/mo.

Tired of fighting this issue every patch?

Run a managed Minecraft server with us. We handle the patches, mod-version pinning, save backups, and DDoS protection. Set up in 3 minutes, 5 datacenter regions, no contract.

See Minecraft hosting plans →
Top