Yes, many planter boxes are designed to be attached to brick walls or railings, creating beautiful vertical gardens for small spaces. For brick walls, the key is using proper masonry anchors. Drill pilot holes into the mortar joints (which is easier and less damaging than drilling into the brick itself) and use sleeve anchors or toggle bolts designed for masonry. Always ensure your wall can handle the weight, especially when the soil is wet.
For railings on balconies or decks, look for planter boxes with secure brackets or straps that wrap around the railing. These often have adjustable mechanisms to fit various railing widths and thicknesses. It's crucial to check the weight limit of your railing structure and to secure the planter tightly to prevent tipping in windy conditions.
Regardless of the surface, always use durable, weather-resistant materials like cedar, metal, or high-quality plastic. Ensure the planter has adequate drainage to prevent water damage to your wall or railing. With the right hardware and a bit of DIY spirit, you can easily add greenery to your vertical spaces.