Access through untrusted domain Please contact your administrator. If you are an administrator, edit the “trusted_domains” setting in config/config.php like the example in config.sample.php.
The option to configure that is a nextcloud option. This is the option I found is services.nextcloud.config.extraTrustedDomains. It takes a list of strings.
How exactly would you like to set the admin password if not with that option? That option will only set it when the service is initially installed, so if you want to change it later you need to/can do so via the nextcloud UI.
I would not recommend this personally, /var/lib is the standard for storing application data, and there’s no real good reason to move the nextcloud directory out of it (except maybe if you are messing with disks being mounted in various places, but it would be far more reasonable to mount such to /var/lib/nextcloud directly instead of moving the nextcloud install folder).
If you want to do this because you want to back up data, or access it from your user or something along those lines, figure out proper group permissions instead, and/or use a privileged ExecStartPre to prepare the directory for backing up.
Nextcloud will probably make this difficult, those directories are not intended to be browsed without their UI, if you do so anyway and end up modifying anything there’s a pretty good chance you’ll screw up your database.
If you want a directory that behaves like a normal directory but is shared between devices, consider using syncthing instead.