DIN rails aren’t very common in hobby projects, although you do see them occasionally. But in some industries, they are everywhere. The rail is just a piece of aluminum or steel with slots to hold it to a wall or bulkhead. There are two small lips that equipment like circuit breakers, power supplies, or controllers can attach easily. A common 3D printing project is a way to mount something like a printer controller to DIN rails. [NotLikeALeafOnThe Wind] shows a different take on it: a magnetic holder that temporarily attaches a rail to a ferrous surface.
Of course, mounting the rail is only half the equation. After that, you still need things to mount on the rail. Luckily, there’s no shortage of designs for DIN mounts for many common boards and modules.
There are several versions of the design. One has two ears that hold the magnets. Another has a similar design but can mount two rails. If you can’t spare the space, another design holds the rail but adds very little width to the assembly. Honestly, we wondered if you could take a bit of rail and just epoxy magnets to the back of it, but these certainly look nicer and give you a bit of clearance, too.