All you need for an academic career at a German university or research institute is a residence permit. You can apply for this at the relevant Foreigners Authority. You will require a certificate of enrolment for this purpose. You must also be able to provide proof of adequate health insurance and the ability to cover your living costs.
Before applying, ask the Foreigners Authority what documents you will need to submit. Some immigration authorities also provide online information on this subject.
In addition to this, the portal Research in Germany provides important information for graduates hoping to do a PhD in Germany and gives details on financing and funding options.