סימן צז סעיף ח
אֵין לְקַדְּשָׁהּ רַק תַּחַת הַשָּׁמַיִם וְלֹא תַּחַת גָּג. אַבָל אִם אֵין לוֹ מָקוֹם נָקִי אוֹ מֵחֲמַת אֹנֶס אַחֵר, יָכוֹל לְקַדְּשָׁהּ גַּם בְּתוֹךְ הַבַּיִת בְּעַד הַחַלּוֹן.
The moon must be sanctified only under the heavens (open sky) and not under a roof.17Ramah 426:4—Rif. Since the mitzvah is akin to greeting the Divine Presence (shechina), it is disrespectful not to go outside and do it. However, if you have a slight cold or illness, you may do it from your house. (Mogen Avraham, Bach) If, however, there is no clean place [outside] or because of another situation beyond your control [you cannot go outside]; you may sanctify it inside the house through the window.18It is preferable to do it through an open window if possible. (Shaar Hatziyun 426:25, Pri Megadim)
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)