Nextcloud acces via internet

DomeDD

Cadet
Joined
Mar 10, 2024
Messages
2
Hi, I'm new to TrueNAS but I think I did an o.k. job setting up my TrueNAS SCALE system.
OS: TrueNAS-SCALE-23.10.2
CPU: AMD Ryzen 5 5600G
RAM: 16 GB
Drives: 120 GB SSD | 250 GB SSD | 3x 4 TB NAS-HDD

I have already successfully set up pihole and currently I'm struggling making nextcloud available via internet.
I'm trying to set up Nextcloud fromTrueNAS catalog, not TrueCharts!

I own a domain, let's call it mydomain.com. I've created a cname record to point to my ddns domain (server.mydomain.com -> ddns.domain.net -> myPublicIP). In my router I enabled portforwarding for the TrueNAS system (port 9001 for nextcloud, port 20720 for pihole(just for connectivity testing purposes)).
When accessing nextcloud via internet https://server.domain.com:9001/login, I'm landing on the nextcloud login page. Entering my credentials, I won't get redirected to the nextcloud dashboard. I'm stuck in the authentication process. Sometimes I will get redirected to the local LAN IP of TrueNAS.
A valid Let's encrypt certificate is installed and used by nextcloud. There is no certificate error when accessing nextcloud via internet.

I followed the official guide and read many posts in this forum and tried so many things…

  • Yes, I re-applied permissions for www-data to the datasets
  • Yes, I tried adding environment arguments to the setup process like this:
NEXTCLOUD_TRUSTED_DOMAINS
server.mydomain.com

OVERWRITEHOST
server.mydomain.com

OVERWRITECLIURL
https://server.domain.com:9001

OVERWRITEPROTOCOL
https

  • Yes, I know I'm not using a proxy, this is just a poc. Proxy will be set up later

When accessing pihole via internet (http://server.mydomain.com:20270/admin/login.php) I am able to access and use it, so there has to be a problem with my nextcloud configuration, I can't seem to find.

Appreciate any help or ideas :)
 

DomeDD

Cadet
Joined
Mar 10, 2024
Messages
2
I found the solution...
Nextcloud isn't happy when selecting a certificate in the creation process of the app. But then there is no https enabled so I connected my Cloudflare tunnel to my TrueNAS machine, set up nextcloud from ground up and now everything is working fine.

Full guide coming...
 

PyCoder

Dabbler
Joined
Nov 5, 2019
Messages
30
I'm using the linuxserver.io Nextcloud build + MariaDB and nignx-proxy-manager with lets encrypt. No issues :)
 
Top