My kids had hermit crabs as pets at one time. They lived in a little box and we provided various size shells for them to change into as they grew. (Hermit crabs live in the empty shells of mollusks.) I think we fed them peanut butter and provided water a little shell for them to drink. They would molt as they grew and we considered ourselves lucky to be present when they actually came out of the shell to scoot into a larger one.
They didn’t live very long and that was due to the fact that we didn’t really know what they needed to survive. Now, with the internet available it’s easy to find articles about caring for pet hermit crabs.
When we got our pontoon boat we would cruise up and down the Intracoastal at Indian River and Mosquito Lagoon and stop at various little islands to explore and fish, and one place we used to visit regularly was an island I named “Broken Palm Island”. That is where we came across a bunch of wild hermit crabs – very small ones – roaming the beach. I have a picture some place of my son with a little hermit crab crawling on his foot. The kids thought it was awesome to find so many little crabs living as they were meant to. No one had to provide empty shells for these guys, they were finding plenty on the sandy shore.