As a result of rural and suburban migration to the cities, urban life has become a significant challenge for citizens and, particularly, for city administrators who must manage the sustainable use of resources such as energy, water, and transportation. Smart cities are the biggest vision to efficiently address these challenges through a real-time monitoring, providing an intelligent planning and a sustainable urban development. However, to accomplish them we need a tightly integration among citizens, city devices, city administrators, and the data center platform where all data is stored, combined, and processed. In this context, we propose ElCity, a model that combines citizens and city devices data to enable an elastic multilevel management of energy consumption for a particular city. As design decision, this management must occur automatically without affecting the quality of already offered services. The main contribution of ElCity model concerns the exploration of the cloud elasticity concept in multiple target levels (smartphones from citizens, city devices involved in the public lightning, and data center nodes), turning on or off the resources on each level in accordance with their demands. In this way, this article presents the ElCity architecture, detailing its modules distributed along the three data sources, in addition to an experiment that uses city devices and citizens data from Rome to explore energy saving. The results are promising, with an Energy Monitor module that allows the estimation of the energy consumption of elastic applications based on CPU and memory traces with an average and median precision of 97.15 and 97.72 percent. Moreover, we proposed a reduction of more than 90 percent in the energy spent in public lightning in the city of Rome which was obtained thanks to an analysis of geolocation data from their citizens.