To make the cake layers, grease two 9-inch (23cm) cake pans with non-stick spray or butter. Line the bottoms with rounds of parchment paper or silicone baking mats, which'll help ensure the layers release easily, although aren't necessary. Preheat the oven to 350ºF (180ºC).
In the bowl of a stand mixer fitted with the paddle attachment, cream the coconut oil and sugar on medium-high speed until well-combined. (You can also mix the batter in a large bowl with a spoon or spatula.) It may look a little ragged but will come together when you add the eggs in the next step.
Add the eggs one a time, stopping the mixer after each addition to scrape down the sides, to incorporate the eggs.
In a small bowl, whisk together the flour, cocoa powder, baking soda, salt, and baking powder. In a measuring cup, mix together the milk, instant coffee (if using), and vanilla.
On low speed, stir one-third of the flour mixture into the beaten coconut oil mixture. Add half of the milk, then another third of the dry ingredients (which, technically, is half of what's left in the bowl). Add the rest of the milk then the remaining flour mixture. Stir until smooth.
Divide the batter into the two prepared cake pans, smooth the top, and bake until the center of the cakes feel just set, 25 to 30 minutes. (A toothpick inserted into the center will come out almost clean.) Let the cakes cool on a wire rack.