In a small saucepan or cast iron skillet, melt the butter on low heat.
Once the butter is melted, add all of the spices and seasonings including the onion, garlic and ginger.
Mix to combine.
Now set the flame to as low as possible so that the butter is barely on a simmer.
Let it simmer for 30 minutes. The milk solids will have separated and risen to the top.
Pour through a cheesecloth lined sieve.
This will get rid of most of the milk fats and the spices. However, it still will not be clear.
Pass it through the strainer another 3-4 times, discarding the separated residue each time, until the clarified butter runs clear.
The ghee will solidify in a few hours if kept at room temperature or if you would like to speed up the process, you can place it in the refrigerator for about an hour.
Store in an air tight glass jar at room temperature.