Nextcloud with truenas scale 24.10 and cloudflare

Hi all i recently upgraded my truenas system to 24.10 and my nextcloud app didn’t migrate so went through the process of re-installing the app. However, when I try to access the nextcloud instance using my domain (for example we will use my.domain.com) it re-directs it to the internal IP address. This only happens when I set the host option to the IP of my truenas server. When I set the host to my.domain.com it does not load. if I leave it blank like how I had configured the app before upgrading the system to 24.10 I get a Access through untrusted domain message.

Screenshot 2024-11-03 150522

Does anyone know how to configure this so that I am able to access my nextcloud via my.domain.com?

Same here. The weird thing is that my desktop and android client still kind a works. I don’t get it.

Tried rolling back to previous version 24.04 and Nextcloud was stuck in deploy loop.

I fixed it by switching cloudflare tunnel to http and removing certificate in truenas nextcloud config

Was this after you rolled back your system to 24.04? I was thinking of trying creating the app using add custom app using YALM option but not sure how that works when it comes to updating nextcloud

did you have to change any other settings?

No, I kept the 24.10. version, removed certificate on truenas nextcloud install. And then switched cloudflare tunnel to http local address.

I’ve seen on reddit it worked for other people as well.

Please can you send a link to where you found that fix if you can find it.

I have found it myself, just a lot of testing required

Thank you. Did you add any additional environmental variables, or did you just use the ones I included in the post? Also, did you have to add anything for host in the next cloud app settings?

@S1ngl3 did you have to add any environmental variables or have the host filled in?

I edited the config.php file manually so no env variables. And yes, I specified allowed domains and so on.

However, what really helped me solve the issue was just starting all over. Try to access nextcloud locally without https, then add a tunnel and then add config file changes if needed.

does the config.php file stay intact when you update it via the truenas dashboard?

@S1ngl3 how do you get access to the nextcloud config.php file if the app is installed via truenas scale app store?

Either ssh or mount the volume eg via samba.

The config.php shouldn’t normally change on updates but I won’t make any promises

@S1ngl3 I am very new to truenas, is there a specific way to get into the config.php file. Ive ssh into my truenas and also used the shell built into truenas scale and used the ls command but couldn’t see the config.php.

ive read that i need to create a file that’s stored in the config directory:
doing a LS shows these:

I think there is no “magic bean” shortcut. Study containers, volumes, datasets, datasets mounting.

Then it’ll be easy to access config.php .

But long story short - find in which dataset your nextcloud mounts are located at and then mount them. I think the most straight forward way is to just use the Apps page and then click on Nextcloud → Shell → and then find the config,php file (the ssh shell is /sh shell inside container

And you don’t need to create a file, it was there all along.

Sorry mate but it’s currently not feasible for me to walk you through every step

@S1ngl3 thank you for your help. i have just figured out how to get into the file :slight_smile:

Do people know how to get around this error:

When SSH into my truenas server im am going via the admin user, is this correct or do I need to be accessing it via the root user to be able to edit the config file?

access it through the “Apps” page, not through ssh, it’s simpler that way

but error “permissions denied” is again error which tells you to “go back and understand how linux works”. Sorry to be “that guy” but it just takes time. That’s why it’s paid so well.

1 Like