The old red truck’s engine was jury-rigged to control a pump tied to a three-legged tower cobbled together from teak logs and rope. Sujiyanto sat in the cab of the vehicle, cigarette in hand. He released the gas pedal, sending the pump hundreds of feet underground before hauling it back up filled with crude oil.

“This is how we extract oil from the ground,” said Mr. Sujiyanto, 51, who, like many Indonesians, goes by one name.

Around him on a recent Wednesday, smoke rose over the hills, which were dotted with teak derricks. The smell of oil lingered in the air and the ground was slicked black. Nearby, a group of men used their bare hands to crank out a pump stuck into the ground.

This is the Wonocolo oil field in East Java, Indonesia, where subsistence oil drilling has endured for decades. It was discovered by troops digging for water in 1893, when Indonesia was a Dutch colony. Reaching depths of about 1,600 feet, it is considered one of the world’s shallowest oil fields, allowing the community to extract oil without heavy machinery.