If you find a job within 6 months, you can apply for a Residence permit or work visa in Germany. There is no requirement to return home and apply for the same.