OptiFine Installed on Server
OptiFine was placed on a server and it crashed. OptiFine is a client-only optimization and graphics mod, it has no server-side component and cannot run on a dedicated server.
What does this error mean?
OptiFine enhances client rendering (FPS, shaders, connected textures). On a server it tries to load client rendering classes for the DEDICATED_SERVER dist, which do not exist, so loading fails. OptiFine belongs only on the client.
Attempted to load class net/minecraft/client/... for invalid dist DEDICATED_SERVER
Most Common Causes
- The OptiFine jar added to the server mods folder.
- Mirroring a client mods folder onto the server.
- Believing OptiFine improves server performance (it does not).
- Following a guide that mixed client and server mods.
- A pack copied without removing OptiFine.
How To Diagnose
- Confirm the crash names OptiFine / a client render class.
- Check the server mods folder for the OptiFine jar.
- Recall that OptiFine is purely client-side.
- Look for other client-only mods alongside it.
Recommended Fixes
- Remove OptiFine from the server
Delete the OptiFine jar from the server, install it only on clients that want it. - Use server-side performance forks
For server performance, run Paper/Purpur or Fabric with Lithium, not OptiFine. - Keep OptiFine client-side
Players install OptiFine locally, it never goes on the server. - Audit the mods folder
Remove any other client-only graphics mods from the server.
Frequently Asked Questions
No, it is client-only rendering. Server TPS is helped by Paper/Lithium, not OptiFine.
Yes, on their own clients. It simply must not be on the server.
Sodium (rendering) plus Lithium (server logic) and Iris (shaders) are common client choices.