NextcloudPi - using own custom domain

I am running NextcloudPi (installed using the preinstalled image from ownyourbits). I have configured a domain name (mydomain.ddns.net) using No-IP, but I would rather like to use a subdomain (cloud.mydomain.tld) of a domain I have bought (mydomain.tld).

After searching the internet, I found one solution that sort of worked: I put in a CNAME record at my domain registrar that pointed cloud.mydomain.tld to mydomain.ddns.net. When I go to cloud.mydomain.tld I am get a warning in the browser, “Warning: Potential Security Risk Ahead”, and the error code “SSL_ERROR_BAD_CERT_DOMAIN”. I am still able to access the NextcloudPi if a just click “Accept risk”, but is there any way to configure this correctly? Is there some way to add a certificate for cloud.mydomain.tld?

Sorry. I do not use NextcloudPi. But on a normal installation i modified the virtual name based webserver (apache2, /etc/apache2/sites-enabled/nextcloud.conf) from dyndns-name to cname-name and re-run “certbot”.

2 Likes

Thank you for taking the time to answer! I just did what you said, and it worked immediately, thanks!

2 Likes