2

The thing I'm trying to accomplish is pretty simple but I can't seem to word it correctly in order to get an answer.

I have a nextcloud instance that was installed via the package manager Snap. It's running well but its URL is the root of my domain, so mydomain.example.

I wish to free up the root and host it on mydomain.example/nextcloud, so I can have other services with their own URLs. Is this possible?

The problem with most guides online is that they rely on the classic installation, not the Snap one. This one changes the entire structure and comes pre-packaged with the whole LAMP stack pre-configured.

Dzeri96
  • 123

1 Answers1

1

The snap installation comes preconfigured and has its webroot set that is dictated by the snap package structure. Hence if you change the webroot inside the snap package it is likely this will break snap upgrade functionality in the future.

Apart from that you may want to add a proxy in front, this is described in the nextcloud-snap Wiki page:

Putting the snap behind a reverse proxy https://github.com/nextcloud/nextcloud-snap/wiki/Putting-the-snap-behind-a-reverse-proxy

It might be possible to simply reconfigure the webroot using the command given there, but I do not know the side effects as written above. So you may break things badly and should backup first.

NGINX Optional Custom Path Location For Reverse Proxy

$ nextcloud.occ config:system:set overwritewebroot --value="/mycustompath"

Be sure to check the requirements for .well-known/* adresses as these must be adapted to include /mycustompath too.

https://docs.nextcloud.com/server/latest/admin_manual/issues/general_troubleshooting.html#service-discovery