Not my usual project but when you have a 3D printer you can make lots of useful things for the house.
I made these along time ago but recently thought why not share them on here for others to use if they want.
They have a countersunk screw hole in the bottom if you want to fix them to your wall with a screw but I just used some 'No Nails' type adhesive and they're still there. :) The second smaller hole in the barrel of the holder is to allow air to escape when replacing the glass jars.
The filament I used was from Prusa in Beige which happily almost exactly matches the colour we painted our kitchen wall and the colour of the kitchen cabinets.
They are designed to work with the very inexpensive ÖRTFYLLD spice jars from Ikea: https://www.ikea.com/gb/en/products/cookware/food-storage-organising/%C3%B6rtfylld-spice-jar-glass-stainless-steel-art-60391350/
They have been designed so that you can easily place the jars onto the holder, let go and then the weight of the glass ensures they slide into the bottom of the holder nice and secure.