I have been trying on and off for the last couple of months to sort out the “Untrusted Domain” prompt when trying to access my content off of my LAN. My installation is on an Asustor NAS inside of a Docker Container. I was able to access outside of my LAN for a brief period, then lost access after an upgrade.
I’ve read through many posts but always end up sliding down a rabbit hole because I cannot figure out how to edit the Environment Variables. I know how to ssh from a LAN computer, but am lost after that because a “/var/www” directory does not exist. Although I’m familiar with databases and am very computer savvy, I do not know how to administer or edit a database. FWIW, I have included my No IP host name in the config.php and zzconfig.php files with no joy.
My details are as follows.
Steps to reproduce
Access via LAN is successful;
Access remotely is unsuccessful
config.php and zzconfig.php content is:
),
‘trusted_domains’ =>
array (
0 => ‘10.xx.xx.xx’,
1 => ‘xxxx.xxxxx.net:8585’,
I don’t use Docker, but I checked my config.php (I don’t have a zzconfig.php and I have no idea why you do.) and I only have two hostames listed, no IPs or ports. Of course, I never access my ownCloud directly via IP, and I only use HTTPS over port 443. That may not be terribly helpful, but it’s all I’ve got for you.
HI, don’t use the port in the name.Your router should forward the port to your webserver, your server is listening on that port. So you just go to blah dot com and let the configs do what they are supposed to. (there is never an instance where your hostname includes a port, at least not in dns)
Hello @ v3_exceed. Removing the port from my config.php file did not resolve the issue.
I don’t have a problem with my router forwarding to the correct port. The issue is when I hit the site with the designated port #, I get the “untrusted domain” error. Do you know what else I can try?
I did have a similar problem when I setup owncloud within my network but tried to access it internally instead of externally.
What I would suggest you do, is create a cname in dns for your owncloud install. I created cloud.techweavers.net for mine.
Then route the dns for your domain cloud.whatever.com to your external IP address.
Now even though you are trying to access it internally to 10.x.x.x you would now try to get to it at cloud.whatever.com
your router should map it to the right port and your instance should show up. I have all my stuff at a co location down town so unless I am setting up a test i don’t use my local connection for serving. then put cloud.whatever.com into your config and it should work… fingers crossed.
I apologize for not understanding, but I cannot find where to modify the environment variables. Here is a screenshot of my Asustor directory. I’ve researched and read a lot of articles, but found no way to modify the files. I even searched in phpMyAdmin for ,yml files and found nothing.
None of the suggestions here worked for me. Since I am unfamiliar with database management, all the links were deeply confusing and as clear as mud. I’m sure @jvillafanez’s suggestions were brilliant, but I couldn’t make heads or tails of them because I kept getting errors thrown when running his commands via ssh. I tried changing to the “volume1/Docker” directory but got no joy no matter what I tried.
After about 20+ hours of research, this is what worked for me:
Install PortainerCE (in the Asustor App Store) then open it and create an account
Under “Home” select “Environment,” then select the settings icon at the bottom right next to “Connected.”
Select “Containers” in the left spine
Tick “ownCloud” box then select to open it.
Select “Duplicate/Edit” at the top right of the page
Under “Advanced Container Settings” select “Env”
Scroll down to “OWNCLOUD_TRUSTED_DOMAIN”
Enter your desired domains separated by a “comma” but no spaces and no port numbers
Scroll up and select “Deploy the container”
Enter “Yes” when asked if you want to replace the container. (As long as nothing else is modified, no data will be lost. If you change anything else, YMMV, but I tested these instructions several times to ensure they are accurate.)
For good measure, I restarted my NAS to force the changes to apply.