The best way to make your hermit crab live longer is to feed it a healthy diet and keep a clean environment. They like to eat different vegetables like kale and spinach. Also, hermit crabs prefer a moist tank. Spray water in the tank every so often to make sure it stays humid.