Do you need to have the same mods locally in order to play on a modded server? [duplicate]

Solution 1:

Indeed you do.

Some mods do not need the Server to have it also installed, and vice versa.
IE: Optifine installed on client doesnt require it to be on the server.

But any mod that adds a new item/block for everyone to use will need to be installed on both your Minecraft and the server.