Qatadah (may Allah have mercy on him) narrates that Ibn Abbas (may Allah be pleased with them both) and al-Hasan (may Allah have mercy on him) both said: There is no i'tikaf except in a mosque in which the congregational prayer is established.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصيام / 8572