Data centers — cavernous warehouses filled with computers and cables that keep websites and apps running around the clock — are the beating heart of the internet. They are also huge consumers of energy, and as the world spends more time online, environmentalists are growing increasingly concerned about their climate impact. But Google is now trying to rehabilitate the data center’s image, by turning one of its giant server farms into a big battery.

Last month, Google announced that it would be installing batteries to replace some of the diesel generators that provide backup power at its data center in Saint-Ghislain, Belgium — a first for the company. The move is more than a routine upgrade from old, dirty equipment to new, cleaner technology. When Google isn’t using the batteries, it plans to supply some of their energy to the local electric grid. If the experiment is successful, data centers equipped with batteries that store renewably generated power could one day become “critical components in carbon-free energy systems,” Joe Kava, vice president of global data centers at Google, wrote in a blog post.

Grist thanks its sponsors. Become one.

Data centers account for about 1 percent of global electricity usage, a figure that could rise as data-intensive activities like video streaming and cloud gaming become more popular and as more people around the world gain access to the internet. When data centers are powered with fossil fuel energy like coal and natural gas, these facilities can have a serious climate impact. As environmental groups started calling out Big Tech for all of this unseen pollution, image-conscious companies like Google and Microsoft began making an effort to clean up their data centers’ power supplies.

Today, Google is purchasing renewable energy credits to match its data center energy consumption, and by 2030, the company plans to be running all of its operations on carbon-free power all the time. But that will mean doing something about its diesel generators, which kick on to keep the internet running if the electrical grid experiences an outage. Google declined to say how frequently its diesel generators operate, or how much of its overall carbon footprint they account for. But the company estimates that worldwide, there are more than 20 gigawatts of diesel generating capacity in service across the data center industry, which is the equivalent of nearly 63 million solar photovoltaic panels — enough to power more than 833,000 homes for a month.

Grist thanks its sponsors. Become one.

Now Google is going to test-drive a lithium-ion alternative. By the third quarter of 2021, the company told Grist, the Saint-Ghislain data center will be outfitted with a battery system that can supply three megawatts of power over two hours. That is likely a small fraction of the data center’s overall power needs — it’s not uncommon for hyperscale data centers to have upwards of 40 megawatts of backup power capacity installed — and Google will still have generators on site and ready to fire up in tandem if needed, according to GreenTechMedia.

But batteries aren’t just a one-trick pony. And when Google isn’t using them as a supplementary power source, their energy can be discharged into the grid. Grid operators around the world are in the process of installing more backup batteries to supply clean energy when the wind isn’t blowing and the sun isn’t shining, and Sarah Smith, a senior scientific engineering associate at Lawrence Berkeley National Laboratory in California, felt that data centers offered a great opportunity for the tech industry to contribute to this effort.

“Data centers are a great example of where the need for reliable power is so high that they would be willing to install batteries,” Smith said. “But then that adds a lot of capacity that can serve other purposes.” Batteries, Smith said, can also help with “frequency regulation,” or maintaining a balance between how much power is being fed into the grid and how much power is being consumed, which is required for grids to run smoothly.

Gary Cook, the global climate campaigns director at the environmental advocacy organization Stand.Earth, said that the “potential is definitely there” for data centers to serve as big batteries. “In principle, yes, you can definitely sync these up in a way where they can be dispatchable to the grid and help meet the peaks of the supply curve where you have less renewable generation,” he said.

But Cook warned that simply installing batteries doesn’t necessarily make the grid greener, since they can just as easily be used to store and discharge electricity generated by a coal-fired power plant. While the Saint-Ghislain data center hosts an on-site solar farm, the new backup batteries will be charged from the grid. “As we scale across different sites and applications, different charging strategies will be possible,” a Google spokesperson wrote in an email.

Peter Garraghan, a lecturer at Lancaster University who studies cloud computing, noted that companies like Google that have the resources and public relations incentive to experiment with new clean energy technologies only own a fraction of the data centers out there. Many more are run by smaller companies for which installing large amounts of backup battery capacity remains cost-prohibitive. “It’s more of an economic problem than a technical problem,” Garraghan said.

Still, as the cost of energy storage batteries continues to drop, more and more data center operators are likely to take an interest in the technology. After all, a key responsibility of data center operators is to ensure the internet never goes dark. Perhaps, Big Tech’s quest to uphold that responsibility will help keep everyone else’s lights on, too.