There are more ways to cook an egg than there are opinions about which of those ways is best. But around Easter time, hard-boiled eggs rule the roost. Unfortunately, once you hard-boil an egg, it actually spoils faster than a raw one because the cooking removes the natural protective coating around the shell. (The USDA recommends only leaving hard-boiled eggs out of the fridge for two hours, though that's a rather conservative estimate.)
Luckily, this Trail Chef just learned a cool new trick for hard-boiling them in the backcountry without even boiling water, though this method does require a campfire. First, pack in the eggs carefully, using a hard container, such as Coghlan's Six-Egg Holder. They should keep just fine for an overnighter—after all, in some cultures, people store eggs at room temperature for a week (again, however, the USDA does not at all recommend the latter).
Next, unless it's winter, stow the eggs in the center of your pack. This will insulate them from warm ambient temperatures and shade them from the sun. Beware, hot weather and direct sunlight both speed spoilage.
In camp, enjoy your typical campfire, but siphon some of the still-warm ashes and embers to the side, and bury your eggs in them. You'll have soft-boiled eggs in about 10 minutes and hard-cooked eggs in 15 to 20, depending on the temperature of the ashes.