Nextcloud - moved from Truecharts to Official to VM

sos_nz

Explorer
Joined
Mar 17, 2023
Messages
58
Well, with the latest nextcloud update from Truecharts seeming to require a "delete -> reinstall", I bit the relative bullet and migrated back to the official version for now.

Trying to do a regular upgrade of the Truecharts nextcloud app yesterday resulted in some "[EINVAL] values.persistenceList: Item#0 is not valid per list" error (or words to that effect). I couldn't get heavyscript to mount the PVC container to try to copy data & settings across, and there was nothing obvious in terms of solutions on the Discord channel. Reading this forum, it seems a few folks have moved away from Truecharts due to breaking upgrades requiring fresh installs & losing app data.

So....I have moved to official nextcloud app. Accessing the config.php in the container's shell (to get it working behind HAproxy) proved difficult, since there's no text editor included in the official nextcloud docker image. An "apt-get update", followed by "apt-get install nano" solved that one.

So far, so good....just a couple of 'carddav' errors to sort out, and something about memory locking cache.

One thing I thought the official app lacked, but I'm pleased to find out was just a GUI difference, was the ability to select SSL/TLS to access gmail's smtp server. I thought you had to choose SSL/STARTTLS, without realising SSL/TLS was the same thing :smile:

I may yet go the VM route (https://docs.hanssonit.se/s/W6fMouPiqQz3_Mog/virtual-machines-vm/d/W6fMquPiqQz3_Moi/nextcloud-vm), however, since containerised installs are still limited in ways that confuse me.

EDIT 27/6: still vacillating between Official and Truecharts.

On Official, there's no Redis server, resulting in an Admin warning about transactional file locking. My OCD doesn't like errors or warnings.

On the latest version of Truecharts nextcloud (27.0.0_21.0.3), you can't edit its config.php, since it reverts to default on restart. You have to "Stop All" to properly stop the app, otherwise it hangs at 40% with "waiting for pods to be scaled to 6 replica(s)" (Discord pointed me to the fix: https://truecharts.org/news/stop-all/). When you restart the app, it reverts to the default config.php. This prevents setting such important parametres in config.php as overwriteprotocol => 'https' abd overwritehost => 'your.web.address', and 'trusted_proxies' , which are necessary for certain setups such as mine.

The VM is looking more and more like the best way forward....
 
Last edited:

T13nou

Cadet
Joined
Aug 29, 2022
Messages
9
Hi ! Nothing to help but I’m strictly in the same case …

Truecharts chart reworks made me lost confidence on hosting nextcloud with it so I revert to Official and discovered a lot of missing features :/

Maybe I’ll give a try to host it on VM :)
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
Hi ! Nothing to help but I’m strictly in the same case …

Truecharts chart reworks made me lost confidence on hosting nextcloud with it so I revert to Official and discovered a lot of missing features :/

Maybe I’ll give a try to host it on VM :)

Please list and prioritize the missing features - Its even better if you can also post comments on GitHub.
Other users can benefit from the work you have done and assess whether the missing features are critical to their use case.
 

sos_nz

Explorer
Joined
Mar 17, 2023
Messages
58
Yeah - I've asked some questions, and got helpful advice on Discord, and have also put in an enhancement request on Truechart's GitHub page asking for access to more advanced options - either GUI, or preferably given the range of flexibility it offers, to re-enable ability to edit the config.php.

For me, the official app just needs access to Redis as a memcache for the transactional locking. I'll get that request in to the official nextcloud team ASAP :)
 

T13nou

Cadet
Joined
Aug 29, 2022
Messages
9
Issues logged in charts section @morganL

Thanks :)
 

Kris Moore

SVP of Engineering
Administrator
Moderator
iXsystems
Joined
Nov 12, 2015
Messages
1,471
FWIW, we already have some logic in the chart that does the ffmpeg installation / customization. We may not get to this right away, so if somebody wants to do some light YAML hacking and add support for these other options it should be fairly straight-forward if you look at the ffmpeg example.

 

T13nou

Cadet
Joined
Aug 29, 2022
Messages
9
Thanks @Kris Moore , I'm not very familiar with pull request but doesn't seems very complicated to at least modify deployment.yaml to integrate smbclient, nano & sudo ... :)

Am I supposed to follow pull request way or is there another way to share proposal for new deployment.yaml ?
 

Kris Moore

SVP of Engineering
Administrator
Moderator
iXsystems
Joined
Nov 12, 2015
Messages
1,471
Pull request for review is the way to go. If you can get something working we'll be happy to look it over and if its working we'll merge it in.
 

T13nou

Cadet
Joined
Aug 29, 2022
Messages
9
Perfect, thanks !

Just added a PR for smbclient installation https://github.com/truenas/charts/pull/1317

I'll take a look at at cron issue

Regarding Redis, seems that other charts include it as additional container. I'm asking myself a question regarding NC chart, because as there is some work already done with truecharts or even NextCloud AiO, I wonder how TrueNAS team want to fork these ones in a more stable approach or other ??

@Kris Moore & @morganL
 

Kris Moore

SVP of Engineering
Administrator
Moderator
iXsystems
Joined
Nov 12, 2015
Messages
1,471
Great! I've reviewed it and it looks correct to me. Assigned to another engineer for a quick review as well.

Redis is a tougher question, I'd suggest you open it as an issue on GitHub to have the discussion about best path forward with Stavros and our Charts team. At some point you almost need to have two editions of NC in the catalog if one is going to be fundamentally configured differently with entirely different DB backend.
 

wili4m

Explorer
Joined
May 23, 2022
Messages
57
Well, with the latest nextcloud update from Truecharts seeming to require a "delete -> reinstall", I bit the relative bullet and migrated back to the official version for now.

Trying to do a regular upgrade of the Truecharts nextcloud app yesterday resulted in some "[EINVAL] values.persistenceList: Item#0 is not valid per list" error (or words to that effect). I couldn't get heavyscript to mount the PVC container to try to copy data & settings across, and there was nothing obvious in terms of solutions on the Discord channel. Reading this forum, it seems a few folks have moved away from Truecharts due to breaking upgrades requiring fresh installs & losing app data.

So....I have moved to official nextcloud app. Accessing the config.php in the container's shell (to get it working behind HAproxy) proved difficult, since there's no text editor included in the official nextcloud docker image. An "apt-get update", followed by "apt-get install nano" solved that one.

So far, so good....just a couple of 'carddav' errors to sort out, and something about memory locking cache.

One thing I thought the official app lacked, but I'm pleased to find out was just a GUI difference, was the ability to select SSL/TLS to access gmail's smtp server. I thought you had to choose SSL/STARTTLS, without realising SSL/TLS was the same thing :smile:

I may yet go the VM route (https://docs.hanssonit.se/s/W6fMouPiqQz3_Mog/virtual-machines-vm/d/W6fMquPiqQz3_Moi/nextcloud-vm), however, since containerised installs are still limited in ways that confuse me.

EDIT 27/6: still vacillating between Official and Truecharts.

On Official, there's no Redis server, resulting in an Admin warning about transactional file locking. My OCD doesn't like errors or warnings.

On the latest version of Truecharts nextcloud (27.0.0_21.0.3), you can't edit its config.php, since it reverts to default on restart. You have to "Stop All" to properly stop the app, otherwise it hangs at 40% with "waiting for pods to be scaled to 6 replica(s)" (Discord pointed me to the fix: https://truecharts.org/news/stop-all/). When you restart the app, it reverts to the default config.php. This prevents setting such important parametres in config.php as overwriteprotocol => 'https' abd overwritehost => 'your.web.address', and 'trusted_proxies' , which are necessary for certain setups such as mine.

The VM is looking more and more like the best way forward....
I think they already solve this issue in 27.0.0_21.0.8
before when ingress on, every time restart i must configure config.php remove the port, now i see no need todo that anymore, can direct login to dashboad.
but still can't access by ip, not like old version, i can access by ip and domain.
 
Last edited:

sos_nz

Explorer
Joined
Mar 17, 2023
Messages
58
Update: I've got nextcloud fully running, with no config errors, in an arch linux VM.

I started with the helpful guide here: https://www.atlantic.net/dedicated-server-hosting/how-to-install-nextcloud-on-arch-linux/ (note, there's a syntax error in the guide which will result in an inability to login to the mariaDB/msql database...it should read "GRANT ALL ON nextcloud.* TO 'nextcloud'@'localhost' IDENTIFIED BY 'password'; ).

Once installed, there are still a number of additional steps needed to get it fully setup and 'warning free' e.g. install Redis, add rewrite rules to .htaccess, install and enable a number of extra php modules, edit config.php for memcache, trusted_proxies, overwriteprotocol etc. and finally set up cron or a systemd service to run nextcloud's cron.php file every 5 minutes.

However, all in all it seems cleaner, simpler, flexible & more transparent than the app route, IMHO.
 
Last edited:

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
You can always run your own redis container and point nextcloud to it using the big blue button. Or, use the redis app I see there is now.
 
Last edited:

sos_nz

Explorer
Joined
Mar 17, 2023
Messages
58
Good discussion above, thanks all. I hope / look forward to the ongoing development of the official chart. I think the direction of the Truecharts version is looking too locked down - but then again, I now understand why they'd take that approach, given the complexity of nextcloud (having set it up from scratch under Arch in a VM). You either get 'flexible' or 'it just works out of the box'. Can be a fine line to tread!

Final update from me for now: I gave my nextcloud VM 'unlimited' storage (instead of its measly 40GB virtual disc only) by setting its data directory to an NFS share on my host TrueNAS system. Perfect!
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
If you ran CORE you could have a full traditionally installed Nextcloud in a FreeBSD jail, avoiding the VM overhead and locked memory, and using a local filesystem mount instead of NFS.
 

sos_nz

Explorer
Joined
Mar 17, 2023
Messages
58
All True (ha, ha), Patrick!

However, I'm a bit far into the SCALE hole now, so will keep at it. Fortunately I've got excess resources on my current NAS/server (for now). That's helpful to know, though.
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
Another barrier to people moving existing nextcloud deployments into Scale is the lack of a non Truecharts mariadb app. There are a ton of existing nextcloud deployments that use mysql/mariadb. I created my own mariadb container just to avoid this (as I have many other things that use maraidb that I do not want to convert including custom coded "apps", I have close to 10 databases), but, I suspect it would be handy to have a mariadb app to help those people with moving to Scale. Just my opinion. Then implementing nextcloud on Scale would be a bit easier for those in that boat.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
I use mariadb for my home asssistant logging as well due to the volume of it over years of time. Plenty of smaller business software, esp web related, think wordpress, ghost, blogs, ecomm, etc, use mariadb. Anonaddy, Friendica, drupal, moddle, geeklog, alfresco come to mind. Many more. Larger companies would of course have their own database servers. But it might make sense to have a database running on truenas for smaller companies or home users.

It's a pain for many as evidenced by questions about migrating to postgres. If you have enough apps using a given database, I believe it makes more sense to have one copy of it instead of many copies of it. For many many reasons.
 
Top