Nextcloud domain isn't working, but I can access through public IP address

I added the domain I recently purchased with easyDNS (and managed by Cloudflare) to the trusted list. I made sure that the http and https ports are opened up, and can access the server with my public IP (which I just removed).

Type Name Content
A {public IP}
CNAME easydns

$ snap run nextcloud.occ config:system:get trusted_domains

What am I doing wrong exactly?

Based on the error, I’d say there’s an issue with the web server configuration. Can you post that?

Since it says too many redirects, it sounds like it’s making the connection, so the DNS is probably fine.

$CONFIG = array (
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/snap/nextcloud/current/htdocs/apps',
      'url' => '/apps',
      'writable' => false,
    1 => 
    array (
      'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',
      'url' => '/extra-apps',
      'writable' => true,
  'supportedDatabases' => 
  array (
    0 => 'mysql',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/tmp/sockets/redis.sock',
    'port' => 0,
  'instanceid' => <secret>,
  'passwordsalt' => <secret>,
  'secret' => <secret>,
  'trusted_domains' => 
  array (
    0 => '',
    1 => '',
  'datadirectory' => '/media/DATA/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => '',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => <dbpassword>,
  'installed' => true,
  'maintenance' => false,

Just wondering, was there supposed to be a closing PHP tag?

That’s your Nextcloud configuration. I think your issue is going to be with the web server configuration. I think the snap uses Apache for the web server.

What would the file name be?

The /var/snap/nextcloud/curruent/apache directory only has logs.

I’m really not too sure about the snap version. When I found out the limitations of the snap version and had a bunch of trouble with Collabora, I switched to Docker.

I found this thread that seems to have some info.

did you try: 'overwrite.cli.url' => '',


I also read that it might be the time & date setting, which I fixed, but that didn’t help.

Posted a bug report on GitHub. Hopefully this gets solved soon.

Got it to work.

Had to change the SSL settings in Cloudflare to “full” from “medium”