Yosef Karo, Translation:Shulchan Aruch — Orach Chaim 671…
“ Paragraph 5 — One should place the Hanukkah light at the outside of the entrance that adjoins the public domain. If the house opens to the public domain, he should place it at its entrance. If there is a courtyard in front of the house, he should place it at the entrance of the courtyard. If he lives in the upper floor, having no entrance leading to the public domain, he should place it at a window that adjoins the public domain. In a time of danger, when one is not allowed to perform mitzvot, it is enough that he place it on his table. ”
