Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:2227Yaḥyá b. Ibrāhīm b. Muḥammad b. Yaḥyá > Abū Bakr Aḥmad b. Salmān b. al-Ḥasan al-Faqīh > Quriʾ > Yaḥyá b. Jaʿfar > Abū Aḥmad al-Zubayrī > Sufyān > Abū Isḥāq > ʿĀṣim b. Ḍamrah > ʿAlī

[Machine] Witr is not obligatory, but it is a sunnah established by the Messenger of Allah ﷺ. This is the statement of Ubada ibn as-Samit and ibn Abbas, and all of that is in addition to the other narrations mentioned regarding its place under the section of voluntary prayers.  

البيهقي:٢٢٢٧وَأَخْبَرَنَا يَحْيَى بْنُ إِبْرَاهِيمَ بْنِ مُحَمَّدِ بْنِ يَحْيَى أنبأ أَبُو بَكْرٍ أَحْمَدُ بْنُ سَلْمَانَ بْنِ الْحَسَنِ الْفَقِيهُ قَالَ قُرِئَ عَلَى يَحْيَى بْنِ جَعْفَرٍ وَأَنَا أَسْمَع أنبأ أَبُو أَحْمَدَ الزُّبَيْرِيُّ ثنا سُفْيَانُ عَنْ أَبِي إِسْحَاقَ عَنْ عَاصِمِ بْنِ ضَمْرَةَ عَنْ عَلِيٍّ ؓ قَالَ

الْوِتْرُ لَيْسَ بِحَتْمٍ وَلَكِنَّهُ سُنَّةٌ سَنَّهَا رَسُولُ اللهِ ﷺ وَهُوَ قَوْلُ عُبَادَةَ بْنِ الصَّامِتِ وَابْنِ عَبَّاسٍ وَكُلُّ ذَلِكَ مَعَ سَائِرِ الْآثَارِ الْوَارِدَةِ فِيهِ مَوْضِعُهَا بَابُ صَلَاةِ التَّطَوُّعِ