Mods are not like plugins. A plugin lives only on the server; a mod has to exist on both sides, in the same version, or the player cannot connect at all.
Why it happens
Mods change the game's own content — blocks, items, mechanics. The client has to know about them to render and predict them, so client and server negotiate their mod lists at connection and refuse each other on any mismatch.
What to do
- Match the loader first
A Forge mod needs a Forge server. A Fabric mod needs a Fabric server. They are not interchangeable, and the version of the loader matters too.
- Upload the mod jars to
modsOne jar per mod, not unzipped. The folder is created by the loader on its first run.
- Give players the exact same set
Same mods, same versions. The simplest way is to zip your
modsfolder and send it, so nobody assembles their own list. - Know which mods are server-only
Some — mostly performance and admin mods — run on one side only. Their pages say so. Everything else has to match.
A player joins without a mod mismatch message and modded blocks render correctly for them.
Client-side performance mods like Sodium do not go on the server. Installing them there does nothing at best, and prevents startup at worst.