I have heard (and daf yomi is reinforcing the impression) that an eiruv depends on two things: the boundary, and that there is some sort of communal food that is shared by those in the enclosed community (e.g. all the houses around a courtyard). How does this work in neighborhood/town eiruvim? Does this mean that, somewhere in my neighborhood, every Shabbat there's some communal food that, if I wanted to, I could show up and eat? Does it have to be accessible, or does it still effect the eiruv if it's behind a locked door?
Most city Eruvin use Matza as the food because it doesn't spoil quickly (Rama OC 368:5). There must be at least 6 (some say 8) eggs' worth of Matza, unless there are less than 18 people in the city in which case there needs to be one dried fig's worth per person (Sh"A OC 368:3). The Matza must belong to everyone. If one person wants to donate Matza to everyone, he must have a non-relative acquire it from him on everyone else's behalf (OC 366:9-10). If anyone does not want anyone else to be allowed to partake of the Matza, the Eruv is invalid (OC 366:5). The Matza must be in a place where one could access it without violating any other Shabbat laws for the entirety of Bein haShemashot (sunset through nightfall) on Friday night, after which is can be consumed (Sh"A and Rama OC 394:2-3). The custom is to leave the Matza in a synagogue (Rama 366:3). As long as the Matza still exists after a given Shabbat and is still edible, it can be used for any number of subsequent Shabbatot (Sh"A OC 368:4-5).