same as how life got here i think
would just need to be a fungus that can live off abiotic carbon bubbling up from the earth's core... one of the oldest known forms of carbon that humans discovered and used was a kind of tar that bubbled out of one lake in the middle east somewhere, can be used for lighting and heating, and is the most likely medium for the most primitive form of life, something that just eats tar