Should he stop praying in the mosque because he fears for himself?
Question

Can a person be excused if he does not pray Jumu’ah or pray in congregation in the mosque, if there is turmoil in his country and he fears for himself if he goes to the mosque, and is afraid that he may be killed, imprisoned or beaten? As these reasons valid excuses for him not praying Jumu’ah or offering prayers in congregation?.
Praise be to Allah.We ask Allah to set the affairs of the Muslims straight, and keep us and you away from places of turmoil and trials, and to unite them on the truth, and grant them victory against their enemies, for He is able to do that. 
Praying in congregation in the mosque is obligatory for men who are able to do that, and there is a great deal of evidence for that which has been explained in the answer to question no. 8918. 
The obligation of performing prayers in congregation and Jumu’ah prayers is dependent upon there being no danger to a person’s life or wealth or family, because Allah says (interpretation of the meaning):
“and [Allah] has not laid upon you in religion any hardship”
[al-Hajj 22:78]
“Allah intends for you ease, and He does not want to make things difficult for you”
[al-Baqarah 2:185]
Ibn Qudaamah (may Allah have mercy on him) said in al-Mughni (1/366): The one who is afraid is excused for not praying in congregation or praying Jumu’ah, because the Prophet (peace and blessings of Allah be upon him) said: “Valid excuses are fear and sickness.” 
Fear is of three types: fear for oneself, fear for one’s wealth or property, and fear for one’s family. End quote. 
If a person fears that he may be killed or arrested and imprisoned unlawfully, then this is regarded as a valid excuse for his not praying in congregation or praying Jumu’ah, and he may offer these prayers in his house in order to protect himself. 
But if he prays Jumu’ah in his house, then he should pray it as Zuhr with four rak’ahs, not like Jumu’ah prayer. 
And Allah knows best.