It was narrated that ‘Ali (رضي الله عنه) was asked about Witr and whether it was obligatory. He said:
It is not like the obligatory prayer, but it is a Sunnah that was done by the Messenger of Allah (ﷺ) and his Companions, and they continued doing it until the end of their lives.