When the Messenger of Allah ﷺ arrived from his hajj, he entered Medina, and made (his camel) kneel down at the gate of his mosque; and he entered it and offered two rak'ahs of prayer; he then returned to his home. Nafi' said: Ibn Umar also used to do so. (Using translation from Abū Dāʾūd 2782)
أَنَّ رَسُولَ اللهِ ﷺ صَلَّى حِينَ أَقْبَلَ مِنْ حَجَّتِهِ قَافِلًا فِي تِلْكَ الْبَطْحَاءِ قَالَ ثُمَّ دَخَلَ رَسُولُ اللهِ ﷺ الْمَدِينَةَ فَأَنَاخَ عَلَى بَابِ مَسْجِدِهِ ثُمَّ دَخَلَهُ فَرَكَعَ فِيهِ رَكْعَتَيْنِ ثُمَّ انْصَرَفَ إِلَى بَيْتِهِ قَالَ نَافِعٌ فَكَانَ عَبْدُ اللهِ بْنُ عُمَرَ كَذَلِكَ يَصْنَعُ