Pointing Truechart Nextcloud to a different hostpath for files?

tsm37

Dabbler
Joined
Feb 19, 2023
Messages
46
Under the Truechart version of Nextcloud, is it possible to tell Nextcloud to store the application files in one hostpath while setting another hostpath which contains my personal files/folders? In my TS Scale, I already have a file / dataset / folder hierarchy setup (however you want to call them).

By default and at least what I'm seeing, Nextcloud will put the application files and user data in one hostpath and the web GUI will show the folders within the same hostpath. I want Nextcloud web GUI to show the folders under my existing folder hierarchy.
 

tsm37

Dabbler
Joined
Feb 19, 2023
Messages
46
I really need some help on this. Here are more information of my issue:

Please see the attached screenshots. I already set the hostpath to /mnt/tankpool/files/ in the application and /files/ is where I store all my personal data, etc. However, the nextcloud web GUI keeps on defaulting to /data/admin/files; in other words, it's /mnt/tankpool/files/data/admin/files. I just want the web gui to default to /mnt/tankpool/files.
 

Attachments

  • 001.jpg
    001.jpg
    39.8 KB · Views: 170
  • 002.jpg
    002.jpg
    46.4 KB · Views: 175

LarsR

Guru
Joined
Oct 23, 2020
Messages
719
You have to add an env variable in the config called NEXTCLOUD_DATA_DIR
With a value of /insertnamehere and then map the hostpath to /insertnamehere
A Forum member called heavybulls made very good YouTube Video about nextcloud where He explains everything.

The Channel ist called heavysetup.
Just search for truecharts and nextcloud and you should find it
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788
You have to add an env variable in the config called NEXTCLOUD_DATA_DIR
With a value of /insertnamehere and then map the hostpath to /insertnamehere

DO NOT DO THIS, it creates conflicts and might/will even break your setup.
That's not how the TrueChart works, you'll need to set userdata in the storage section.

A Forum member called heavybulls made very good YouTube Video about nextcloud where He explains everything.

The Channel ist called heavysetup.
Just search for truecharts and nextcloud and you should find it

We would heavily advice against using third-party guides and advice.
We cannot guarantee it might not break your stuff in the future. Which, sadly enough, is the case more often than not.

---
If you need any help with TrueCharts, please reach out to out support staff on discord directly be filing a support ticket there.
We, sadly enough, do not have the capacity to also provide support on this forum as well.
 

LarsR

Guru
Joined
Oct 23, 2020
Messages
719
That's not how the TrueChart works, you'll need to set userdata in the storage section.
When was that option added? If i remember correctly that option was not present when i set up the app.
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788
When was that option added? If i remember correctly that option was not present when i set up the app.

Months ago.
But even before, we didn't support settings that env-var and it would cause issues down the line.
 

LarsR

Guru
Joined
Oct 23, 2020
Messages
719
I've had it set like this from the very beginning, like when you guys first released your charts, but if it's not recommended and/or supported i'll change my config.
 

tsm37

Dabbler
Joined
Feb 19, 2023
Messages
46
@LarsR @truecharts thanks guys for the inputs and yes, I will open a ticket via discord. I'm on a test environment so I can try different things. I also googled extensively about my issue and did come across an article that a truechart staff said not to use NEXTCLOUD_DATA_DIR; nevertheless, I did try this environmental attribute and it didn't work. I looked up many youtube videos and also couldn't get it to work.

It's ok that truechart nexcloud sets a path of /data/admin/files/ and the web GUI defaults to this path. However, I did try to mount a dataset in the truechart nexcloud setup, but that mount just doesn't come up within /data/admin/files/. I have no idea what to do but to open a ticket at this point.
 

truecharts

Guru
Joined
Aug 19, 2021
Messages
788
Just wanted to provide an update and perhaps it may help other forum members. I was able to achieve what I wanted. The missing piece was enabling the External Storage function in Truechart Nextcloud. I also came across this article: https://www.digimoot.com/freenas-setup-nextcloud-mount-point-using-external-storage-and-permissions/ and played around with it and got it work.

We do not advice external storage and officially only support our configuration option to setup hostPath userdata.
 

tsm37

Dabbler
Joined
Feb 19, 2023
Messages
46
We do not advice external storage and officially only support our configuration option to setup hostPath userdata.
Understood and thanks the guidance. However, Truechart Nextclouds creating those default path and default folders and display those default folders in the web GUI just doesn't work for me (and perhaps for some others) because I already have existing folder hierarchy. I just wanted to mount my existing folders to Truechart Nextcloud web GUI and I was able to achieve that finally. I'm not using the application for business, so I feel comfortable of using workarounds.

As for the External Storage function with Nextcloud, I learned that it can map local path and not just external storage devices. Even mapping a local path in the web GUI via the External Storage section didn't work until I added a host path and mount point in Truechart Nextcloud installation screen in Truenas Scale.
 
Top