It is customary to use matza for the eruv, as it has a long shelf life and can continue to serve as the eruv for as long as it remains edible (SA 368:5). Common practice is to set aside a new eruv before Pesaĥ each year and to recite the berakha and the formula for setting aside the eruv of the upcoming year (detailed below). In many communities, the rabbi is given the honor of performing this ritual on behalf of the community. Even if the residents forgot to set aside a new eruv before Pesaĥ, as long as the old eruv is still in existence, one may continue carrying throughout the enclosed area.
The eruv must be placed in one box or bag. The custom is to leave it in the synagogue or nearby, as the synagogue is a communal space.
Before setting aside the eruv, one must make sure that it belongs to all residents of the city. Therefore, the person charged with setting aside the eruv first lifts the matzot one tefaĥ with the intent to acquire them on behalf of all the city’s residents. In order for him to acquire the matzot successfully, they must have previously belonged to a different person.
Before acquiring the eruv and setting it aside, the following berakha must be recited: “Blessed are You, Lord our God, King of the universe, Who sanctified us with His mitzvot and commanded us concerning the mitzva of eruv” (“asher kideshanu be-mitzvotav ve-tzivanu al mitzvat eruv”). Afterward, he should recite:
With this eruv it shall be permitted to us (all the people living here in the town, city, or courtyard) to bring things in and out – from the houses to the yard and the yard to the houses, from house to house, from yard to yard, from roof to roof, from houses and yards to alleyways, and from alleyways to houses and yards in this city – for us, all who live here, and whoever joins us during all upcoming Shabbatot and holidays. (SA 365:15; MB ad loc. 83)