For you to be allowed to stay in Germany for as long as you want you will be required to obtain the German Permanent Residence Permit known as Niederlassungserlaubnis.

Usually the permanent residence is usually given to people who have hold the temporary residence permit for a few years. For you to obtain a German Permanent Residence Permit you need to have met the following conditions:
- You should have a valid passport
- Have a clean legal record
- Be proficient in Germany language in at least B1 level
- You should have a German health insurance
- Pass a health check that proves you are fit to study or work
- You should be financially stable to sustain you and your family
- If you plan working in Germany you will need a letter from your employer with full job description
- If you plan studying in Germany you will need proof from the specific university
- Incase you are joining your spouse you will need proof of marriage certificate
Conditions to be met by third-countries nationals who have already acquired the German Permanent Residence Permit in another EU Member State
This residence permit will be granted to a third-country national who wishes to live in Germany for longer than three months. The applicant must meet the following conditions
– Have a “Permanent Resident Permit” title from another Member State of the European Union; except the United Kingdom, Ireland and Denmark, to which the Directive concerning the status of third-country nationals who are long-term residents does not apply
– Have a valid travel document that is recognized in Germany
– Hold proof that he/she independently assures his/her livelihood and has adequate health and long-term care insurance
– Hold proof of intended employment or planned course of study.
READ MORE: Working in Germany 2022: Minimum wage, covid bonus and sick leave in a new form
SOURCE: www.expatrio.com