This article contributes to the local turn in migration research. It explores how the city context shapes migration attitudes among residents, resulting in the formation of imagined communities of 'Locals' and 'Others'. Relying on qualitative research methods and cultural sociological theories of cultural armatures of the city, cultural repertoires, and symbolic boundaries, we examine the cases of two Czech cities, Teplice and Vyšší Brod. We find that the specific characteristics of the local history, geography, and demography of the cities give rise to distinct cultural repertoires that shape how their residents view migration and the presence of people with a migratory background in their city. We identify two prevailing cultural repertoires, local cosmopolitanism in Teplice and Czech nativism in Vyšší Brod, which inform both the patterns of boundary work towards residents with a migratory background and their positioning on local hierarchies of otherness. We argue that to understand the role of local context in the formation of migration attitudes, it is not sufficient to study only the characteristics of cities; how these characteristics are made meaningful by the people who live in them should also be considered.