Coconut Crab Enclosure Set Up Guide
The crab should be set up in accordance with this paper, with roughly 1 inch of crushed coral for substrate, a handful of leaf litter scattered in the enclosure, a freshwater and saltwater dish, and a dark hide box where they can molt inside. Keep them between 75-85 degrees and make sure the ventilation is low, the substrate should be constantly kept damp.
As the crab grows, it will need larger totes or PVC enclosures around maturity with this same layout. The most important aspect that most people get wrong is the substrate. Deep loose substrate kills these crabs as they experience catastrophic molts if you allow them to burrow in substrate without roots and rocks supporting it. As such, you should always use shallow crushed coral kept damp.