It's best to only use water when cleaning a closed terrarium. Cleaning detergent can massively change the pH value in your substrate and make it acidic. This'll hurt your plants and might even destroy the delicate balance inside your closed ecosystem. For stubborn stains you can use lemon juce or vinegar but will have to watch the pH value as well. How exactly you can clean a closed terrarium is explained in this article.
What kind of stains can occur in a closed terrarium?
Which forms of dirt are commons in closed terrariums? They can in more colors than you might exspect. But what are they?
If your containers walls look green you probably have some algae. Since it is a lot more humid inside your closed terrarium and water is running down the walls on a daily basis, it is a good habitat for algae. They aren't harmful to your closed terrarium but a natural part in its eco system. They just aren't that pretty.
Gray or white
On some spots you'll see white a gray stripes on your glass. Those are mineral deposits or lime. Those either come directly from the daily water cycle or from critters such as worms, snails and insects crawling along the walls. Lime inside a closed terrarium is not unusual. On one hand lime is used in calcite sand for terrariums and on the other hand it's in our tap water. You'll have to be careful with lime for closed terrariums with carnivorous plants since they really can't stand any lime.
Brown or black
Small brown or black spots can also appear after a while. Those can either be dirt carried there by growing plants or your insects' excrements. They are also not bad for your ecosystem but not that nice to look at.
Cleaning a closed terrarium
Now we'll take a look at how you can clean your closed terrarium. Under normal circumstances you'll have to open it up but in some special cases you might be able to do it without.
Water is the key
When cleaning our homes and especially our windows we probably first think of water, soap and glass cleaner. You can use all of that for your closed terrarium but just for the outside. Since it is a closed exosystem, any soap or detergent left cannot escape. This will really harm your plants and they'll probably die. You should just stick to water for now.
Use a lint-free cloth
Wait for the afternoon to come so that your containers walls are almost dry on the inside. Use a lint-free cloth and put a little water on it. It really should just have a little water and not be dripping so you don't massively alter the water cycle. You can use tap water but depending on your region it might contain more or less lime. This can leaves spots when drying and harm certain plants. You'll be safe by using distilled water - or even simpler - rainwater. If you've wiped the inside of your closed terrarium you can either close it up and let it dry by itself or you can use another lint-free cloth to rub it dry yourself. This will prevent streaks from forming and is probably the better option.
Other helpful things for cleaning your closed terrarium
For really stubborn stains you can try lemon juice or vinegar. You should watch out though, as they also have a very low pH value and can thus damage your plants since your soil could become acidic. But they of these are not as harmful as cleanign detergent by far.
You can read more about vinegar as a cleaning agent for terrariums here.
Cleaning a closed terrarium without opening it
Now, I promised you that you might be able to clean your closed terrarium without opening it. But this really under works under special circumstances. I'm talking about magnets like you've probably already seen in some aquariums. Sadly they don't work quite as well in terrariums as you don't constantly have fresh water flowing around them. In the worst case you'll only smear the dirt around.
DIY cleaning magnet
Since most aquariums are a lot bigger than your closed terrarium will be, you might consider making a small cleaning magnet yourself. Use a microfiber cleaning cloth and and tightly wrap it around one of two strong magnets (like neodymium magnets). You can use super glue to attach it.The other magnet will be use on the outside of the terrarium. Wrapping it as well is not necessary but recommended as to not scratch the glass.
The problem with magnets
It's not as much of a problem with aquariums as it's with closed terrariums when the magnet loses grip and falls from the wall. Most of the time you can attract it again with the other magnet. But in a closed terrarium it'll fall much faster than in water and might even squash your plants. To prevent that fromn happening you should only use the magnet on a flat surface. And if you're at it, you should probably build a small water reservoir on that wall to dip the magnet into to clean it. Otherwise you'll probably just smear the dirt around. And if you want to clean four walls, you'll need eight magnets.
You should only choose the magnet option if you plan on closing your terrarium forever like in this video below.
Usually water is enough to clean your closed terrarium. It's pH neutral and won't change the balance of your closed terrarium as long as you don't use way too much water. Detergents such as glass cleaner are very harmful to your plants and should not be used. For stubborn stains, lemon juice or vinegar are a much better option. If your container has a flat surface wall you can even use magnets to clean it.