Smart cities are presented as both inevitable and benign futures: the technological development is unstoppable and will bring us wealthier, safer and more sustainable cities. Putting technology to use, however, is never entirely a matter of engineering but of strategic, political and value-laden choices. This article combines the literature on technology in the public sector and on (urban) governance to develop a public governance perspective on smart cities. The central theoretical concept "datapolis" highlights how the construction of smart cities can be understood in term of "actors", "rules", and "games" of urban governance. The theoretical analysis results in the identification of three types of actors (state, market, and civil society), three governance challenges (balancing perceptions, guaranteeing checks and balances and building upon different forms of knowing), and five governance games (the politics of data collection, data storage, data usage, data visualization and data access). The governance of smart cities is re-conceptualized as the socio-technical structures that emerge from the governance games. The governance challenge is to develop legitimate rules for perceptions, power relations and decisions in smart cities.