Apple’s data centers in Prineville will use recycled “graywater” to help cool the servers inside.

Apple confirmed last week that it has agreed to pay for a treatment facility to re-use water for evaporative cooling in its Prineville data centers. By recycling water for Apple instead of taking it straight from the tap, the city says its new facility will save nearly 5 million gallons a year, the company claims.

The treatment center will have the potential to expand considerably to serve new data centers or other industries that might come to Prineville. Apple declined to say how much it will spend on the facility, but Prineville said it expects the company’s tab will run into the “millions of dollars.”

The recycled water will come from the city’s regular sewage treatment system, water that would otherwise have been less rigorously treated before being used at the city’s golf course or flow to pasturelands or into the Crooked River. The city says it has other water rights that provide adequate supplies for those other purposes.

Apple’s data centers play a crucial role in the company’s online photo storage, video and music streaming, and its FaceTime video chat and iMessage texting service. The company touts its use of wind energy to power the Prineville data center and said the wastewater treatment center is a manifestation of its environmental stewardship.

“We are proud to partner with Crook County and the City of Prineville on this effort, and are committed to doing our part to preserve natural resources,” Apple said in a written statement.