Feedback on plans for migrating from a Digital Ocean instance to a physical server

Thank you so much! I appreciate the tips about device selection. I don’t expect many simultaneous connections, but I’d like to set my server up with a little bit of extra specs in case I want to try serving other apps besides Nextcloud in the future.

Re: adding the new server’s LAN NAT IP as a trusted domain, I see on this post on the forum here that the way to do this is to edit config.php and simply add a key for the new IP address. This is also how this random tutorial says to do it.

But you said there is a snap command for doing this—would you mind elaborating on this? I don’t see any mention of trusted domains on the nextcloud-snap GitHub. In the linked post, the guy used

$ sudo snap run nextcloud.occ config:system:set trusted_domains 1 --value=your.fancy.domain

but this seems like a way to add nextcloud.example.com (my fancy domain) rather than my LAN NAT IP. Or does this command automatically populate the local IP into config.php?

And “LAN NAT IP” is just the normal IP address I see in ifconfig under inet, right?

Edit:

Oh, I think I figured it out. This line

Your backup won’t contain your local server’s LAN NAT IP as trusted domain so run the snap command to add that IP as trusted domain to access NextCloud via your LAN NAT IP.

pertains to the interim time when I am setting up the new server but still have nextcloud.example.com directed to the old one. At this time, if you just type the new server IP into the browser, you’ll get a trusted domain error because this IP address isn’t in config.php’s trusted domains. (The trusted domains on my working installation are localhost and nextcloud.example.com and no IP addresses.)

Therefore, the command you are referring to is

$ sudo snap run nextcloud.occ config:system:set trusted_domains 1 --value=123.456.78.9

where the value is just the normal IP from ifconfig.

Right?


Interesting, I wonder if this results from some kind of data race where Nextcloud is trying to index the files at the same time as the filesystem?

1 Like