Clean the coconut crabs thoroughly, removing any debris from the shell. If not already done, crack the crab shells to make the meat easier to access.
Heat the vegetable oil in a large pot or Dutch oven over medium heat.
Add the chopped onion and cook until translucent.
Stir in the minced garlic and ginger, cooking for another minute until fragrant.
Add the coconut milk and water (or seafood stock). Stir to combine.
Add the crab pieces to the pot, along with the sliced chili peppers (if using), soy sauce, lime juice, brown sugar, salt, and black pepper.
Bring the mixture to a gentle simmer. Cover the pot and cook for about 20-25 minutes, or until the crab meat is fully cooked and has absorbed the flavors. Stir occasionally.
Garnish with fresh cilantro or parsley before serving.
Enjoy your meal!