Those who light inside their home-Should they light by the doorpost of one of the rooms or by the window?
A. The law of placing by the doorpost when lighting outside the home:
Within a Tefach: It is a Mitzvah for the candles to be placed within at least one Tefach of the doorway. One is not to light it a further than a Tefach distance from the doorway. [Practically, the Menorah is initially to be placed within the actual doorway, between the doorposts, although in a time of need, one may place it within one Tefach of the door.]
Left side: The Menorah is to be placed on the left side of the entrance, which is opposite the Mezuzah. If one is lighting the Menorah within the actual doorpost, then it is to be placed [directly] against the left doorpost. If one lit the Menorah on the right side, near the Mezuzah, instead of the left side, he nevertheless fulfills his obligation. If the door does not have a Mezuzah, one is to place the Menorah on the right side. [It requires further analysis if this applies even if the door is obligated in a Mezuzah but does not have one, or only if the door is exempt from Mezuzah, for whatever reason.]
B. The law when lighting inside the house-doorpost versus window:
The above positioning of the Menorah [within a Tefach of the doorpost] applies whether one is lighting the candles inside the house or outside the house. Thus, those who light inside the house, are to light the Menorah within one Tefach of the doorpost [of a room in the house, adjacent to the left doorpost opposite the Mezuzah]. One is not to swerve from this custom. [However, some Poskim rule that when lighting inside the house, if there is a window available that is faces the public, the candles should be placed by the window rather than by an inside doorpost. If, however, the window is 20 Amos above ground [from where people walk], then according to all, it is to be lit by the doorpost. The Chabad custom follows the former opinion, to light by the doorpost in all cases, and not to light by the window.]
The Menorah is initially to be placed within the doorway of a room [or entrance of the house for those who light outside], between the doorposts, although in a time of need, one may place it within one Tefach of the doorpost. It is to be placed on the left side of the entrance, which is opposite the Mezuzah. It is to be placed directly against the left doorpost. Some are accustomed to light the Menorah by the window, and not by the doorway. This is not the Chabad custom.
In one sentence: The Menorah is to be lit inside the house within the doorpost of a room, directly against the left doorpost, opposite the Mezuzah.
Where is the Menorah to be lit by a doorpost that only contains a Mezuzah due to doubt or stringency?
One is to place the Menorah opposite the Mezuzah even in such a case.
 671:7; Shabbos 22a
 Michaber ibid
 The reason: As if one distances the Menorah more than one Tefach from the door, it is not apparent that the homeowner lit it. [Rashi Shabbos ibid; Levush; M”B 671:31]
 Siddur Admur [Siddur Raskin p. 599]; Mateh Moshe 979 in name of Rashal brought in M”A 671:4; See Shaar Hakolel 46:1
The reason: This is similar to the Mezuzah, which is placed on the actual doorpost. [See M”A ibid]
Custom of Arizal: The Arizal was not careful to place the Menorah by the actual doorway, between the doorposts. [Peri Eitz Chaim Shaar Chanukah 4]
 Michaber ibid; Shabbos ibid
 The reason: This is done in order to have the Mezuzah on the right side and the Chanukah candles on the left side [Michaber ibid] in order so one be surrounded by Mitzvos. [Levush; M”B 671:33; Kaf Hachaim 671:58]
Heker Tzir: Those doors which have a Mezuzah placed in accordance to Heker Tzir [which is the Chabad custom for the doors of all the inner rooms of the house] the candles are to be placed opposite the Mezuzah, and this is considered the left side.
 Taz 671:6; Elya Raba 671:14; M”B 671:36; Kaf Hachaim 671:62; Sefer Haminhagim p. 157 [English]
Other opinions: The Michaber 671:7 writes to place it within more than half way towards the left doorpost. The M”A 671:8 explains this to mean that one is to place it anywhere within the half closest to the left door post [if the door area were to be split in half], and it does not have to be actually by the edge of the left side. However, the Taz ibid holds that it needs to be placed at the actual edge, and so rules the M”B ibid.
 Michaber ibid
 Peri Chadash; M”B 671:33; Kaf Hachaim 671:57
 Michaber ibid; Avi Haezriy in Tur; Sefer Hamamarim 1883 Neir Chanukah; Shaareiy Moadim p. 250
The reason: As by all Mitzvahs one precedes the right side to the left. ]Maharil 40; M”B 671:34; Kaf Hachaim 671:59] Furthermore, placing it on the right side brings greater publication of the miracle, being everyone turns to the right. [Bach; M”B 671:34; Kaf Hachaim 671:59]
 Sefer Hamamarim 5643 Neir Chanukah
 Rama 671:7; Ohel Moed Shaar Moed Katan; Bnei Yissachar Mamar 4:65; Mishmeres Shalom 48:1; Likkutei Maharich p. 106; Sefer Haminhagim p. 158 [English]; The Rama ibid writes as follows “Today since we all light inside the house and there is no publication of the Mitzvah to the public, it is not of so much importance to light within a Tefach near the doorpost [of an inner room of the house]. Nevertheless, the custom is to light within a Tefach of the doorpost just as was done in previous times [when the Menorah was lit outside the house]. One is not to swerve from this custom.”
 Rama ibid
The reason: In order that one enter through a doorway and pass in between two Mitzvos. [Darkei Moshe; M”A 671:8; M”B 671:37; Kaf Hachaim 671:63]
 Michaber 671:5 based on Shabbos ibid [He writes that when lighting in an upper story home one is to light by a window. Likewise, he rules that in times of danger one places the Menorah on his table and this suffices. The Michaber does not mention in either occasion that one is to light the Menorah by the doorpost.]; Magen Avraham 671:8; Chayeh Adam 164:16; M”B 671:38; Kaf Hachaim 671:39 and 64; Igros Moshe 4:125 that the custom is to light by the window, towards the public
If the window is above ten Tefach from floor of house: When lighting by a window, it may be placed there even if the window is above 10 Tefach from the floor of the house. [Magen Avraham 671:6] See Halacha 10B! Nevertheless, it is not necessary for the Menorah to be above three Tefach from the window sill. [Aruch Hashulchan 671:22] Although, it is preferably to be higher than three Tefachim from the floor of the home. [M”B 671:27]
If the window is not clear glass: Those accustomed to light by the window, are to do so even if window is closed and is not made of clear glass, as the passersby nevertheless see candles lit, which publicizes the miracle, even though the number of candles are blurred. [Rav Elyashiv, brought in Piskeiy Teshuvos 671 footnote 14]
 The reason: As the Mitzvah of Pirsumei Nissa overrides the advantage of walking in between the two Mitzvos. [Levush; Kaf Hachaim 671:64]
 Peri Chadash; Chayeh Adam 154:16; Machatzis Hashekel 671:6; Pischeiy Teshuvah; Shaar Hatziyon 671:42; Kaf Hachaim 671:39; 48; Piskeiy Teshuvos 671:8; See Likkutei Sichos 5:456
The reason: As when lighting towards the outside, its purpose is for the public to see the Menorah, and if it is above 20 Amos from the ground, they cannot see the Menorah. [Kaf Hachaim 671:48]
Other opinions: Some Poskim rule that even in such a case, one is to light by the window, as there is some publication to the public. [P”M 672 M”Z 5]
If there are other buildings of the same height opposite one’s window: If there are other tall building opposite one’s window which is above 20 Amos from the ground, some Poskim rule that one may light by his window, rather than inside, as it is within eyes view of the inhabitants of the other building, and hence performs Pirsumei Nissa. [Shevet Halevi 4:65] Other Poskim, however, rule that this does not suffice, as the publication must be to people walking by, and hence one should light the candles inside the home. [Teshuvos Vehanhagos 2:343; Piskeiy Teshuvos 672:8 footnote 32 in name of Rav Elyashiv]
 Sefer Haminhagim p. 158 [English]; Sefer Hasichos 5706 p. 21; Igros Kodesh [Rayatz] 4:181; Likkutei Sichos 5:456
The reason: The Rebbe argued that lighting the candles by the window is disadvantageous for several reasons: 1) Often the house is 20 Amos above ground level. 2) It prevents the publication of the miracle to the family, as many menorahs are made in a way that the back panel only allows the candles to be seen from one side, and it is better to publicize the miracle to one’s family than to the public. [Likkutei Sichos ibid]
 Az Nidbaru 10:25; Kinyan Torah 2:119; Piskeiy Teshuvos 671:10