The ideal habitat for a pet hermit crab is a glass aquarium or tank that is at least 10 gallons in size, with a secure lid to prevent escapes. The habitat should include a substrate of sand or coconut fiber, a few hiding spots such as caves or shells, a shallow dish of fresh water for drinking and a deeper dish of salt water for bathing, as well as a heat source to maintain a temperature of around 75-85°F. It's also important to provide various climbing surfaces and some decorations for enrichment. Regular misting of the habitat will help maintain humidity levels of 70-80%.