Guide · Mods and modpacks

Fixing crashes caused by client-only mods

If you built a modded server by copying your own mods folder, it may crash on startup. The usual reason is a client-only mod: one that only makes sense where there is a screen to draw.

Recognising the crash

NeoForge and Forge often report an error such as "Attempted to load class net/minecraft/client/... for invalid dist DEDICATED_SERVER". Fabric may say a mod requires the client environment, or crash on a class in the net.minecraft.client package. Any crash mentioning client classes on a server points at a client-only mod.

The usual suspects

  • Rendering and shaders: Sodium, Iris, Embeddium, OptiFine, Oculus
  • Interface and HUD: some minimaps, zoom mods, inventory tweaks, menu mods
  • Sound and visual effects, such as particle or ambient sound mods
  • Client utilities such as Mod Menu, and client-side culling mods

Finding the culprit

Open the newest file in crash-reports, or the end of logs/latest.log, and look for a mod ID near the top of the stack trace. If none is named, move half the mods out, test, and keep halving. With a hundred mods that takes about seven restarts.

Modrinth labels each mod as client, server or both, and CurseForge pages usually say so in the description. Checking before uploading saves a lot of time.

The cleaner way

Install from a modpack's official server files or from a .mrpack with a tool that skips client-only files. Those are already filtered.

StormNodes Minecraft hosting

Run it on a StormNodes server

Skip the port forwarding and the PC that has to stay on. A StormNodes Minecraft server is online in minutes, and everything in this guide can be done from the panel.

  • Hosted in Portugal, close to players across Western Europe
  • NVMe storage, monthly billing and no setup fee
  • Paper, Purpur, Fabric and vanilla, switchable from the panel
  • Live console, file manager, SFTP, backups and schedules
  • Support in English and Portuguese

FAQ

Frequently asked questions

Should I put JEI or REI on the server?
Recipe viewers such as JEI and REI are usually safe on both sides and can be installed on the server, which lets them sync some recipe data. Check the mod page for your version.
Do players still need the client-only mods?
No. Client-only mods are optional for players. Only content mods must match between client and server.
Is OptiFine allowed on a server?
Never in the server mods folder. Players can use it, or modern alternatives such as Sodium with Iris, on their own clients.