Change nextcloud url to use a prefix HowTo

I setup nextcloud on my Ubuntu 18.04 server and used a fully qualified domain name. I’d like to change the configuration to use a prefix i.e.:

Currently my url is: “https://example.com

What I would like my url to be: “https://nextcloud.example.com

I have letsencrypt going as well and hope this can be accomplished without breaking anything.
THANKS!

you have to

  • create a dns entry for nextcloud.example.com
  • change your web server name
  • rerun your letsencrypt skript unless you have a wildcard certificate

Thank you very much for you time!
Dave