In a wok or medium skillet, heat coconut oil over medium heat. Once hot, add onions and saute until soft and starting to caramelize, about 20 minutes.
Turn heat down a bit and add garlic and spices. Saute 3 more minutes until spices are fragrant.
Add onion and garlic mixture, three quarters of a cup of coconut milk, and lime juice in a blender. Puree until smooth.
Place chicken thighs in a baking dish and coat top and bottom well with marinade, reserving half a cup of marinade. Cover and marinate chicken in the fridge 30 minutes or more.
Add reserved coconut milk to leftover marinade in blender and mix well.
Preheat oven to 425 degrees. Bake chicken 60-70 minutes until done.