Start by peeling your onions and slicing them into very thin, long strips. A mandoline slicer works great for this! Be sure to separate the layers so that each piece of onion is just one onion layer.
Place a large nonstick skillet over medium heat. Add the ghee and melt.
When the ghee has melted, begin to add the onions. In three to four batches, place a handful of onions in the skillet and stir to coat with the ghee. Wait one to two minutes before repeating with the next handful. Repeat this process until all of the onions have been added into the pan and coated with ghee.
Add the salt and coconut sugar (if using) and stir to combine and coat completely. Stir once every five to ten minutes until onions have reduced and start to turn a deeper shade of brown. They might start to crisp slightly on the ends. If the onions start to stick to the pan, add in a splash of water or chicken or vegetable broth and stir. However, if you use a nonstick skillet your onions should not stick. It can take up to 45 minutes for the onions to caramelize but it is worth every bit!