One of the world’s largest bitcoin mines is located in the SanShangLiang industrial park on the outskirts of the city of Ordos, in Inner Mongolia, an autonomous region that’s part of China. It’s 400 miles from China’s capital, Beijing, and 35 miles from the the city of Baotou. The mine is just off the highway, near the intersection of Latitutde 3rd Road and Longitude 3rd Road. It sits amidst abandoned, half-built factories—victims of an earlier coal mining boom that fizzled out, leaving Ordos and its outlying areas littered with the shells of unfinished buildings.

The mine belongs to Bitmain, a Beijing-based company that also makes mining machines that perform billions of calculations per second to try and crack the cryptographic puzzle that yields new bitcoins. Fifty Bitmain staff, many of them local to Ordos, watch over eight buildings crammed with 25,000 machines that are cranking through calculations 24 hours a day. One of the buildings is devoted to mining litecoin, an ascendant cryptocurrency. The staff live on-site in a building with a dormitory, offices, a canteen, and a repair center. For recreation, they play basketball on an unfinished cement court.

Bitcoin mining consumes enormous amounts of electricity, which is why miners seek out locations that offer cheap energy. The Ordos mine was set up in 2014, making it China’s oldest large-scale bitcoin mining facility. Bitmain acquired it in 2015. It’s powered by electricity mostly from coal-fired power plants. Its daily electricity bill amounts to $39,000. Bitmain also operates other mines in China’s remote areas, like the mountainous Yunnan province in the south and the autonomous region of Xinjiang in the west.

Despite the costs, bitcoin mining remains a lucrative industry. At the current bitcoin price of about $4,000 per bitcoin, miners compete for over $7 million in new bitcoins a day. The more processing power a mining operation controls, the higher its chances of winning a chunk of those millions. The Ordos mine accounts for over 4% of the processing power on the bitcoin network—a huge amount for a single facility.

Quartz visited the mine in Ordos on Aug. 11.

Aurelien Foucault for Quartz The Bitmain mine in Ordos, Inner Mongolia, has eight buildings containing mining machines. One of them is dedicated to litecoin and seven mine bitcoins. An additional building is inactive.

Aurelien Foucault for Quartz Racks of litecoin-mining machines in the Bitmain unit dedicated to litecoin.

Aurelien Foucault for Quartz Power cords and their fuse box inside a bitcoin mining unit.

Aurelien Foucault for Quartz Racks of bitcoin-mining machines inside a mining facility.

Aurelien Foucault for Quartz Leftover tubing and cables lying on the ground between two mining units.

Aurelien Foucault for Quartz A bitcoin mining machine with its battery on a shelf.

Aurelien Foucault for Quartz A worker monitors operating status of bitcoin-mining machines.

Aurelien Foucault for Quartz Workers clean the shelves of bitcoin-mining machines.

Aurelien Foucault for Quartz Industrial suction blower fans can be found all along the side of the mining units. They’re used to increase the airflow inside the building and lower the temperature.

Aurelien Foucault for Quartz The administrative office of the main building.

Aurelien Foucault for Quartz Packing materials from mining devices fill up a warehouse on site.

Aurelien Foucault for Quartz A worker fixes a component on a mining machine.

Aurelien Foucault for Quartz Workers prepare to bring fixed machines back to the mines.

Aurelien Foucault for Quartz The exterior of one of the mining units.

Aurelien Foucault for Quartz A worker monitors operating status of a machine.

Aurelien Foucault for Quartz The massive switch to one of the many power transformers on the mine. These are hosted in buildings separate from the mining machines.

Aurelien Foucault for Quartz A set of keys used to get access to the transformers on site.

Aurelien Foucault for Quartz A local citizen of nearby Ordos, recent college graduate Hou Jie, 24, is a maintenance worker at the mine. He shares this dorm room with seven other employees.

Aurelien Foucault for Quartz A cook prepares dinner in the kitchen of the main building.

Aurelien Foucault for Quartz Workers enjoy their dinner in the dining hall.

Aurelien Foucault for Quartz View of one of the buildings in the compound.

Correction (Aug. 21): Xinjiang is in the west of China. A previous version of this story incorrectly said it was in the east.