Cities are known for improving quality of life, yet they also face numerous challenges as they evolve. In this issue of Nature Cities, which includes a Focus on smart cities, we delve into how cities generate opportunities to fulfill fundamental human needs such as food and shelter, all the while encountering obstacles in adopting new services, promoting equity and implementing policies.