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: “

What I would like my url to be: “

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

you have to

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

Thank you very much for you time!