On the night of the 14th of Nissan (meaning, the night before Erev Pesach), we conduct Bedikat Hametz – the search for Hametz in our homes by candlelight, as the first Mishna in Masechet Pesachim requires.
The Shulchan Aruch explicitly rules that a search must be performed also in the Batei Kenesset (synagogues) and Batei Midrash (study halls), since children would often bring food into these places. This would certainly apply nowadays, as well, when many synagogues host meals or celebrations on various occasions (Shabbat, Rosh Chodesh, etc.). Every community thus bears an obligation to see to it that Bedikat Hametz is conducted in the synagogue on the night of the 14th of Nissan by candlelight; this is generally the responsibility of the Shamash (synagogue attendant) or the Rabbi. The one performing the Bedika in the synagogue first conducts the search in his home. When he recites the Beracha before beginning the search in his home, he should have in mind that the Beracha applies also to his subsequent search in the synagogue. After concluding his search in his home, he then goes the synagogue and conducts the Bedika without reciting a Beracha.
The Peri Chadash (Rabbi Chizkiya De Silva, Italy, 1659-1698) bemoaned the fact that many communities were negligent with regard to this obligation, and would have the synagogue either checked for Hametz on the morning of Erev Pesach, or just cleaned a few days before Pesach, without ever undergoing a formal Bedika. Communities must ensure that a proper, formal Bedikat Hametz be conducted in the synagogue, just as a Bedika is performed in one's home.