Data centres are important players in smart cities both as IT service providers and as energy consumers. Integrating intermittent renewable energy sources into the local power grid is one challenge in future smart cities aiming at an IT based low carbon economy. The project DC4Cities takes up this challenge by offering a both technical and business related solution for optimizing the usage of renewable power sources when operating data centres in metropolitan areas. To this end, power management options between the data centre and the smart city together with internal adaptation strategies for data centres are introduced. Finally, an implementation of the suggested approach is presented and evaluated with real IT services on three trials (Barcelona, Milan and Trento).