Image by Earl Wilkerson.

Apple is cleaning up its energy act.

The computer company says that by early next year, the energy used to power its worldwide data centers will all come from renewable sources, such as solar, wind power, or hydroelectric dams. It announced the news Thursday in a post on its website.

That’s a victory for the environmental activists at Greenpeace, who have been pressuring Apple for more than a year to clean up its act and commit to renewable energy.