Jabir said: We were in the company of the Messenger of Allah ﷺ during a journey. The rain fell upon us. The Messenger of Allah ﷺ said: Anyone who wants to pray in his dwelling may pray.
Related hadith on this topic
Explanation & Benefits
Shaykh Umar Farooq Saeedi
1065. Commentary:
In such situations, there is a concession regarding the congregational prayer. That is, a person may perform the prayer alone, without the congregation, or even in their homes. However, there is certainly greater virtue in being present (for the congregation).
Source: Sunan Abu Dawood – Commentary by Shaykh Umar Farooq Saeedi, Page: 1065