Add potatoes to a large bowl, along with olive oil, rosemary leaves, and garlic. Toss to combine and season with salt and pepper, to taste.
Spread potatoes onto a large, rimmed baking sheet and arrange in a single layer without overcrowding. Place in the oven and roast for 15 minutes. Remove pan from oven and turn potatoes so they brown evenly. Return to oven and roast for another 10-15 minutes, or until potatoes are fork tender.
While the potatoes are roasting, melt coconut oil in a large skillet over medium heat. Add sliced onion and sauté, occasionally stirring, until they turn deep brown, approximately 10-15 minutes. Remove from heat and season with salt and pepper, to taste.
Remove from potatoes from oven and transfer to a large serving bowl. Add onions and toss to combine. Serve immediately!