Change hostname of nextcloud app

Hello everyone.
I installed the Univention server, added it to the Active Directory domain, and assigned it a name like nextcloud.domain.local. Then I issued certificates from LetsEncrypt and added them to default.ssl.conf. I also added a record like nextcloud.domain.com pointing to the local IP on the domain controller.
After this, my Univention server resolves fine to the external address and certs are valid, but Nextcloud application returns a 500 error after attempting to log in. In the Apache log, I see lines like this:
[Wed Nov 12 13:32:26.801074 2025] [ssl:warn] [pid 28039] AH01909: nextcloud.domain.local:443:0 server certificate does NOT include an ID that matches the server name
[Wed Nov 12 13:32:26.801397 2025] [mpm_prefork:notice] [pid 28039] AH00163: Apache/2.4.59 (Univention) OpenSSL/1.1.1n mod_wsgi/4.6.5 Python/3.7 configured – resuming normal operations
As I understand it, for Nextcloud, you need to specify the domain or its alias separately somewhere, perhaps in the Docker container.
Please tell me how to fix this error. Thank you.

Hello @ebmaster

Not sure what you mean exactly with " I issued certificates from LetsEncrypt and added them to default.ssl.conf". Just to be sure - you are aware that UCS has a LetsEncrypt app which does all the work for you, including renewing and distribution of certs for several services, such as mail, apache,…? In case you did so - ignore. In case this is new info for you - have a look in a blog post from last year which explains all that nicely: Univention App Highlights: SSL Certificates for Univention Corporate Server with Let's Encrypt

The log line with the certificate warning you posted originates from Apache, thats why I pointed to the “LetsEncrypt app”, which does this config for you. In case (for whatever reason) you have to maintain the cert manual, please check if the apache also uses the correct certificate.

Your question was regarding Nextcloud, and how to configure the domain or its alias. Yes, this is correct, you can do this direct in the nextcloud config, the configuration stanza is section trusted_domains. The documentation on that is Configuration Parameters — Nextcloud latest Administration Manual latest documentation

This topic has been discussed already multiple times here, so the search is maybe helpful too. One helpful search result is Edit config php for trust domain. what is the command? what is the path? - #2 by ahrnke

Just ask again, if the search isn’t working for you.

Best Lutz