only via local network (with an invalid certificate, but that doesn't bother me)
Did you follow the macom guide? Do you have this line in your config.php file?:
'overwrite.cli.url' => 'https://your.url/nextcloud',
Or like this, if it is a subdomain:
'overwrite.cli.url' => 'https://nextcloud.your.url',
It's really not important, this already works. I'm just surprised it works like this for you locally.