1. In a 10" cast iron skillet, cook bacon, about 4-5 minutes per side. Cut into small strips and transfer to a plate.
2. In the same skillet, saute onion until golden and soft (about 4 minutes).
3. Add chopped spinach and cook until wilted (about 2 minutes). Lightly season with salt and pepper. Transfer onion and spinach to a plate.
4. Meanwhile, grate potatoes (don't do it in advance, they may change color and turn grey). Add 2 tablespoons olive oil to the same skillet (you may need to add less, depending on how much fat you have left). Cook potatoes for 3 minutes, lightly season with salt and pepper, then flip and cook for another 2 minutes.
5. Preheat oven to 350F (180C).
6. In a bowl, whisk together eggs, coconut milk, salt and pepper.
7. Arrange cooked potatoes evenly on the bottom of the skillet. Top with spinach and onion mixture, sprinkle with half bacon.
8. Pour the egg mixture on top, sprinkle with the rest of the bacon.
9. Cook in the preheated oven for 25 minutes. Garnish with chopped green onions and serve.