ONE MUST LIGHT NER CHANUKAH WITHIN 20 AMOS [Ner Chanukah: height]
(Mishnah): If a Mavoy (i.e. a beam to permit carrying in an alleyway) is more than 20 Amos above the ground, it must be lowered.
Shabbos 21b (Rav Kahana): If Ner Chanukah was placed above 20 Amos, this does not fulfill the Mitzvah, just like a Sukah or Korah [more than 20 Amos high is invalid].
23a (R. Yehoshua ben Levi): If a big lantern burned the entire day, one may extinguish it on Motzei Shabbos and relight it [for Ner Chanukah].
If the Mitzvah is Hadlakah (lighting), we understand why it suffices to extinguish it and relight it.
However, if the Mitzvah is Hanachah (placing it), he should also have to pick it up and put it down!
Sukah 2a (Rabah): A Sukah above 20 is Pasul due to "Lema'am Yed'u Doroseichem Ki ba'Sukos Hoshavti." One [sees the Schach and] knows that he is in a Sukah only if it is at most 20 Amos tall.
2b: Those who argue with Rabah expound "Lema'am Yed'u Doroseichem" to teach that future generations will know.
R. Yoshiyah taught that if the walls reach the Schach, it is Kosher even above 20. This is like Rabah, who says that one must see the Schach. If the walls reach the Schach, one sees it.
Rambam (Hilchos Megilah and Chanukah 4:7): If one put Ner Chanukah about 20 Amos, it did not help at all, for it is not noticeable.
Tosfos (22a DH Ner): Why didn't Rav Kahana teach that if one lit too high, he should lower it, like it says about a Mavoy? It is proper to teach how to fix a mid'Rabanan matter! I answer that he taught 'Pasul', for he wanted to teach 'like Sukah', which is mid'Oraisa. Alternatively, he would have had to elaborate and say 'he must extinguish it, lower it and relight it.' He cannot lower it while it is lit. This is clear from the Gemara later.
Tosfos (23a DH Mechaveh): [According to the opinion that the Mitzvah is Hanachah], why must he extinguish it and light it again? It should suffice to pick it up, since the Mitzvah is Hanachah! Is it any worse because it was already burning than if a Cheresh, lunatic or child lit it?! I answer that he initially lit it for the sake of Shabbos. Therefore, it is worse than if a Cheresh, lunatic or child lit it. There, when he lights it in its time, it is recognized that he lights it for the sake of Chanukah (Riva).
Tosfos (Sukah 2a DH d'Oraisa): Rav Kahana taught that a Ner Chanukah above 20 is Pasul, just like a Sukah or Mavoy. He said Pasul [and did not say to lower it], like the Mishnah says about Sukah. Alternatively, "he lowers it" would connote while it is burning. This is not true according to the opinion that the Mitzvah is Hadlakah. Even according to the opinion that Hanachah is the Mitzvah, we are concerned lest an onlooker say that he lit it for his needs, like we say about one who lit it inside and placed it outside.
Beis Yosef (OC 671 DH u'Mah): Tosfos (22a DH Ner) says that if one put Ner Chanukah above 20, and lowered it while it is lit, he was not Yotzei, for the Mitzvah is Hadlakah. Rather, he must extinguish it, lower it and relight it.
Gra (on 671:6 DH d'Hadlakah): Our Tosfos does not say like the Beis Yosef cites, but he connotes like this. (I.e. it is not merely Asur to lower it while it is burning. Rather, he was not Yotzei if he does so - PF.) Tosfos brings a proof from the Gemara later, i.e. a lantern (23a). See Tosfos (23a DH Mechaveh). However, in Sukah, Tosfos says that even according to the opinion [that the Mitzvah is Hanachah, he must extinguish it and relight it]. Tosfos 22a alludes to this. This is unlike a lantern, for there it is in its place.
Tosfos (Sukah 2b DH v'Kivan): When the walls reach the Schach, it is Kosher even above 20. This is unlike Ner Chanukah and Mavoy. There, there is no Heker above 20 even if the Korah is on walls, for it is only a Tefach wide, so one does not see it the way one sees Schach, which is wider.
Shulchan Aruch (OC 671:5): One who lives in an Aliyah (upper story) and has no opening to Reshus ha'Rabim, he puts Ner Chanukah in the window close to Reshus ha'Rabim. In times of danger when one may not fulfill the Mitzvah, it suffices to light on one's table.
Mishbetzos Zahav: If it is 20 high, it does not help at all. However, since we light inside, one may leave it in the window. In any case there is some Heker to Bnei Reshus ha'Rabim. This is better [than lighting in the house].
Shulchan Aruch (6): If one left Ner Chanukah above 20 Amos, he was not Yotzei, for the Mitzvah is lighting it.
Beis Yosef (DH u'Mah she'Chasav): Rashi explains that Ner Chanukah above 20 is Pasul, for one does not see it. There is no publicity of the miracle. This does not fulfill the Mitzvah, just like a Sukah or Korah above 20 is invalid.
Tur (OC 671): R. Yo'el ha'Levi says that this is only when he puts it outside. When it is in his house, it is Kosher even above 20. This is like we say about a Sukah. If the walls reach the Schach, it is Kosher even above 20, for one sees the Schach. I disagree. There, one must be able to can see the roof. Since the walls reach the roof, one sees the roof. Here, one must see the Neros. Since they are above 20, one does not see them. How does the roof help, which is above them? This does not help to see the Neros better.
Beis Yosef (DH v'Chasav): Mahari Avuhav says that R. Yo'el holds that when there is air, this impairs vision. One cannot see above as high as he wants. He brings a proof from walls that reach the Schach. It is Kosher even above 20, for one sees the Schach. The Tur's question does not refute this.
Pri Chodosh (6): R. Yo'el brings from Sukah that it is Kosher if walls reach up to it. Even though the Halachah does not follow Rabah regarding Sukah, this is because we expound "Lema'am Yed'u" differently, so we do not require that one can see the Schach. Chanukah is to publicize the miracle. All agree that if the walls reach [the Ner], it is Kosher even above 20. However, Tosfos says that Ner Chanukah and Korah are different. There is no Heker above 20 even if the Korah is on walls, for it is only a Tefach wide. Also the Ran and Tur say unlike R. Yo'el. This is the Halachah. The Bach rules like this. This is why the Mechaber wrote Stam [whether or not the walls reach the Ner.]
Pri Chodosh (6 DH u'Mah): Even according to the opinion that the Mitzvah is Hanachah, he must extinguish it and light again, like Tosfos said. He must bless again.
Eshel Avraham (7): It is not clear that he blesses again, for some permit lighting above 20 in the house, especially in a Chanukiyah special for Neros Chanukah. [It is clear that he did not light for his needs].
Taz (5): I do not understand Mahari Avuhav. If the Pesul above 20 is because air impairs vision, why did the Gemara say that Rabah permits when the walls reach the Schach? It should be Kosher even if a little wall is next to the Schach in the Shi'ur above 20 (i.e. the wall extends to below 20 Amos - PF), and there is a small wall below. Since there is no air in the Shi'ur, the air below 20 will not hurt. If we would not say so, even Schach below 20 should be Pasul [when the walls do not reach to it]. This is good according to the Tur. One can see above  only if the wall goes up [continuously] from below. This leads the eye to see the Schach. Therefore, there cannot be a Hefsek (interruption). Any Hefsek interrupts vision. The Tur is primary. Ner Chanukah above 20 is Pasul even in a house with walls. Further, it is unreasonable to be Machshir a Ner due to walls. The primary Mitzvah is after Tzeis ha'Kochavim. If one sees the Ner only due to the walls, at night he cannot see the walls, so he cannot see the Ner!
Mishnah Berurah (28): We do not distinguish lighting outside from in the house.
Pri Chodosh (5 DH u'Mah she'Chasav u'Manichah): Surely, if the window is above 20, one puts it [not in the window, rather,] at the opening of his house
Mishbetzos Zahav: Tosfos (Sukah 2b) says that even if a Korah is on walls, it is not noticeable, for it is only a Tefach. The same applies to Ner Chanukah. Rav Kahana taught that it is Pasul just like Sukah and a Mavoy, i.e. even if the walls reach the Korah, and even if they reach the Schach, for the Halachah follows Rava (Darchei Moshe 3, citing Mahara mi'Prag). The Pesul above 20 is even with long candles, whenever the flame is above 20, especially according to the Taz, who says that walls are not noticeable at night. In 633:1, we disqualify only if the gap [of the Sukah] is 20 Amos. The law here requires investigation.
Kaf ha'Chayim (48): We measure 20 Amos from Reshus ha'Rabim, not from the floor of the house. However, since we hold that the primary Heker is for the household, it suffices within 20 Amos of the floor of the house. However, perhaps even for us, if it is 20 above Reshus ha'Rabim, since they cannot see it, perhaps it is better in the Tefach near the Mezuzah. Nowadays people leave it above 20 even not in a window. They rely on the Mordechai, who says that since we light inside, we are not concerned. In any case one should light within 10 Tefachim of the ground, like the Mechaber and Ari Zal said.