Nextcloud running in a lxc container on ubuntu

I’ve installed Nextcloud in to a container called nextcloud-instance001.local

i’ve copied it as a new instance called nextcloud-instance002.local and have changed the hostname to be nextcloud-instance002.local.

I then stop the 001 instance and start the 002 instance.

When I firefox http://nextcloud-instance002.local it asks me to add this as a trusted domain (as I’ve not setup ssl yet) however when I press the button to add, it looks like it is redirecting to “http://nextcloud-instance002.local/index.php/settings/admin?trustDomain=nextcloud-instance001.local

What files do I need to edit to change instance in the 002 that are pointing to the 001 instance?

This adding only works if you add a domain to an existing working one. In your case, edit the config/config.php and change the trusted domain.

Indeed copying your instance alone wasn’t enough, you need to edit your config.php file to reflect the new URL in Nextcloud. That’s why it’s redirecting to the other FQDN in the first instance.

HI Jason,

Thank you, I have now done this and have been able to make lots of
nextcloud lxc instances, which is awesome!!

Regards

MATT

1 Like