Help with Cloudflare tunnel using Official Nextcloud

Austinbru

Dabbler
Joined
Jul 21, 2022
Messages
16
tl;dr: I can access the app remote via my iPhone, but every time I try to log in, it just gets stuck circling. I have done everything that I've read online to do, but I must be missing something obvious.

Hi, I'll try to post as much information as I can ...

System:
TrueNAS-SCALE-23.10.1 (Cobia)
i3-9100

Cloudflare (iX Systems Official installed):
I own my domain, and I have certs in Credentials, and I have a basic tunnel set-up with one app already
As an aside, this is working perfectly with the app Mealie (I just changed the Base URL to https://mealie.domain)

Cloudflare settings:
DNSSEC = enabled
SSL/TLS - Encryption Mode: Full
Edge Certs - Universal - Active; Backup - Issued
DNS Records - CNAME for host - Proxied; TTL=Auto
Tunnel status = Healthy

Tunnel Settings:
Public hostname: cloud.domain
Service: HTTPS://InternalServerIP:hostport

No TLS Verify = Enabled
Disable Chunked Encoding
No Happy Eyeballs
(All other settings default)

Nextcloud (iX Systems Official installed)

Nextcloud config.php

Code:
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' =>
  array (
          0 =>
          array (
                  'path' => '/var/www/html/apps',
                  'url' => '/apps',
                  'writable' => false,
          ),
          1 =>
          array (
                  'path' => '/var/www/html/custom_apps',
                  'url' => '/custom_apps',
                  'writable' => true,
          ),
  ),
  'overwritehost' => 'cloud.DOMAIN',
  'overwriteprotocol' => 'https',
  'trusted_proxies' =>
  array (
          0 => '127.0.0.1',
  ),
  'upgrade.disable-web' => true,
  'passwordsalt' => 'XXXXXXXXXX',
  'secret' => 'XXXXXXXXXXX',
  'trusted_domains' =>
  array (
          0 => 'localhost',
          1 => 'INTERNAL IP',
          2 => 'cloud.DOMAIN',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'pgsql',
  'version' => '28.0.1.1',
  'overwrite.cli.url' => 'https://cloud.DOMAIN',
  'dbname' => 'nextcloud',
  'dbhost' => 'nextcloud-postgres:5432',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_admin',
  'dbpassword' => 'XXXXXXXXX',
  'installed' => true,
  'default_phone_region' => 'US',
  'instanceid' => 'ocg402rhgw7j',
  'app_install_overwrite' =>
  array (
    0 => 'memories',
  ),
  'memories.exiftool' => '/var/www/html/custom_apps/memories/bin-ext/exiftool-amd64-glibc',
  'memories.vod.path' => '/var/www/html/custom_apps/memories/bin-ext/go-vod-amd64',
  'memories.vod.ffmpeg' => '/usr/bin/ffmpeg',
  'memories.vod.ffprobe' => '/usr/bin/ffprobe',
  'enabledPreviewProviders' =>
  array (
    0 => 'OC\\Preview\\Image',
    1 => 'OC\\Preview\\HEIC',
    2 => 'OC\\Preview\\TIFF',
    3 => 'OC\\Preview\\Movie',



One thing I've observed is, when I go to cloud.DOMAIN ... I am forwarded to https://INTERNALIP:PORT ... which I do not believe is expected behavior
 

Austinbru

Dabbler
Joined
Jul 21, 2022
Messages
16
Good gravy. Thank you ... not sure how I missed that one.

Confirmed this solution
 
Top