If you live a long distance from the nearest masjid or if there is no masjid in your town, it is mandatory for Muslim men in the neighborhood to meet at one of the houses and pray together and not to pray alone as this is when Satan will take over them.
And Allah knows best