Hanukkah in the Babylonian Talmud Tractate Shabbat 21b-23b
תָּנוּ רַבָּנַן: נֵר חֲנוּכָּה מִצְוָה לְהַנִּיחָהּ עַל פֶּתַח בֵּיתוֹ מִבַּחוּץ. אִם הָיָה דָּר בַּעֲלִיָּיה — מַנִּיחָהּ בַּחַלּוֹן הַסְּמוּכָה לִרְשׁוּת הָרַבִּים. וּבִשְׁעַת הַסַּכָּנָה — מַנִּיחָהּ עַל שֻׁלְחָנוֹ וְדַיּוֹ.
The Sages taught in a baraita: It is a mitzva to place the Hanukkah lamp at the entrance to one’s house on the outside, so that all can see it. If he lived upstairs, he places it at the window adjacent to the public domain. And in a time of danger, when the gentiles issued decrees to prohibit kindling lights, he places it on the table and that is sufficient to fulfill his obligation.
מַאי חֲנוּכָּה? דְּתָנוּ רַבָּנַן: בְּכ״ה בְּכִסְלֵיו יוֹמֵי דַחֲנוּכָּה תְּמָנְיָא אִינּוּן דְּלָא לְמִסְפַּד בְּהוֹן וּדְלָא לְהִתְעַנּוֹת בְּהוֹן. שֶׁכְּשֶׁנִּכְנְסוּ יְווֹנִים לַהֵיכָל טִמְּאוּ כׇּל הַשְּׁמָנִים שֶׁבַּהֵיכָל. וּכְשֶׁגָּבְרָה מַלְכוּת בֵּית חַשְׁמוֹנַאי וְנִצְּחוּם, בָּדְקוּ וְלֹא מָצְאוּ אֶלָּא פַּךְ אֶחָד שֶׁל שֶׁמֶן שֶׁהָיָה מוּנָּח בְּחוֹתָמוֹ שֶׁל כֹּהֵן גָּדוֹל, וְלֹא הָיָה בּוֹ אֶלָּא לְהַדְלִיק יוֹם אֶחָד. נַעֲשָׂה בּוֹ נֵס וְהִדְלִיקוּ מִמֶּנּוּ שְׁמוֹנָה יָמִים. לְשָׁנָה אַחֶרֶת קְבָעוּם וַעֲשָׂאוּם יָמִים טוֹבִים בְּהַלֵּל וְהוֹדָאָה.

The Gemara asks: What is Hanukkah, and why are lights kindled on Hanukkah? The Gemara answers: The Sages taught in Megillat Taanit: On the twenty-fifth of Kislev, the days of Hanukkah are eight. One may not eulogize on them and one may not fast on them. What is the reason? When the Greeks entered the Sanctuary they defiled all the oils that were in the Sanctuary. And when the Hasmonean monarchy overcame them and emerged victorious over them, they searched and found only one cruse of oil that was placed with the seal of the High Priest, undisturbed by the Greeks. And there was sufficient oil there to light the candelabrum for only one day. A miracle occurred and they lit the candelabrum from it eight days. The next year the Sages instituted those days and made them holidays with recitation of hallel and special thanksgiving in prayer and blessings.

תְּנַן הָתָם: גֵּץ הַיּוֹצֵא מִתַּחַת הַפַּטִּישׁ וְיָצָא וְהִזִּיק — חַיָּיב. גָּמָל שֶׁטָּעוּן פִּשְׁתָּן וְהוּא עוֹבֵר בִּרְשׁוּת הָרַבִּים וְנִכְנְסָה פִּשְׁתָּנוֹ לְתוֹךְ הַחֲנוּת וְדָלְקָה בְּנֵרוֹ שֶׁל חֶנְוָנִי וְהִדְלִיק אֶת הַבִּירָה — בַּעַל הַגָּמָל חַיָּיב. הִנִּיחַ חֶנְוָנִי אֶת נֵרוֹ מִבְּחוּץ — חֶנְוָנִי חַיָּיב.
We learned there in a mishna with regard to damages: In the case of a spark that emerges from under a hammer, and went out of the artisan’s workshop, and caused damage, the one who struck the hammer is liable. Similarly, in the case of a camel that is laden with flax and it passed through the public domain, and its flax entered into a store, and caught fire from the storekeeper’s lamp, and set fire to the building, the camel owner is liable. Since his flax entered into another’s domain, which he had no permission to enter, all the damages were caused due to his negligence. However, if the storekeeper placed his lamp outside the store and it set fire to the flax, the storekeeper is liable, as he placed the lamp outside his domain where he had no right to place it.
רַבִּי יְהוּדָה אוֹמֵר: בְּנֵר חֲנוּכָּה — פָּטוּר. אָמַר רָבִינָא מִשּׁוּם דְּרַבָּה: זֹאת אוֹמֶרֶת נֵר חֲנוּכָּה מִצְוָה לְהַנִּיחָהּ בְּתוֹךְ עֲשָׂרָה. דְּאִי סָלְקָא דַּעְתָּךְ לְמַעְלָה מֵעֲשָׂרָה, לֵימָא לֵיהּ: הָיָה לָךְ לְהַנִּיחַ לְמַעְלָה מִגָּמָל וְרוֹכְבוֹ! וְדִילְמָא, אִי מַיטְּרְחָא לֵיהּ טוּבָא אָתֵי לְאִימְּנוֹעֵי מִמִּצְוָה.
Rabbi Yehuda says: If the flax was set on fire by the storekeeper’s Hanukkah lamp that he placed outside the entrance to his store, he is not liable, as in that case, it is permitted for the storekeeper to place his lamp outside. Ravina said in the name of Rabba: That is to say that it is a mitzva to place the Hanukkah lamp within ten handbreadths of the ground. As if it should enter your mind to say that he may place it above ten handbreadths, why is the storekeeper exempt? Let the camel owner say to the storekeeper: You should have placed the lamp above the height of a camel and its rider, and then no damage would have been caused. By failing to do so, the storekeeper caused the damage, and the camel owner should not be liable. The Gemara rejects this: And perhaps one is also permitted to place the Hanukkah lamp above ten handbreadths, and the reason Rabbi Yehuda exempted the storekeeper was due to concern for the observance of the mitzva of kindling Hanukkah lights. He held that if you burden one excessively, he will come to refrain from performing the mitzva of kindling Hanukkah lights. Since the storekeeper placed the Hanukkah lamp outside at the behest of the Sages, the storekeeper should not be required to take extra precautions.
אָמַר רַבָּה: נֵר חֲנוּכָּה מִצְוָה לְהַנִּיחָהּ בְּטֶפַח הַסָּמוּךְ לַפֶּתַח. וְהֵיכָא מַנַּח לֵיהּ? רַב אַחָא בְּרֵיהּ דְּרָבָא אָמַר: מִיָּמִין רַב שְׁמוּאֵל מִדִּפְתִּי אָמַר: מִשְּׂמֹאל. וְהִילְכְתָא מִשְּׂמֹאל, כְּדֵי שֶׁתְּהֵא נֵר חֲנוּכָּה מִשְּׂמֹאל וּמְזוּזָה מִיָּמִין.
Rabba said: It is a mitzva to place the Hanukkah lamp within the handbreadth adjacent to the entrance. The Gemara asks: And where, on which side, does he place it? There is a difference of opinion: Rav Aḥa, son of Rava, said: On the right side of the entrance. Rav Shmuel from Difti said: On the left. And the halakha is to place it on the left so that the Hanukkah lamp will be on the left and the mezuza on the right. One who enters the house will be surrounded by mitzvot (ge’onim).
אָמַר רָבָא: פְּשִׁיטָא לִי, נֵר בֵּיתוֹ וְנֵר חֲנוּכָּה — נֵר בֵּיתוֹ עָדִיף, מִשּׁוּם שְׁלוֹם בֵּיתוֹ. נֵר בֵּיתוֹ וְקִידּוּשׁ הַיּוֹם — נֵר בֵּיתוֹ עָדִיף, מִשּׁוּם שְׁלוֹם בֵּיתוֹ. בָּעֵי רָבָא: נֵר חֲנוּכָּה וְקִידּוּשׁ הַיּוֹם מַהוּ? קִידּוּשׁ הַיּוֹם עֲדִיף — דִּתְדִיר, אוֹ דִילְמָא נֵר חֲנוּכָּה עֲדִיף — מִשּׁוּם פַּרְסוֹמֵי נִיסָּא? בָּתַר דְּבַעְיַהּ, הֲדַר פַּשְׁטַהּ: נֵר חֲנוּכָּה עֲדִיף, מִשּׁוּם פַּרְסוֹמֵי נִיסָּא.
Rava said: It is obvious to me that there is a fixed list of priorities. When a person is poor and must choose between purchasing oil to light a Shabbat lamp for his home or purchasing oil to light a Hanukkah lamp, the Shabbat lamp for his home takes precedence. That is due to peace in his home; without the light of that lamp, his family would be sitting and eating their meal in the dark. Similarly, if there is a conflict between acquiring oil to light a lamp for his home and wine for the sanctification [kiddush] of Shabbat day, the lamp for his home takes precedence due to peace in his home. However, Rava raised a dilemma: When the conflict is between oil for a Hanukkah lamp or wine for kiddush of Shabbat day, what is the ruling in that case? Does kiddush of Shabbat day take priority because it is frequent, i.e., it is performed every week, and there is a principle: When there is a conflict between a frequent practice and an infrequent practice, the frequent practice takes precedence? Or, perhaps the Hanukkah lamp takes precedence due to publicity of the miracle? After he raised the dilemma, he then resolved it on his own and he ruled that, in that case, the Hanukkah lamp takes precedence due to publicity of the miracle.