No login is possible after recovery a Discourse Backup on a new server

Why not? Let’s Encrypt gives you one for free.

If you’re trying to use an IP without a host name, that is your problem. You must use a hostname.