Nextcloud with Cloudflare Tunnel

Hello,

I tried to set up Nextcloud (hosted on TrueNAS-SCALE-23.10.1.3) with a Cloudflare Tunnel linked to a public Domain.

System:
OS Version: TrueNAS-SCALE-23.10.1.3
Product: IBM x3650 M4
Model: Intel(R) Xeon(R) CPU E5-2665 0 @ 2.40GHz
RAM: 133 GiB

Nextcloud:
App Version: 28.0.1
Chart Version: 1.6.56
Catalog:TrueNAS
Train: charts

docker.io/library/nextcloud:28.0.1
docker.io/library/nginx:1.23.3
docker.io/library/postgres:13.1

Problem:
If I’m entering the public Domain, I get instantly linked to the private IP-Address.

Instead of linking to the private IP it should connect to Nextcloud by useing the Domain. This works with other Apps installed on TrueNAS, just Nextcloud isn’t working properly.

Already tried:
I tried already configuring the “config.php” file by adding the public Domain to “trusted Domains”. I also tried different Setups of Cloudflare and changed some other values at the “config.php”.

What else could be the problem?