Although the Misva of the Hanukah candle lighting requires only lighting in one’s home, it is customary to light also in the synagogue, and this custom is mentioned already by the Shulhan Aruch (Orah Haim 671). The standard Berachot are recited over the lighting in the synagogue ("Le’hadlik," "She’asa Nissim," and, on the first night, "She’hehiyanu").
The custom among Sephardic communities is to place the Menorah along the southern side of the synagogue, placing the first candle on the first night on the westernmost end of the Menorah, and then adding one candle each night and lighting the candles from east to west.
If the person chosen to light candles in the synagogue on the first night – when the Beracha of "She’hehiyanu" is recited – lives alone, then when he returns home and lights his own candles, he does not repeat the Beracha of "She’hehiyanu." Since this fellow lit in the synagogue and recited "She’hehiyanu," and he is lighting at home only for himself, and not for family members, he does not repeat "She’hehiyanu." This is the ruling of the Ben Ish Hai (Rav Yosef Haim of Baghdad, 1833-1909), in Parashat Vayesheb. Conversely, if the first night of Hanukah is on Friday night, when people come to the synagogue after having already lit at home, the person who lights in the synagogue omits the Beracha of "She’hehiyanu." Since he recited "She’hehiyanu" when he lit at home, he does not repeat the Beracha when he lights in the synagogue.
In his discussion of this subject, the Ben Ish Hai mentions only "She’hehiyanu," and not the Beracha of "She’asa Nissim." The clear implication of his comments is that in both these cases, the Beracha of "She’asa Nissim" is repeated. In the Ben Ish Hai’s view, it seems, the Beracha of "She’hehiyanu" refers to the holiday of Hanukah, such that once it is recited on Hanukah it cannot be then repeated, whereas the Beracha of "She’asa Nissim" is linked to the act of lighting. And therefore, whenever one lights with a Beracha, he recites not only the Beracha of "Le’hadlik," but also the Beracha of "She’asa Nissim." This is also the view of Hacham Bension Abba Shaul (Israel, 1924-1998).
However, Hacham Ovadia Yosef cites those who disagree, and who maintain that the Beracha of "She’asa Nissim" resembles "She’hehiyanu" in this regard. Therefore, if a person lit in the synagogue, and he lives alone, when he lights at home he recites only the first Beracha – "Le’hadlik." Conversely, on Friday night, the one who lights in the synagogue recites only "Le’hadlik," and does not repeat "She’asa Nissim" or, on the first night, "She’hehiyanu."
Hacham Ovadia rules that if a synagogue has several different Minyanim for Minha, Hanukah candles are lit after each Minyan, with the recitation of Berachot. Even though candles were lit in the previous Minyanim, each Minyan lights candles, and the Berachot are recited. Hacham Ovadia notes that this is the custom is the famous Musayof synagogue in Jerusalem, which has many different Minyanim for Minha. Hacham Bension, however, maintained that it is preferable in such synagogues for candles to be lit after the first Minyan with enough oil supplied for the candles to burn throughout the duration of all subsequent Minyanim.
It should be noted that if a Minyan is being held for Arbit late in the evening during Hanukah, such as at 10pm, and the people had clearly all prayed Minha in the synagogue where candles were lit, new candles are not lit at the Minyan for Arbit.
Candles are lit in the synagogue only if ten people are present. Hacham Bension maintained that the presence of ten men is required for the synagogue lighting, but the Ben Ish Hai appeared to have held that women in the women’s section can also be included. Since women are required to light Hanukah candles just as men are, they may be counted towards the group of ten that is necessary for the synagogue candle lighting. Sometimes, on Friday afternoon, ten men have not yet arrived by the time the Hanukah candles need to be lit in the synagogue. In such a case, the congregation may rely on the ruling of the Ben Ish Hai and count the women present in the women’s section towards the required quorum of ten people, so the candles may be lit, with a Beracha.
Hacham Benssion addresses the question of whether gentiles may be included in the "Pirsumeh Nisa" (publicizing of the miracle) required for the synagogue lighting. He concludes that non-Jews are not included in "Pirsumeh Nisa," and thus specifically ten Jews are needed for the synagogue lighting.
Summary: If the one who lights candles in the synagogue lives alone, then when he returns home and lights Hanukah candles, he repeats only the Beracha of "Le’hadlik"; he does not recite "She’asa Nissim," or "She’hehiyanu" on the first night. On Friday night, the one who lights candles in the synagogue recites only "Le’hadlik," and does not repeat "She’asa Nissim" or "She’hehiyanu." If a synagogue has several different Minyanim for Minha, the Hanukah candles are lit after each Minyan, with the Berachot. Candles are lit in the synagogue only if ten people – men or women – are present.