Error 502 Cloudflare Tunnel from Nextcloud CT in Proxmox

So here goes. I have seen this covered before but never answered.

The issues is contestant Error 502 after about half an hour of smooth running of the Nextcloud instance. One minute it works then it didn’t and now wont.

All other containers and VM’s work fine with them domain, obviously different subdomains. It’s just Nextcloud.

Locally I see the message “access through untrusted domain” which I am fine with.

I am running Nextcloud in a Proxmox container. I then have a Debian cloudflare instances on a second container.

The pointer for 1=> is correct and directed to my Cloudflare hosted domain.

NO TLS is enabled in Cloudflare

No apparent errors from logs

This is my config from Nextcloud:

<?php $CONFIG = array ( 'passwordsalt' => 'xxxxxxxxxxxxxxxxx', 'secret' => 'xxxxxx', 'trusted_domains' => array ( 0 => 'localhost', 1 => 'xxxxxxxxx.xxx', ), 'datadirectory' => '/var/www/nextcloud-data', 'dbtype' => 'mysql', 'version' => '27.0.2.1', 'overwrite.cli.url' => 'http://localhost', 'dbname' => 'nextcloud', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => 'nextcloud', 'dbpassword' => 'e465c2f9a21a668c791fbc68d2532867', 'installed' => true, 'instanceid' => '86a92011d2b4c', 'memcache.local' => '\\OC\\Memcache\\Redis', 'redis' => array ( 'host' => '/var/run/redis/redis.sock', 'port' => 0, 'timeout' => 0.0, ), 'filelocking.enabled' => true, 'memcache.locking' => '\\OC\\Memcache\\Redis', 'updater.secret' => '$2y$10$MZy.grrXi6NWSSO7I5oT..e81g8DSOwF2GfoKYEuBZdlsrWBcLaIa', 'default_phone_region' => 'GB', 'maintenance' => false, 'theme' => '', 'loglevel' => 2, );