Moving Nextcloud installation from one domain to another

I have a domain I want to release and so I want to move my Nextcloud installation from it to another Domain name.
They are hosted on GoDaddy with other domains there.

Currently the Root domain is where I want to move it to from Public_HTML/(original-domain).
It was made with MySQL.

Is there anyway I can do this? I want to move all references and folders so all I have to do is change my clients and dav files to put to the new domain name.
I don’t want to lose calendar, news, bookmark or file/photo data.


As far as Nextcloud goes, I think you only need to change the ‘trusted_domains’, and perhaps the ‘overwrite.cli.url’ in the config/config.php file. Anything else should be handled by the hosting set up.

Thanks for the reply.

Pretty much what I attempted (with lots of backing up original files) whilst waiting - didn’t know how long a reply would be.
Turned out config/config.php had sqlite3 for the DB so was even easier.
I copied the NC Installation directory to where I wanted it. Backed up the config/config.php. Edited the config/config.php to add the new domain to trusted domains. Changed hte data directory to the new one. Changed the overwrite.cli.url.
Tested by going to the <domain_name>/<installation_path> and logged in as normal. Checked files, calendar and contacts etc. Everything there and fine.
Made client and Dav agent changes and everythign seems to be working. Keeping my backups for a few days in case.

If you moved your data directory, don’t forget to update the oc_storage table. See step 3 at, Is there a safe and reliable way to move data directory out of web root?

Thanks for that. Following robertb’s dramas I found my sqlite3 also needed converting. In the end I had to create a whole new MySQL DB but I made the conversion work.
oc_storages has been changed so again thanks and thanks for pointing me at that post. His conversion information was helpful