Assalamualaikum ustaz. Regarding the 27 multiplied rewards for congregational prayer, it is also applicable for a person not performing the prayer at the mosque? For example, he performs the congregational prayer at home with his family.
Alhamdulillah, praise and gratitude to Allah SWT for His countless blessings for us all. Praise and salutations to our beloved Prophet Muhammad PBUH, his family, companions and all those who follow his footsteps until the Last Day.
The Prophet PBUH said:
صَلاَةُ الْجَمَاعَةِ تَفْضُلُ صَلاَةَ الْفَذِّ بِسَبْعٍ وَعِشْرِينَ دَرَجَةً
“Prayer said in a congregation is twenty-seven degrees more excellent than prayer said by a single person.” 
In another narration it is stated:
صَلاَةُ الْجَمَاعَةِ أَفْضَلُ مِنْ صَلاَةِ أَحَدِكُمْ وَحْدَهُ بِخَمْسَةٍ وَعِشْرِينَ جُزْءًا
“Prayer said in a congregation is twenty-five degrees more excellent than prayer said by a single person.” 
Imam al-Nawawi explained that whether it is 25 or 27 times is based on the situation of the prayer and the person performing it. Some will receive 25 and some 27 according to the perfection of his prayer and how far he maintains the congregational prayer. 
Congregational prayer in syara’ term means connecting the prayer of the makmum with the imam’s prayer which is at least one makmum, then it is named congregational prayer and will be rewarded as such. (See al-Taqrirat al-Sadidah, pg. 289) It is an eminence that should be maintained and fulfilled by the Muslim ummah.
The sanctioning of congregational prayer can be seen according to the Quranic verse, Allah SWT states:
وَإِذَا كُنتَ فِيهِمْ فَأَقَمْتَ لَهُمُ ٱلصَّلَوٰةَ
“And when you (O Muhammad) are among them and lead them in prayer (during battle),” 
Imam Khatib al-Syarbini said: “This commandment was revealed during battle, hence, surely it is prioritized to be performed in times of peace.” 
According to madhhab Syafie, the ruling of performing congregational prayer following the final opinion in the madhhab is fardhu kifayah. It is obligatory to showcase the eminence of Islam in a certain residential area or village.
In the above issue, if a person performs the congregational prayer with the minimum number of people which is one imam and one makmum, then he’ll receive the rewards of congregational prayer based on the hadith. This includes congregational prayer of a husband and wife in other places such as R&Rs and others.
However, the best and prioritized congregational prayer is the one performed in a mosque. This is in accordance with a narration from Abu Hurairah RA:
مَنْ غَدَا إِلَى الْمَسْجِدِ أَوْ رَاحَ أَعَدَّ اللَّهُ لَهُ فِى الْجَنَّةِ نُزُلاً كُلَّمَا غَدَا أَوْ رَاحَ
“Allah will prepare for him who goes to the mosque (every) morning and in the afternoon (for the congregational prayer) an honorable place in Paradise with good hospitality for (what he has done) every morning and afternoon goings.” 
In another hadith, the Prophet PBUH also said:
مَنْ تَطَهَّرَ فِى بَيْتِهِ ثُمَّ مَشَى إِلَى بَيْتٍ مِنْ بُيُوتِ اللَّهِ لِيَقْضِىَ فَرِيضَةً مِنْ فَرَائِضِ اللَّهِ كَانَتْ خَطْوَتَاهُ إِحْدَاهُمَا تَحُطُّ خَطِيئَةً وَالأُخْرَى تَرْفَعُ دَرَجَةً
“He who purified himself in his house, and then he walked to one of the houses of Allah for the sake of performing a Fard (obligatory act) out of the Fara’id (obligatory acts) of Allah, both his steps (would be significant) as one of them would obliterate his sin and the second one would raise his status.” 
The Prophet PBUH clearly mentioned that obligatory prayer in congregation is prioritized to be performed in a mosque. The Prophet PBUH said:
فَصَلُّوا أَيُّهَا النَّاسُ فِي بُيُوتِكُمْ فَإِنَّ أَفْضَلَ الصَّلَاةِ صَلَاةُ الْمَرْءِ فِي بَيْتِهِ إِلَّا الْمَكْتُوبَةَ
“You people should therefore pray in your houses, for, with the exception of the prescribed prayer, the most excellent prayer a man observes is that which he observes in his house.” 
Al-Hafiz Ibnu Hajar explained, what is meant here is the five obligatory prayers should be performed at the mosque. 
The Prophet PBUH once said:
وَإِنَّ صَلاَةَ الرَّجُلِ مَعَ الرَّجُلِ أَزْكَى مِنْ صَلاَتِهِ وَحْدَهُ ، وَصَلاَتُهُ مَعَ الرَّجُلَيْنِ أَزْكَى مِنْ صَلاَتِهِ مَعَ الرَّجُلِ ، وَمَا كَثُرَ فَهُوَ أَحَبُّ إِلَى اللهِ تَعَالَى
“A man’s prayer said along with another is purer than his prayer said alone, and his prayer with two men is purer than his prayer with one, but if there are more it is more pleasing to God.” 
Furthermore, attending the congregational prayer at the mosque is a commandment according to syarak. Numerous evidences describe the rewards and encouragement of the act. Among them is a hadith narrated by Ibn Abbas R.Anhuma, where he said, the Messenger PBUH said:
مَنْ سَمِعَ النِّدَاءَ فَلَمْ يَأْتِهِ فَلاَ صَلاَةَ لَهُ إِلاَّ مِنْ عُذْرٍ
“Whoever hears the call for prayer and does not come (to the mosque for prayer), his prayer will not be accepted from him, unless he has a (legitimate) excuse.” 
According to the above hadith, basically, a person is instructed to attend the congregational prayer if he hears the call of adhan.
The Prophet PBUH also wards those who didn’t attend the congregational prayer at the mosque. The Prophet PBUH said:
لَقَدْ هَمَمْتُ أَنْ آمُرَ بِالصَّلَاةِ فَتُقَامَ ثُمَّ أُخَالِفَ إِلَى مَنَازِلِ قَوْمٍ لَا يَشْهَدُونَ الصَّلَاةَ فَأُحَرِّقَ عَلَيْهِمْ
“No doubt, I intended to order somebody to pronounce the Iqama of the (compulsory congregational) prayer and then I would go to the houses of those who do not attend the prayer and burn their houses over them.” 
According to the above hadiths and athar presented, we state that congregational prayer is prioritized to be performed at the mosque. It better fulfils the purpose congregational prayer is sanctioned which is to develop love and unity amongst Muslims. Likewise, those who attend congregational prayer are included as those who enliven the houses of Allah SWT. Allah SWT states:
إِنَّمَا يَعْمُرُ مَسَـٰجِدَ ٱللَّـهِ مَنْ ءَامَنَ بِٱللَّـهِ وَٱلْيَوْمِ ٱلْـَٔاخِرِ وَأَقَامَ ٱلصَّلَوٰةَ وَءَاتَى ٱلزَّكَوٰةَ وَلَمْ يَخْشَ إِلَّا ٱللَّـهَ ۖ فَعَسَىٰٓ أُو۟لَـٰٓئِكَ أَن يَكُونُوا۟ مِنَ ٱلْمُهْتَدِينَ
“The mosques of Allah are only to be maintained by those who believe in Allah and the Last Day and establish prayer and give zakah and do not fear except Allah, for it is expected that those will be of the [rightly] guided.” 
Hence, if the congregational prayer is performed at a place other than the mosque, then it will still be rewarded as congregational prayer according to the hadith. The reason is the minimum of congregational prayer is with one imam and one makmum. Regardless of where it is performed. However, the best and most prioritized is to attend the congregational prayer at the mosque. This better fulfils the purpose of congregational prayer which is to cultivate love and unity amongst Muslims. As well as enlivening the houses of Allah SWT.