Skip to main content

invalid dist DEDICATED_SERVER: fixing a client-only mod on a Minecraft server

Last updated 2026-09-09 · MineXHost

This crash means a mod reached for a class that only exists on a Minecraft client while running on a dedicated server. The mod loader refuses the load on purpose. The frustrating part is that the message names the class it refused, which is a Minecraft class — never the mod that asked for it.

The message, in both of its wordings

Forge and NeoForge strip client-only code out of the server at load time and throw when something asks for it anyway. The exact wording depends on how old the pack is, which matters because searching for the wrong one finds nothing.

Minecraft eraWhat the log saysThrown by
1.13 and newer (Forge, NeoForge)Attempted to load class ... for invalid dist DEDICATED_SERVERRuntimeDistCleaner, the @OnlyIn(Dist.CLIENT) stripper
1.7.10 – 1.12.2 (legacy Forge)Attempted to load class ... for invalid side SERVERSideTransformer
Either era, during mod constructionFailed to create mod instanceThe mod's own constructor touching a client class
Either era, in the transformerRuntimeDistCleaner/DISTXFORMThe class-stripping transformer itself
On 1.7.10 and 1.12.2 the class in the message is usually obfuscated — you will see names like bao, bdw or bjf. Those are Minecraft's own classes under the old mappings. They tell you nothing about which mod is at fault, so do not search for them.

Why the named class is never the culprit

The class in the message is the class that was refused, and it is a Minecraft client class every single time — something like net.minecraft.client.Minecraft or net.minecraft.client.gui.screens.Screen. Removing it is not an option and it is not broken. What you need is the mod that asked for it, and that is in the stack trace, not the message.

  1. Scroll to the stack under the exception and read downwards past the loader frames (cpw.mods, net.minecraftforge, net.neoforged, org.spongepowered).
  2. The first package that is none of those belongs to a mod — for example com.someauthor.somemod.
  3. Match that package to a jar in mods/. Most mods use their own name in the package, so this is usually obvious once you know to look there.
  4. If the crash says “Failed to create mod instance”, the log normally names the mod id directly on that line. Take it.

Two corpora matter here and they are not the same file. The console you see in the panel is stdout and stderr; the full construction stack and the RuntimeDistCleaner frames often appear only in crash-reports/*.txt. If the console tail is thin, read the crash report.

The mods this happens to

Almost every case is a client-side mod that ended up in a server's mods folder because the pack was installed from its client zip. The families that show up repeatedly:

  • Rendering and performance mods that bind native graphics libraries — a NoClassDefFoundError naming org/lwjgl alongside a named render mod is this crash wearing a different hat.
  • Shader and lighting mods, which exist entirely to change how the game draws.
  • Cosmetic loaders and account overlays, whose stub loaders install themselves before the mod list is even read.
  • Minimaps, HUD mods, inventory tweaks and anything whose whole feature is a screen.
1.7.10 is a deliberate exception to the org/lwjgl rule: some legacy packs use LWJGL server-side on purpose, so an lwjgl error there is not automatically a client mod.

How to fix it

  1. Back up the world folder.
  2. Move the mod the stack named out of mods/ and restart. Client-only mods do not need a server copy — keep it in your own client mods folder and it still works in multiplayer.
  3. Expect more than one. Client packs routinely ship a dozen client-only mods, and the server surfaces them a few at a time as each boot gets further than the last.
  4. Where the pack publishes a server pack, use it. That is the same pack with the client-only mods already removed, and it saves the whole exercise.
  5. Check the mod's page before removing it permanently: a mod tagged Client-side only on Modrinth, or Client on CurseForge, is meant to be absent from the server.

The awkward case: a server mod that requires a client mod

Sometimes the client-only mod cannot simply be removed, because another mod in the pack declares it as a required dependency. Remove it and the loader refuses to start over a missing dependency; keep it and the dist check kills the server. The pack is not bootable on a dedicated server as shipped.

The real fix is to remove the requiring mod as well, if you can live without it, or to use the pack's server pack where one exists. If neither is acceptable, this is a pack bug worth reporting to its author — it is not something a host can configure around.

What MineXHost's launcher does with this crash

MineXEngine recognises both wordings, the construction-time variant and the transformer variant, and reads the stack rather than the message to attribute the mod. Where the class in the message is obfuscated it drops the attribution rather than guessing — an obfuscated Minecraft class genuinely does not identify a mod, and a guess there removes the wrong file.

Before your server's first boot, mods that declare themselves client-only in their own metadata are moved out of mods/ during install, which is why most client packs boot here without a hand-edit. Mods that do not declare it — and plenty do not — still surface at runtime, and there the engine identifies rather than deletes: crash recovery on a customer server names the file and leaves your mods folder alone.

For the dependency deadlock above, the engine detects that the pack cannot boot as shipped and writes a proposal naming every file that would have to go, with the evidence for each. The panel shows you that list and applies nothing until you approve it.

MineXHost runs CurseForge and Modrinth modpacks on MineXEngine — our launcher auto-detects the modpack, picks the right Minecraft loader and Java version, tunes the JVM for your RAM, and auto-recovers from the crashes that normally end a modded server's evening. Pick your RAM, paste the pack, and play.

See hosting plans

Frequently asked questions

What does “invalid dist DEDICATED_SERVER” mean?

“invalid dist DEDICATED_SERVER” is Forge and NeoForge refusing to load a client-only Minecraft class on a dedicated server. Client code is stripped out of the server at load time, so when a mod asks for a rendering, GUI or input class the loader throws rather than hand it something that is not there. The class named in the message is a Minecraft class and is never the problem; the mod that asked for it is further down the stack trace. On Minecraft 1.7.10 to 1.12.2 the same failure is worded “for invalid side SERVER” instead.

Which mod is causing “Attempted to load class ... for invalid side SERVER”?

Read the stack trace under the exception and find the first package that is not a loader package — skip cpw.mods, net.minecraftforge, net.neoforged and org.spongepowered, and the next package down belongs to a mod. That package name normally matches a jar in your mods folder. Do not search for the class in the message itself: on 1.7.10 and 1.12.2 it is an obfuscated Minecraft class such as bao or bdw, and it identifies nothing.

Can I run a client modpack as a server by just uploading it?

Usually not without removing the client-only mods first — a client pack ships shaders, minimaps, HUD mods and rendering optimisers that cannot run on a dedicated server, and each one crashes the boot until it is gone. If the pack publishes a server pack, use that: it is the same pack with those mods already removed. MineXHost's launcher strips the mods that declare themselves client-only during install, which handles most of them automatically.

A mod I need requires a client-only mod. What now?

A pack whose server-side mod hard-requires a client-only mod cannot boot on a dedicated server as shipped, and that is a pack bug rather than a hosting problem. Removing the client-only mod trips a missing-dependency error from the mod that requires it, and keeping it trips the dist check. Your options are to remove both mods, to use the pack's official server pack if one exists, or to report it to the pack author. No host-side setting resolves it.

Is a NoClassDefFoundError mentioning org/lwjgl the same problem?

Yes — on Minecraft 1.13 and newer that error is almost always the same client-mod problem, because LWJGL is the native graphics and input library and a mod reaching for it on a dedicated server is a rendering mod that should not be installed there. Look for the render or shader mod named nearby in the log. Minecraft 1.7.10 is the exception: some legacy packs use LWJGL server-side deliberately, so the same error there does not by itself prove a client mod is at fault.