I am an international (non-EU) graduating from a US university. I am considering a postdoc in Germany. As I have a family, I'd need to make some additional money. Is working outside of the university while a postdoc in Germany legal/welcomed?
You are not allowed to work more than 48h per week and not more than 10h/day in Germany. With most full positions being around 40h/week, that leaves you about 8h/week for a side job. You have to disclose this to your primary employer (the uni or institute where you do your postdoc at). In general they shouldn't have any objections. I have a full time contract at a uni and work some hours on the side, and it it is not a problem as long as you stay within the limits of the law concerning working hours. You have to keep in mind, though that the second job will most likely be taxed more.
Sursula already well covered the legal aspects, so just some comments on the 'is it welcomed?' part of the question. I would say the general answer in Germany is mostly no.
First a single postdoc salary is sufficient to support a family but money will be quite tight. Comparing to the US, there is significantly more governmental support, Kindergeld has already been mentioned, things like child care are a lot of cheaper (due to government subsidies) and the necessary financial safety cussion for random emergencies is much smaller.
Second, if you do find a single postdoc salary insufficient the general expectation would be for you spouse to work (possibly part time), not for you to do two jobs.
Of course you are free to make your own choices but if you tell your boss or colleagues that you are working two jobs don't expect a 'sure, we all have to do that' but rather a 'why would you do that?' kind of reaction.
I have a few more insights, not because I am a post-doc, but because I was in the unsuspecting need to have a second job while I was starting an academic position, therefore working 50% / 50%.
I started my PhD in Germany a few months ago and due to some issues with my previous employer regarding the contractual obligations at the end of my employment period, I required to split the time between my jobs evenly, so that I would a) not have legal problems and b) to be able to finish my previous contract successfully and start my new job with as few hassles as possible.
For my contracts, I arranged a 50% / 50% split, with one of my incomes being taxed as "main" income (Class 4) and the "side job", or my previous contract, was taxed for a few months under Class 6, which is heavily taxed, but some of it can be reimbursed at the end of the year through a tax return form.
Nonetheless, as others point out, the expectation as a full-time employee of a university is that you will be there working full-time (40 hours), and some leeway is given for family situations (no childcare available some days, sick days). However, you do need to inform the university, as well as your group leader, if you have a second job. In my opinion, however, and from personal experience, I was not getting that much more money (due to the class taxation I mentioned earlier) and you do need to inform an absurd amount of people about your work situation. This would be, for example, if you have a fixed salary from a company. If you do side work such as
As Sursula mentions, Post-doc positions are based on "Tarifvertrag für den öffentlichen Dienst der Länder (TV-L)" https://oeffentlicher-dienst.info/c/t/rechner/tv-l/west?id=tv-l-2023&matrix=1 which means that the job is both unionized and determined by the agreed-upon salary of the Union.
In general, as Sursula mentions, your income will range from 4188.38€ monthly (as seen in the table I provided earlier) and 6433.67€. This range is mostly going to be discussed by your employer, and it will fall somewhere in between depending on your experience in the field, the agreed contract you are able to secure, and a long etc. Nonetheless you would most likely fall somewhere in the middle (I would be very wary if you are offered a E13/1 salary as a post-doc, even for a full time position that would be rare and I would take a closer look at what you are being offered).
After taxes, you will be looking into a netto income between 2600€ and 3800€, as a class 4 (being married), and depending on how you arrange your wife's income and work situation, you may be able to scratch a couple hundred euros (ca. 10% by some accounts, not very useful but here is a link in German about it: https://www.ahs-kanzlei.de/de/2016-12-steuerklasse-5) off your taxes and into your netto income. That is if your partner is not planning to do any job at all.
Now, depending on where you are planning to live, 2600€ is for the most part a tight budget. In Baden-Württemberg, in a mid-sized city you are looking to spend about 1000€ for rent (water and heating typically included for a 2-3 bedroom apartment), 300€ for services (power, internet, mobile with mid-tier phone included for 2 adults), 500-700€ for food (included food at the university), and if you have young children (<6 years old) you may be looking into spending 300-400€ for childcare. With some budgeting, you may be able to make it to the end of the month and have dinner out twice a month.
In Bavaria, and specifically Münich, I would absolutely not even think about it, as it is a very expensive city and you would need at least 4000€ for about the same level of living standard (At least from comments of friends who live there with a single income). All other states you may be looking into similar incomes but, for example, I know that Northrhein-Westfalia has a bit cheaper child-care, for example, and housing in smaller cities is slightly less aggressive.
But overall: I think the way you have done the math in the US compared to Germany you will see that much of the expenses are different, and therefore your salary expectations and budget may also be different. In my opinion, one post-doc may be tight but doable with some tax re-arrangements. Make sure to get yourself informed properly by a tax consultant so you maximize your monthly income without resorting to a second job.