Ikea Skadis accessory to hold flashligh with magnet at base model using a beer bottle cap.
Note: I tested it with few bottle caps and some attach fine but others are a bit loosen, it could be because they are slightly bended, if that is the case use some hot glue or instant glue to attach it properly to avoid the cap falling from the weight of the flashlight.