Untrusted domains, local network



Hello everyone. I’m a noob at Linux and I set up Ubuntu desktop as a server and installed owncloud. When connecting from outside of my local network I can connect fine if I added the domain in the config.php file. I added the local - my laptop, but with it when I connect to I am greeted with untrusted domain. In the apache log I confirmed that the connecting computer’s ip is That is my first issue.

Second issue: I cannot add domains in the settings when I log into owncloud on my server machine. It just refreshes when I hit enter. Also no domains that I added in the config.php are listed there.

Third issue: I don’t understand how trusted domains work when I use my laptop at the school’s wifi network. Do I have to add each single different IP I will connect from to the php beforehand? That seems very tedious to me. I’d rather have it open to all domains so I can connect from everywhere normally. I understand that this is probably terrible from a security standpoint. But Dropbox allows me to log in from everywhere.

All this is very complex and hard to me still, I appreciate all the help, thank you!



Yes, this might be because the two IPs differ.

You should give more info, eg your config.php


You should have something like:

 'trusted_domains' => array (
    0 => 'my.external.domain',
    1 => 'internal domain or ip',

Please note, that both are related to the server, not the accessing client.


This is m config:

$CONFIG = array (
  'updatechecker' => false,
  'instanceid' => 'ocjl5t1z8miu',
  'passwordsalt' => '3mHDjYKIENgeNt99h1BiQMWQJ/HaBC',
  'secret' => 'oOYKTREu7OvTSy5tIJhB6Y4nQBckaKU8mWx+2zLCGGjiBuLf',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '',
    2 => '',''
  'datadirectory' => '/var/www/owncloud/data',
  'overwrite.cli.url' => 'https://localhost',
  'dbtype' => 'mysql',
  'version' => '',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'owncloud',
  'dbpassword' => 'Sadni tekoci jogurt ananas in kokos 1,1%',
  'logtimezone' => 'UTC',
  'installed' => true,
  'mail_domain' => 'server.com',
  'mail_from_address' => 'server',
  'mail_smtpmode' => 'php',


Please remove passwords and other secret stuff!


I assume this is wrong, only one IP per line.

Try this

 'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '',
    2 => '',

Assuming that

  • ‘’ is your external IP
  • ‘’ is your internal IP, as stated above.