كتاب صلاة المسافرين وقصرها
6
The Book of Prayer - Travellers
(29)
Chapter: It is recommended to offer voluntary prayers in one’s house although it is permissible to offer them in the masjid, whether that is a regular voluntary prayer or any other, except for the public ritual prayers, namely, `Id prayer, the eclipse prayer, prayers for rain and Tarawih, and prayers that can only be offered in the masjid, such as greeting the masjid, and prayers that are recommended to be offered in the masjid, namely the two rak`ah following tawaf
(29)
باب اسْتِحْبَابِ صَلاَةِ النَّافِلَةِ فِي بَيْتِهِ وَجَوَازِهَا فِي الْمَسْجِدِ ‏‏

Abu Huraira reported Allah's Messenger (ﷺ) as saying:

Do not make your houses as graveyards. Satan runs away from the house in which Surah Baqara is recited.
حَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ، حَدَّثَنَا يَعْقُوبُ، - وَهُوَ ابْنُ عَبْدِ الرَّحْمَنِ الْقَارِيُّ - عَنْ سُهَيْلٍ، عَنْ أَبِيهِ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ لاَ تَجْعَلُوا بُيُوتَكُمْ مَقَابِرَ إِنَّ الشَّيْطَانَ يَنْفِرُ مِنَ الْبَيْتِ الَّذِي تُقْرَأُ فِيهِ سُورَةُ الْبَقَرَةِ ‏"‏ ‏.‏
Reference : Sahih Muslim 780
In-book reference : Book 6, Hadith 252
USC-MSA web (English) reference : Book 4, Hadith 1707
  (deprecated numbering scheme)