Simply slide in a 10x2mm neodymium magnet in the pocket (no glue needed) and glue other 10x2mm magnet to the surface of door etc. I use mine to keep door closed against foam for extra sound proofing my printer in diy enclosure made of plywood. Magnets are cheap and easy accessible online, check the option with applied tape if you don't want to use glue.
I printed mine with nonflamable petg but can be printed with really anything if your box does not exceed 35 degrees Celcius (it should not btw :P)
The author marked this model as their own original creation.