It is a hard question to answer whether or not you should armor your STOs. The difference in mineral cost is microscopic, but the build time and wealth cost goes up significantly. Wealth is a renewable resource, while minerals are not. From that point of view armoring them is a good idea, as you protect your rare material. From an economical point the difference is the output of your barracks, as the most heavily fortified guns require three times the build time compared to the lightly armored counterparts. If you have the production capacity, I would go for the armor.
From a tactical point of view, armor might not make a difference, as the penetration of ship weapons is almost always sufficient to pierce them. A special case are 10cm railguns, which are good when it comes to defeating lightly armored infantry on the ground, but suck at combating fortified STOs. The main feature that protects STOs is not the armor, but the planetary terrain. Bombing an STO on a mountain & jungle world is extremely costly in MSP and ships, as the hit chance is extremely low (<1%) and the STOs will have a field day.
This is why I try to put them in places where the ground protects them from enemy fire by terraforming colonies until they have at least temperate forrests. If I have to put and defend a supply depot, I try to find a mountain planet, even if it is a venutian planet, as it is too costly to dig them out.