Primary links

I know we can put magnets on the side rails as long as the distance from the top of the magnets to the top of the rail is between 2-5 cm but what about placing magnets on the outside of the rails?

Yes. General rule #2 applies: https://www.soinc.org/ethics_rules