If you are a citizen of non-EU countries, you can only get permanent residency in Germany after staying as a temporary resident for a period of time, having a stable income, a clean police record, and prove German language proficiency. After you meet all these criteria, you can apply for permanent residency and German citizenship down the line.