Safety precautions for Chanukah lighting-Relevant laws:
Unfortunately, the month of December is recorded to have the greatest number of house fires throughout different countries in the world, many of which are attributed towards religious lightings which were left unsupervised. Being irresponsible with the supervision of a flame endangers the life of one’s family and neighbors. It only takes minutes for a conflagration to begin and become uncontrollable, and thus proper precautions must be taken. Practically, as advised by fire experts, and as common-sense dictates, and as sourced within Halacha, one is to never leave a flame unattended. Thus, if one needs to leave the home after a half hour from the candle lighting, he is to extinguish the candle beforehand, as Halacha permits as explained in B. Likewise, prior to going to sleep, one is to extinguish the candle. If after the half hour he would like to go into another area of the home, the candles should be taken with him, as Halacha permits. If one plans to leave the home within a half hour, then he should only light a minimal amount of oil [a half hour worth] and initially light it on a safe surface, such as on one’s counter, not near any flammable items.
B. May one extinguish the flames once they have been lit for a half hour:
Once the flames have been lit for their minimum time, which is a half hour past nightfall, they may be extinguished. Initially, it is proper to stipulate that only a half hours’ worth of the oil is designated for the Mitzvah, if one intends to extinguish it after this time. [Thus, it is advisable to say prior to the lighting, that the oil is not sanctified for the Mitzvah once a half hour has passed and he decides to extinguish it. This stipulation may be done even several days before Chanukah, and suffices to be done one time if one has in mind for it to count for the lighting of all the days of Chanukkah. According to all, the Shamash may be extinguished after the time of a half hour, even without stipulation.]
C. May one move the Menorah after it is lit a half hour:
After the menorah has been alight for the required time of 30 minutes [after nightfall], it may be moved even if the lights are still aflame.
D. Children lighting their Menorah by their bedroom:
The Rebbe suggested that children should light their Menorah in the entrance to their bedroom and states that doing so has a greater effect on the child and his education. However, this is only if it can be properly supervised and that doing so does not pose a safety hazard. Practically, after a half hour past nightfall, it is to be moved
E. May the Menorah of a Shul be extinguished after it is lit, even prior to remaining lit for a half hour?
Some Poskim rule one may extinguish the candle upon everyone leaving the Shul, even prior to the passing of a half hour. Other Poskim however rule one is not to extinguish the candles until a half hour passes after nightfall. Practically, if there is worry of fire or the Menorah getting stolen, one may be lenient.
After a half hour: Once the Menorah has been lit for a half hour, it may be extinguished.
 See regarding the night of Yom Kippur that people would stay up to guard the candles in Shul, while others would hire a gentile to do so: Admur 610:7 [hiring gentile]; 619:18 [Staying up in Shul to gaurd]; M”A 610:4; Maharil p. 322
 See M”A 675:2; Chapter 3 Halacha 13!
 Michaber 672:2; Rif and Rosh; Rashal 85
Other opinions: Some Poskim rule one is not to extinguish the candle even after the time has passed, being that all the oil was placed for the sake of the Mitzvah, and that so is the custom. [Bach and Tzeida Laderech, brought in M”A 672:4; 677:10; Peri Chadash 677; Shulchan Gavoa 672:9; Kaf Hachaim 672:21] Furthermore, some Poskim rule that those who light inside their home, must place enough oil to last until the people at home go to sleep, and one may not extinguish or make use of the candles until the time people go to sleep and the candles thus no longer serves as a publication. [Mishmeres Shalom 48:1; Piskeiy Teshuvos 672:4-5 footnote 24; see there footnote 16 and 23 for Melaktim who bring a similar opinion] Other Poskim rule that those who light outside their home are to place enough oil to last until people are no longer found outside, which is approximately 9:00, and one may not extinguish or make use of the candles until that time. [Teshuvos Vehanhagos 1:390; Moadim Uzmanim 2:141; 6:86; Piskeiy Teshuvos 672:5] Practically, this novelty is not recorded in the classical Poskim.
 The reason: As one only designates the amount of oil necessary to fulfill the Mitzvah, and hence the excess oil is not considered Holy. The candle may thus be extinguished and then relit for one’s personal use. [Beis Yosef 677; M”B 672:7]
 Mahariy brought in Beis Yosef 677; M”A 677:10; Elya Raba 672:2; Chayeh Adam; M”B 672:7; Kaf Hachaim 672:21
The reason: Some Poskim conclude that it is initially proper to stipulate that one does not have intent to designate the oil for more than the necessary amount of time, as there are Poskim [Mahariy brought in Beis Yosef] who rule that if did not make this stipulation, then the entire oil is designated for the Mitzvah and may hence not be extinguished. [Poskim ibid]
Other opinions: Some Poskim rule it is not necessary at all to make any stipulation when placing the oil, and it may be extinguished after a half hour in all cases. [Taz 672:1; first answer in Beis Yosef 677] The Elya Raba ibid negates this opinion of the Taz.
 See Admur 638:7 regarding stipulating on Noiy Sukkah for the entire duration of Sukkos
 Yosef Ometz 1076; Kinyan Torah 2:102; Shraga Hameir 3:16; Piskeiy Teshuvos 672:5
 M”A 675:2; Darkei Moshe 675:1; Rav Yaakov Viyaal; Elya Raba 675:2; M”B 675:6; Kaf Hachaim 675:10; M”B 675:6; Sefer Haminhagim p.160 [English]
Other Opinions: Some Poskim rule one is not to move the Menorah so long as the candles remain lit, even after 30 minutes have passed. This is due to Maaras Ayin. [Elya Raba 672:2; Derech Hachaim 4; Shaar Hatziyon 672:12; Kaf Hachaim 672:22; based on M”A 670:2 in name of Rashal regarding being stringent not to use the light past this time] Some Poskim rule that those who light inside their home, are not to move the Menorah even after the time has passed, although in a time of need one may be lenient and place it by a window and the like. [Mishmeres Shalom 48:1; Piskeiy Teshuvos 675:1] See Miseches Sofrim “One does not move the Menorah until it extinguishes”
 Toras Menachem 5748 2:64[brought in Shaareiy Halacha Uminhag 2:280; Shulchan Menachem 3:269]
 Shraga Hameir 6:85
 The reason: As it does not state anywhere in [earlier] Poskim that the Shul candles need to remain lit for a half hour. Furthermore, since the entire purpose of the lighting in Shul is Pirsumei Nissa, it is implied that it can be extinguished once the Pirsumei Nissa has ended. Therefore one may be lenient to extinguish the candles even within a half hour, if there is no one left in Shul. [ibid]
 Shevet Halevi 8:156
 The reason: As the Menorah in the Temple was lit throughout the night and the Menorah in Shul is lit in commemoration of the Temple’s Menorah, according to some opinions. Furthermore, according to some opinions, one fulfills his obligation with the Shul’s lighting and hence it should follow the same laws as any other Menorah. [Shevet Halevi ibid]
 Shevet Halevi ibid; Piskeiy Teshuvos 671:12
 Melameid Lehoil 121; See Zivcheiy Tzedek 2:29; See Michaber 672:2 and Halacha 7 regarding this ruling in the house Menorah.