Preheat oven to 400 degrees F.
Butter two 12-hole muffin pans.
Grate potatoes, then use your hands to squeeze out any excess liquid and drain. Place the drained potatoes in a large bowl—Season well with kosher salt and black pepper.
Add the melted butter and beaten egg, stir to combine.
Add the shredded cheese and ham, and fold through the almond flour or all-purpose flour.
Spoon the mixture into the prepared muffin pans and bake for 20-25 minutes, until golden and crispy.
Use a spoon or spatula to release bites from the muffin pans and serve immediately.
They can also be made ahead of time and frozen or refrigerated until ready to warm in a 350-degree oven for 10 minutes.