It was not known how much oil was spilled or what ignited the fire.
An oil well in Indonesia's Aceh province caught fire on Wednesday, leaving 11 people dead and 40 others injured.
At least 10 bodies have been recovered and the death toll is expected to rise, police said, while injured victims were being treated at local hospitals.
Soldiers, police, firefighters and volunteers are rushing to the site to contain the fire from spreading to the community residential area as the fire has engulfed five houses, said Heni.
An investigation was launched to determine the cause of the blaze. Local news reports said it may have started with a spark from a blowtorch or a worker smoking a cigarette.
Such illegal drilling is common in Aceh, where Pertamina operates an oil field.
On Wednesday, a spokesman of the National Disaster Management agency Sutopo Purwo said that the incident occurred in Pasir Putih village of Aceh Timur district in Aceh, which is on the northern tip of Sumatra Island in western Indonesia.
Indonesian fire fighters battle to extinguish a fire at an illegal oil well in Peureulak on April 25, 2018.
There are reportedly tens of thousands of such wells across the South-east Asian archipelago.
Villagers had gathered at the well shortly after midnight, carrying buckets, jars and barrels, in hopes of collecting crude oil after being told about a massive spill there, according to the disaster agency.
Indonesia has a population more than 260 million people and is no stranger to deadly blazes.
That directive followed a balcony collapse at the Jakarta Stock Exchange building which injured dozens.