You can become a civil servant if… 

… you are a German citizen or a citizen of another EU member state, 
… you agree to defend the free democratic basic order of the Basic Law for the Federal Republic of Germany at all times, 
… you have a prescribed professional qualification (in the sense of a required teaching qualification) and you are medically fit, as determined by a medical examination, 
… you have not yet reached the age of 42. 

Teachers who qualified professionally outside Germany must provide proof of a recognised professional qualification. You can find more information about this on the Amt24 service portal