A 5 gallon terrarium just isn’t a lot of space to keep a lizard. If you only have 5 gallons of space, it pretty much eliminates all of the well known geckos right off the bats.
Sorry, but no crested, gargoyle, or tokay geckos for you.
Fortunately, there are still quite a few worthy geckos that are small enough to fit in a tiny terrarium. Here are just a few of them that you can keep in either a 5 gallon tank or a 12x12x12 terrarium (which is a bit bigger). A few can even live in an 8x8x12, which is a bit smaller than a 5 gallon tank.
Yellow-Headed Gecko

Gonatodes albogularis fuscus, or the Yellow-Headed Gecko, is a small gecko found in warm parts of Central America and the Carribean, including Cuba. The gecko also stays small enough that it is right at home in a terrarium the size of a 5 gallon aquarium.
It comes from dry forests but also live on fences and walls of buildings, so it’s a good idea to set up its habitat with plenty of things to climb on.
Though they’re small, they can live up to 20 years in captivity. They are insectivores, so you can feed them tiny bugs like pinhead crickets.
The scientific name for the species (albogularis) comes from the Latin words albus and gula, meaning white-throated. Dumeril and Bibron chose this name to describe the genus’ white-throated appearance, as its head and lower body are mainly white. Fuscus refers to the darker bodies of the Yellow-Head gecko compared to other similar species.
Puerto Rican Crescent Gecko
Sphaerodactylus nicholsi, also known as Puerto Rican Crescent Gecko, Nichol’s Least Gecko, or Nichol’s Dwarf Sphaero, is a gecko native to the island of Puerto Rico. This tiny gecko is a fascinating little creature that makes a perfect addition to a 5-gallon terrarium.
Sphaerodactylus nicholsi has a very easy life in captivity. It makes for a pretty easy, low-maintenance pet. The females of the species does get a bit larger, but other than that they look the same.
This is one of the smallest species of gecko in the world. At its full adult size, it only ever gets up to 2″ long (nose to tail). As a juvenile, is small enough to fit on a dime.
They are found in different habitats, with Sphaerodactylus niccholsi typically occurring in dense vegetation. Because of this, providing live plants or other things to climb on is a welcome addition to their enclosure.
This species lives up to 20 years and should be fed insect feeders like 1/8″ crickets or black soldier fly larvae.
Ashy Gecko

By the way, most of the species in the Sphaerodactylus genus should also work in a terrarium this size. Another option is the Ashy gecko, which stays just a hair below 3″ long and can be kept in a pair in a 5 gallon terrarium (8x8x12)
They are happy with a temperature between 75-80F, so if your house is typically in this temperature range you should be able to keep them just fine without needing a heat source.
They do need to be fed live insects such as pinhead crickets or black soldier fly larvae, though. If this is a problem for you, I do have one gecko further down the list that can live entirely on Repashy or Pangea.
Moroccan Lizard Gecko
The Moroccan lizard gecko, Saurodactylus Brosseti, is an excellent pet for people who want a gecko but don’t have much space to keep one. Its behavior is similar to that of Leopard Geckos, and its size makes it an ideal pet for a 5-gallon terrarium.
Though they are easy to care for, they do require a little experience and a live food source to stay healthy. Pinhead crickets and black soldier fly larvae are good options for feeders.
Its name comes from its native home of Morocco, just west of the Atlas Mountains. The first description of this lizard was in 1957, and it was named for A. Brosset, who helped collect specimens for study.
This lizard is a natural inhabitant of the desert and can withstand drought and high temperatures. In captivity, keep its terrarium at 78-82F and give it a basking spot at 90-95F. Avoid using heated basking rocks, as they can harm geckos.
Microgeckos

With a name like “Microgecko”, you know this little group of lizards is a good fit for small terrariums. Microgeckos are any of the species in the Tropiocolotes genus.
They aren’t quite as readily available as other options on the list, but if you can find them, they are a good option.
A 5 gallon terrarium or a 12x12x12 should both be fine long term for raising one of these adorable little lizards.
If you want to read up on them, Gecko Time has a good article on raising one species of them here.
Dune Gecko

Dune geckos (Stenodactylus sp.) are another small gecko species that will work for a 5 gallon terrarium. As their name suggests, they’re native to the sand dunes of Africa and the Middle East, so they like a warm enclosure that stays around 75-85F with a basking spot around 95F.
Because they’re a desert species, you want to keep their humidity below 50%. You also want to feed them crickets and other small insects.
They are a communal species, so you can keep several of them together in the same enclosure. This isn’t particularly common among lizards, so if that’s something you’re interested in, this is a good species to look at.
Thick Toed Banded Geckos
Thick Toed Banded Geckos (Pachydactylus fasciatus) are another good species for a small terrarium – down to 8x8x12. Like the Dune Geckos, they’re a communal species, and you can keep a pair in a terrarium this size.
These lizards should be kept at 40-50% humidity but not above 55%. Keep their temperature the same as what the Dune Gecko requires above.
They are insectivores, so you should feed them crickets and other small feeder insects that are dusted with a vitamin supplement.
Mourning Gecko

Like the last few geckos on our list, Mourning geckos are social lizards. In a small terrarium, you may only want to keep one or two, but if you have a larger tank you can keep a small group of them together.
They should be kept in a tank with a high humidity level of at least 50 percent, but they can do well with up to 90% humidity. They don’t do well with handling (like most of these small geckos) and should be left alone most of the time.
You can feed Mourning Geckos the same variety of insect feeders as the rest of the geckos on this list, but they also do well on a 100% pangea diet. This makes them a pretty convenient option, as you don’t have to keep live bugs around.
A little bit of trivia about this species is that they are one of the few that can reproduce without the need for a male.
Diplodactylus Galeatus
Another one of the less common species on our list, Diplodactylus galeatus is a very photogenic little lizard that comes from the land down under.
This lizard’s common name is the Helmeted Gecko, but they’re not the most common species to use that name so be careful when looking for them.