Cloudflare tunnel to access official Nextcloud app in TrueNAS Scale

Greatscott11

Cadet
Joined
Dec 22, 2023
Messages
4
I have the official Nextcloud app installed on TrueNAS Scale and I want to make it publicly accessible with a Cloudflare tunnel.

Somebody apparently got this working by using http for Nextcloud instead of https but I can't login to the interface without https even after reinstalling.

Here are my steps:
I added my domain to Cloudflare and I installed the Truecharts "Cloudflared" app on TrueNAS as the connector.

1704852936687.png


1704852966202.png


My SSL/TLS encryption mode is Full and I have Always Use HTTPS turned on. I also have "noTLSVerify" turned on under the Nextcloud Public hostname:

1704852815513.png


This exact setup let me access a Wordpress server and my Minecraft server online with no issues but my Nextcloud instance doesn't load. The Wordpress and Minecraft servers are both Truecharts but the Nextcloud app is TrueNAS official.

Does anyone know if the Truecharts version of Nextcloud works with Cloudflare tunnels? I'd like to keep my existing install if there is an easy fix but Truecharts seems to work better so far.

Thank you for your time!
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
 

Greatscott11

Cadet
Joined
Dec 22, 2023
Messages
4
That worked! I guess I added another search term for people like me that couldn't find that thread! Thank you for the quick response, your posts have helped me many times in the past.
 

UnMugViolet

Cadet
Joined
Dec 13, 2023
Messages
3
Hi there,

I'm running into the same issue and unfortunately cannot run nextcloud with cloudflare tunnel.
I tried to install nextcloud with TrueCharts library and TrueNas with the enviroment in app setup and it does not work.

However it does work perfectly with jellyfin.

I am running Traefik app as well, it is running on port 9000 like it should, using TrueCharts nextcloud I cannot access in the edit field the webUi port and I strongly believe that this issue is related to the fact that nextcloud is using the same port as Traefik.

Does the solution listed above work for nextcloud downloaded using Truenas library or TrueCharts ? Because I can fortunately choose the port on the web App using Truenas library but it still does not work.

I've been following this tutorial for my setup, the settings are exactly the same :

 

Greatscott11

Cadet
Joined
Dec 22, 2023
Messages
4
All the Truechart apps I installed worked without issue with my Cloudflare tunnel. I only had to go this route because I wanted to use the official Nextcloud app.

If you set up your tunnel like I did (NoTLSVerify) then you should have no issue accessing the interface.

I don't run Traefik so I'm not sure how that affects your Cloudflare setup.

I couldn't get the Truecharts version of Nextcloud working at all so I went with the official app. I'd recommend going that route.
 

UnMugViolet

Cadet
Joined
Dec 13, 2023
Messages
3
Hi,

Thanks for your answer !
Truecharts version is neither working for me.. don't know why..

I tried with the official app and it was not working as well, could you by any chance share your configuration of nextcloud via screenshot so that I could replicate at home ?
 

Greatscott11

Cadet
Joined
Dec 22, 2023
Messages
4
You might have an issue with your Cloudflare tunnel setup?
  • Make sure your SSL/TLS encryption mode is Full for your domain
  • In your tunnel config make sure your subdomains are on top of your main domain (like the last image in my first post)
  • For subdomains using HTTPS like Nextcloud, make sure to enable No TLS Verify:
1707090458075.png




My Nextcloud install has the default certificate added, ffmpeg and smbclient installed, and cron jobs enabled. All pretty standard stuff. The only change I had to make was to add two environment variables under the service config:

1707089983283.png


I waited for the app to restart (or I might've restarted the server) and it just worked. I can access my Nextcloud instance from "https://nc.domain.name".

Hope this helped!
 

UnMugViolet

Cadet
Joined
Dec 13, 2023
Messages
3
Well thanks a lot after a few tries I've been able to run the app on my domain.

Tanks a looooooot !! I think it must mean that I owe you a beer too !

You helped a lot :smile:
 
Top