Heat the oil in a frying pan and fry the bacon over medium heat until starting to brown. Add the onion and thyme and cook for 3-4 minutes, until softened.
Transfer to a large bowl, add the potato, season with salt and pepper and toss well.
Thransfer the mixture to a 7-inch round cake tin and press down well. Dot with the butter. Place a piece of doubledd baking paper over the toip and place a weight, such as a ramekin or a smaller cake tin, over the paper.
Bake for 40 minutes.
Remove the weight and the paper and cook for another 20-25 minutes (or until the potato is tender and lightly golden).
Leave to rest for 20 minutes. Run a knife around the edge of the tin and turn out the galette.