A client-only mod crashes a server when it asks for part of the game that a server does not have. The log says Attempted to load class (name) for invalid dist DEDICATED_SERVER. Open Crashes: the panel names the cause as A client-only mod is installed on the server. Turn that mod off, start the server again, and players keep it in their own game.
A client-only mod changes what a player sees or hears: shaders, menus, minimaps, sound. The server has no screen. The server lacks the client classes, so a mod that needs one fails at start.
1. Read what the panel found
- Open Crashes on the server.
- Open the newest crash report or log. Detected issues lists the causes the panel recognises.
- Look for
A client-only mod is installed on the server. Under it are the lines that matched, up to eight. The panel’s advice reads:One of the mods only runs in the game client (it loads client classes). Remove it from the mods folder; players keep it in their own game if they want it.
The panel matches plain text: invalid dist dedicated_server, attempted to load class net/minecraft/client, environment type client and client-side-only. These are the wordings of Forge for Minecraft 1.20.x and NeoForge for 1.21.1. A mod loader (Forge, NeoForge or Fabric) is the software that lets the server run mods. Newer loader versions may word it differently, and then the page shows only the recent output.
2. Find which mod it is
The class in the message is a Minecraft class, not the mod. The mod that asked for it is further down the stack trace, in the lines that name a .jar or a mod. Open the crash report in Files, in the crash-reports folder, or logs/latest.log, and look for a mod name.
3. Turn it off
- Open Add-ons, then Mods.
- Choose the filter Other files. A mod that came with a pack is listed there as Not installed through the panel.
- Find the mod and press Turn off. This renames the file to end in
.disabled, which the server skips. Turn it on again later with nothing else changed. - Press Start. If it starts, press Remove on the mod to delete it.
A pack update can put the file back. An update fetches every file of the new version, so a pack mod you turned off or removed can come back. After an update, open the Mods tab, filter Other files, and check.
A mod you take off the server stays in every player’s copy of the pack. If it is one both sides need, players are refused (The server is missing the following mods, remove these mods from your client to join this server) until they remove it too.
4. Know a client-only mod before you add it
- Modrinth tags each mod with a side. Sodium, Iris, Embeddium, Oculus, Sodium Extra, Entity Culling, Dynamic FPS, ImmediatelyFast and Mod Menu are tagged as needing the client and not supported on a server.
- Xaero’s Minimap and World Map, FancyMenu and EMI need the client but are optional on a server. JEI, Jade, JourneyMap, Lithium and Fabric API are optional on both sides.
- Pack authors keep these off their server files. Craftoria’s server setup file lists 27 mods to skip, among them Embeddium, Iris and Fancy Menu.
When you install a pack, the plan says how many client-only files it leaves out (1) and lists them under Client-only files left out (2). The picture shows All the Mods 10 on a server named “Survival with friends”; your pack’s plan has the same parts. The panel leaves out only files the pack, or Modrinth for the identical file, marks as client-only. An untagged one can still reach the server. For a mod you add yourself, the Mods search does not look at its side: it lists CurseForge mods without filtering by side. The Modrinth source does filter them out.

- Client-only files left out
- The list of client-only files
By hand
Open the mods folder in Files and delete the mod’s .jar. On a Fabric pack, a mod’s fabric.mod.json has an environment line: client means players only, server means the server only, * means both.
Do not copy your own game’s mods folder to the server. It holds client mods. See server pack or client pack.
If it does not work
- The same error names another class. A second client-only mod is installed. Repeat steps 2 and 3.
- The server starts, then stops with a different message. Read the next cause on Crashes. See fix server crashes.
- A removed pack mod came back. An update fetches every file of the new version, so a pack mod you turned off or removed can come back. After an update, open the Mods tab, filter Other files, and check. Turn it off again.
More on the game: Minecraft servers.
Sources: raw.githubusercontent.com: RuntimeDistCleaner.java, docs.neoforged.net: Sides, docs.minecraftforge.net: Sides, wiki.fabricmc.net: Fabric mod json, raw.githubusercontent.com: Server setup config.yaml





