Cannot connect to nextcloud apps from remote address

--------------------------PROBLEM---------------------------
This problem only happens when trying to connect with the remote domain.
If a try to connect from within my WAN with wan adressed no there is no problem.

Cannot connect to nextcloud android app or linux appimage.
I cannot go through the first login. With app image i reach the page to allow the connection, but the app image get stuck in waiting for authorization.

Something similar happens in the android app, i can validate the account credential, no error is returned the loading icon start spinning and stays blocked there.

There is a similar problem the first time i try to log in with a newly created user in the web app. It does validate the user but it get stuck in the login form with a spinning loading circle, but, in the web app, i can refresh the page. Doing so will show the new user dashboard. There are no log in problems for every next log in with the same user.

I can connect to webdav or next cloud with any other client i tried like, but one:
Success: ubuntu account login, any browser, webdav protocol with nautilus file manager, webdav with joplin android and linux app. Connect to cardav e caldav with DAVx5 for android.
Failed: connect with thunderbird to caldav

--------------------------ARCHITECTURE---------------------------
I installed NextCloud with a TrueNas official plugin, i then have nginx as reverse proxy.
On TrueNas i also have a VM with docker.
Nginx is managed with “Nginx Proxy Manager” installed as a docker container.
The particularity of my architecture is the use of ngrok to tunnel all the connection on my TrueNas server.
With my ngrok tunneling configuration i allow only https requests to reach nginx.

--------------------------VERSIONS---------------------------
Nextcloud version: 20.0.7 (had this problem since first install at 20.0.5)
Operating system and version: freebsd 12.1-RELEASE-p13
Nginx version: latest (automatically updated)
PHP version 7.4.14, Zend Engine v3.4.0, Zend OPcache v7.4.14

--------------------------LOGS---------------------------
No log as interested user in the web app.
No log as ncadmin user in the web app.

I dont see anything logged at the time of connection, here the last errors in the nextcloud.log

{"reqId":"qOnctFfvoZBYg7W7IGWC","level":2,"time":"2021-03-19T15:45:31+00:00","remoteAddr":"192.168.8.123","user":"TheStefano","app":"drawio","method":"GET","url":"/apps/drawio/9799","message":"Open: 9799  ","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0","version":"20.0.7.1"}
> {"reqId":"kTvGzaRuxXkggBXKPSrI","level":3,"time":"2021-03-20T19:28:59+00:00","remoteAddr":"192.168.8.123","user":"ncadmin","app":"PHP","method":"GET","url":"/settings/admin/serverinfo","message":{"Exception":"Error","Message":"Undefined offset: 0 at /usr/local/www/nextcloud/apps/serverinfo/lib/OperatingSystems/FreeBSD.php#187","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/apps/serverinfo/lib/OperatingSystems/FreeBSD.php","line":187,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/usr/local/www/nextcloud/apps/serverinfo/lib/Os.php","line":132,"function":"getNetworkInterfaces","class":"OCA\\ServerInfo\\OperatingSystems\\FreeBSD","type":"->"},{"file":"/usr/local/www/nextcloud/apps/serverinfo/lib/Settings/AdminSettings.php","line":111,"function":"getNetworkInterfaces","class":"OCA\\ServerInfo\\Os","type":"->"},{"file":"/usr/local/www/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":141,"function":"getForm","class":"OCA\\ServerInfo\\Settings\\AdminSettings","type":"->"},{"file":"/usr/local/www/nextcloud/apps/settings/lib/Controller/AdminSettingsController.php","line":83,"function":"formatSettings","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->"},{"file":"/usr/local/www/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php","line":152,"function":"getSettings","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->"},{"file":"/usr/local/www/nextcloud/apps/settings/lib/Controller/AdminSettingsController.php","line":68,"function":"getIndexResponse","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->"},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"index","class":"OCA\\Settings\\Controller\\AdminSettingsController","type":"->"},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/usr/local/www/nextcloud/lib/private/Route/Router.php","line":309,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/usr/local/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/usr/local/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/usr/local/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":91,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:86.0) Gecko/20100101 Firefox/86.0","version":"20.0.7.1"}

The output of your Apache/nginx/system log in /var/log/____:
no log for nginx found