In a dry pan over medium heat, toast the lemongrass, kaffir lime leaves, galangal, turmeric, coriander seeds, cumin seeds, and white peppercorns until fragrant, about 5 minutes.
If using dried bird's eye chilies, add them to the pan and continue toasting until fragrant, about 2 minutes.
In a separate pan, toast the shredded coconut until golden brown, about 5 minutes.
Allow all the ingredients to cool completely.
Once cooled, grind all the ingredients together in a spice grinder or a food processor until a fine powder is formed.
Store the spice blend in an airtight container in a cool, dry place for up to 6 months.