Move nextcloud application folder

Is it possible to move the nextcloud application folder?
I would use simple mv command like mv /www-root/nextcloud/* /httpdocs/cloud/nextcloud/ or a graphical file manager.

Do I have to change any configuration for this?

I assume in config.php I would have to modify
'overwrite.cli.url' => 'https://mydomain.com' to 'overwrite.cli.url' => 'https://mydomain.com/cloud'

The data directory is outside the application folder and remains unchanged. Also the MySQL connection does not change.

Best Regards

Instead of using a subfolder, better use a subdomain. Configure your web server to provide that domain, and set

‘trusted_domains’ =>
array (
0 => ‘cloud.mydomain.com’,
),
‘overwrite.cli.url’ => ‘https://cloud.mydomain.com/’,

works fine here.

I am running nextcloud in a subdomain, that’s fine.

My topic is, currently nextcloud is in the www root folder, i.e. I call it like https://cloud.mydomain.com/. Now I like to add anther application to this subdomain but I don’t want to create files and folders within nextcloud directory (as far as I remember this would also block any updates).

If I put the other application in another subdomain then I have Cross-Domain issues, that’s the reason why I like to move nextcloud to a subfolder.

I don’t quite understand, but give you an example of my config. I have several clouds and other web services in my www folder like:

/var/www/nextcloud-test
/var/www/nextcloud-working
/var/www/wordpress

Each is connected to a separate subdomain:

https://testcloud.mydomain.de
https://cloud.mydomain.de
https://www.mydomain.de

and is configured as virtual host in apache. They have even separate users, like www-cloudtest, www-cloudworking, www-wordpress so each vhost runs with that user. Does this apply to your problem?

If I take your setup then my requirement would be: wordpress and nextcloud-working shall be in one subdomain. I cannot put my application into another subdomain because it does not allow cross-domain connections.

Currently I have this:

Folder /nextcloud -> reachable by https://cloud.mydomain.ch
Folder /dav -> reachable by https://dav.mydomain.ch (but not properly working due to cross-domain connection)

Now I want to put both applications into one subdomain, i.e.

Folder /cloud/nextcloud -> reachable by https://cloud.mydomain.ch/nextcloud (https://cloud.mydomain.ch will be redirected to https://cloud.mydomain.ch/nextcloud/index.html)
Folder /cloud/dav -> reachable by https://cloud.mydomain.ch/dav

My question is: Can I simple move the nextcloud application folder or do I have to make any additional configuration changes?

I don’t get it. The dav sudirectory should be accessible without special configuration. I’m out.

Well in general everything works fine. I can access nextcloud and dav application from web browser. However, I like to know if I have to consider any additional changes when I move the nexcloud folder on my file system.

When I did a test I faced only this topic: https://docs.nextcloud.com/server/14/admin_manual/issues/general_troubleshooting.html#service-discovery

Everything else seems to work properly but I don’t like to miss anything. I like to avoid that after couple of weeks or months I have to run difficult changes or being enforced to make a fresh installation of nextcloud.