Your guest needs a visa. That is still a long way from meaning you must sign anything.
The visa section wants one question answered: is the stay financially secured? There are three ways to answer it, and they do not cost you the same.
Route 1 — the guest evidences their own means
Bank statements, income records, savings. If that satisfies the mission, the matter is closed and you are liable for nothing. This is the most common and the best case — and the one least often checked, because everybody thinks of the invitation first.
Route 2 — an informal invitation letter
A private letter: whom you expect, when, where they will stay. It supports the purpose of travel and the accommodation question but creates no liability. No form, no authority, no fee.
Route 3 — the formal obligation under § 68 AufenthG
The heaviest route, and needed only when the guest’s own means do not convince. It runs through the immigration office, a solvency check and an enforceable money debt. The remaining steps of this route describe it.
Whichever route: the insurance
For the visa, travel health insurance with cover of at least €30,000 is mandatory, valid across the Schengen area, for the whole trip, and including repatriation. Without it nothing is issued — not even with a flawless formal obligation.