Heat the coconut oil in a large pot over medium heat. Add the onion and cook for 3 minutes until it starts to soften.
Stir in the garlic and ginger, then cook for 1 minute until fragrant.
Add the sweet potato cubes and Thai red curry paste. Stir well to coat the potatoes.
Pour in the vegetable broth. Bring the mixture to a simmer and cook for 15 minutes, or until the sweet potatoes are tender when pierced with a fork.
Lower the heat and stir in the coconut milk and spinach. Cook for 2 to 3 minutes until the spinach wilts.
Remove the pot from the heat. Stir in the lime juice and season with salt and black pepper.
Ladle the soup into bowls and top each serving with fresh cilantro.