No, a terrarium completely without light is unfortunately not possible. However, you can get by with a little indirect light. For rooms completely without windows you should consider a plant lamp or grow light.
With a terrarium you bring a little piece of nature into the house. Mostly, however, a terrarium is located near a window, from which you can see nature anyway. So you can rightly ask yourself if you can keep a terrarium in a darker room, where there is rarely or possibly never any light. Let's see why this is not a good idea.
Plants need light for photosynthesis
As you probably know, plants need light to perform photosynthesis. Through photosynthesis, plants convert carbon dioxide and water into oxygen and sugar, which they use as one of their energy sources. The exact process is a lot more complicated, of course. However, you can read a brief overview of the oxygen cycle in the article on how a closed terrarium works. In the case of a closed terrarium, light also performs another important task, which we will discuss in the next section.
Of course, there are plants that can cope with very little light. These include, for example, most species of moss or nightshade plants. However, even they can not survive completely without light and need at least a little bit of brightness in the room.
Warmth drives the water cycle
Unlike traditional terrariums, closed terrariums only require a certain amount of water once at the beginning and never need to be watered again after that (if you set up your closed terrarium properly). Therefore, they rely on a constant water cycle caused by the changing temperature. During the day, light shines on your closed terrarium and heats it up. This allows water to evaporate from the soil and leaves and accumulate in the air. When it gets darker in the evening and the closed terrarium cools down again, the water condenses on the glass panes and leaves. Due to gravity, it flows back into the ground.

However, you can also create this cycle through external heat alone. For example, if you have an attic where it gets very warm during the day and cools down a lot at night, this can be enough for the water to circulate daily. In another article, I describe how to ensure the correct amount of water for your closed terrarium and how to tell if your water cycle is working.
Can you keep a terrarium without sunlight?
Yes, this is quite possible and is often done this way. In principle, you can light a terrarium with any lamp, but in practice, special plant lamps are usually used for this purpose. These are also called grow lamps and are much brighter than normal lamps. They also provide a light spectrum that is specifically designed for plant growth. Learn more about plant lamps here.

If you want to see examples of plant lamps, check out my reviews of the budget model CXHome LM301B or the premium model Niello Plant Lamp LED 300W.