In Shafii School is it better during Ramadan to pray witr in congregation without sleeping before (and after 8 raka`) or at home alone as tahajjud as a last prayer at night?
In the Shafi`i madhhab the Sunna is to pray (i) 20 rakaats (i) in congregation, based on what is agreed upon as being the Sunna of the Khulafa al-Rashidin `Umar, `Uthman and `Ali as narrated by Bayhaqi with a sound chain (Tubani, Kashf al-Tabarih; `Atiyya Muhammad Salim, al-Tarawih Akthar min Alfi `Am fi Masjid al-Nabi `alayhi al-Salam pp. 123-127). Furthermore, both the Prophetic hadiths of the qiyam of Ramadan and the Khulafa‘ hadiths of the qiyam Ramadan concur upon the congregation praying witr together. The main point is to never miss the witr as it carries more reward than all of the non-fard prayers put together, and Allah knows best.
Hajj Gibril Haddad