Nextcloud - moved from Truecharts to Official to VM

slacks425

Dabbler
Joined
Aug 6, 2023
Messages
13
I'm more or less in the same boat. I build a compact machine as a replacement of a 9 year old Synology. On it, my most critical apps are Nextcloud and Wordpress, both running with MariaDB. (For Wordpress there are solutions with plugins, even if I'm still blocked for something as stupid as editing a config file in shell, there is no text editor in the container and cannot install one, but I will open another topic for that).
But for Nextcloud, it's a nightmare. I have try this pgloader script that should be able to convert the db, but not luck so far as I cannot connect both db from one machine. Nextcloud also have a script with occ to convert the db but again, I would need a mariaDB on TrueNAS to do convert from one to another.

What I'm afraid of, it that even if I succeed, I might not be able to run Nextcloud with imported db and files on TrueNAS Scale without additional issues. The Redis thing will be one, but there are more probably. To be honest Nextcloud was always a nightmare to install and maintain already on the Synology, I remember doing all the updates manually from version 10 or 11 to 27, I wrote my own tutorial to be sure I will be able to do it next time again. Maybe I will write some tutorial for others as well, if I succeed doing the migration. But I might as well start over and resetup the users as it's only the family (still it's like 8 to 10 devices in total).
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
You can run your own mariadb via the big blue button, I am. And Redis is there, just a separate container. I've been running for over a year and zero issues. Upgrades are painless. It's actually better than when I was running on bare metal. I can help you with mariadb.
 
Last edited:

slacks425

Dabbler
Joined
Aug 6, 2023
Messages
13
You can run your own mariadb via the big blue button, I am. And Redis is there, just a separate container. I've been running for over a year and zero issues. Upgrades are painless. It's actually better than when I was running on bare metal. I can help you with mariadb.
Hi @sfatula , thanks for the advise. I guess you mean the "Launch Docker image" button, right? Would definitely like some help as so far I was never able to run a Docker properly in TrueNAS, still learning even after 9 years with Synology (often digging in SSH and under the hood, for the better or worst) and about half of that using Ubuntu based distro as main daily use PC.
Do you know a tutorial or video to help me start properly with Docker on TrueNAS Scale? I tried a couple but no luck so far.
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
I don't use tutorials or videos as I find most of them are either wrong, misleading, or worse. I'd rather understand what I am doing than follow those.

I am merely speaking of using existing docker images, not your own. If you want to try out mariadb as your first launch docker image, send me a PM. It's really painless.
 

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
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.
Wrong here... The image includes busybox, which means basically everything!

you can use vi either by doing busybox vi /mypath/myfile or by creating a link pointing to busybox ln -s /bin/busybox /bin/vi and then call vi.
 

sos_nz

Explorer
Joined
Mar 17, 2023
Messages
58
you can use vi either by doing busybox vi /mypath/myfile or by creating a link pointing to busybox ln -s /bin/busybox /bin/vi and then call vi.
Ah - thanks! vi not as nice as mcedit or nano though, IMHO :)

Still, for the many other reasons, I've moved to a VM installation, which is running beautifully, and is readily upgradable.
 

sos_nz

Explorer
Joined
Mar 17, 2023
Messages
58
Bit of a bump of my own post, sorry - but I've just had the easiest update experience yet, with 27.1.2 being released.

Nextcloud's built-in web interface update page causes problems with timeouts etc, so IMHO it's best to ssh in to your VM, and issue the following commands:
Code:
1. sudo -u http php /srv/http/nextcloud/updater/updater.phar --no-interaction
2. sudo -u http php /srv/http/nextcloud/occ upgrade
3. sudo -u http php /srv/http/nextcloud/occ db:add-missing-indices
4. sudo -u http php /srv/http/nextcloud/occ db:convert-filecache-bigint

Note 1: Since the updater overwrites the .htaccess file, you will need to edit or copy /srv/http/nextcloud/.htaccess to fix the cardDAV and calDAV errors (by entering your nextcloud's https://address)

Note 2: The above paths are for Arch linux. Other distros may use '/var/www/nextcloud' and user 'www-data' (https://www.linuxbabe.com/cloud-storage/upgrade-nextcloud-command-line-gui)

Done!
 
Last edited:

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
With docker/kubernetes the procedure is:

Load new image, done.

Here and there if nextcloud tells you you may still need the add missing indices.
 
Last edited:

sos_nz

Explorer
Joined
Mar 17, 2023
Messages
58
Load new image, done.
If only. I remember the last time I did a Truecharts update it somehow completely hosed my data. And the new version wouldn't let me edit the config.php file, so no reverse proxy was possible.
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
If only. I remember the last time I did a Truecharts update it somehow completely hosed my data. And the new version wouldn't let me edit the config.php file, so no reverse proxy was possible.

I get that, I was saying NOT using truecharts and NOT using IX Systems app, just plain loading the docker file via big blue button, that's been my upgrade process, never fails (so far in a year), no issues, trivial to do.
 

sos_nz

Explorer
Joined
Mar 17, 2023
Messages
58
Ahhh. All good. I might have to look into that setup for fun too :)
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
Yeah, nothing wrong with learning. I've replaced all but one app with simply using the containers publically available on docker hub, or my modified versions of them where desirable.

There's tons of docker users in the world, a small subset of them run Truenas. I trust the standard containers more than apps, but that's me. Ymmv. I also find using them outside of "apps" makes things so much simpler and flexible.

Play around if you ever get the chance.
 

sos_nz

Explorer
Joined
Mar 17, 2023
Messages
58
I had a quick look at some docker installs for Nextcloud and other apps. Looks complicated :)

I still think a VM looks easier....and I'm not the only one (Downfall parody, where Hitler critiques Docker...):
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
If you are not familiar with docker, you are of course correct! If or once you are, it's pretty simple actually. Use a VM if you have no interest in docker/apps then, whatever works for you is what is best.
 

sos_nz

Explorer
Joined
Mar 17, 2023
Messages
58
Just updated to Cobia. Looks like they've removed the "Launch Docker Image" button. Smooth upgrade, with no issues here, BTW.

Edited :)
 
Last edited:

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
It's right here, it merely moved:

 

sos_nz

Explorer
Joined
Mar 17, 2023
Messages
58

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
Bit OT, but I'm going to give the mythtv docker an install on my Arch desktop machine, since the AUR package frequently falls over due to updated dependencies.

(https://hub.docker.com/r/sammonsjl/mythtv/)
Yeah, OT, but, can't help it, I always loved mythtv. I don't use it anymore, but, it had the best database schema. I ran on Mac and it was only psuedo supported. For the most part, anything you do on your Arch desktop to run that mythtv docker is the same thing you do with the "custom app" or load docker image. That's one of the advantages of using docker over the package managers, you can generally get more recent versions without worrying about breaking packages.
 

marshalleq

Explorer
Joined
Mar 12, 2016
Messages
88
I have come back to TrueNAS in the past few days and migrated my main system to it (from unraid). I have more limited TrueNAS experience than most but plenty in other systems both appliance like and not. From what I'm seeing and reading here in the last few days there are really only two reliable methods to deploy apps, one is using the custom docker feature, the other is using VM's. Both the IX-Systems apps and the TrueCharts apps seem to have challenges. Of the two reliable methods, the easiest one to get yourself out of a pickle with to me is the custom docker method, but to know this you have to know docker. It is also the least resource intensive. I hold up hope that IX systems will either make this method more streamlined or realise the importance of having a decent App Library that includes basic dependencies such as mariadb and I'm sure there are a lot of us here that would provide them a lot of free time to help them get to this point.

In my opinion Kubernetes is just an unnecessary overhead and additional complication that adds an unnecessary and in the middle and results in painful complication. Though I think the config pages might be a little easier with some additional UX design - in particular removing the unnecessary excess blank space that exists so that you can see what you're looking at properly.

Screenshot 2024-02-26 at 08.54.16.png



Screenshot 2024-02-29 at 09.11.10.png

Comparing the two, unraid fits on one and a half pages to do the same thing with docker, Truenas fits on 5 pages. There's an advanced setting to get more options when you need them but even then it only goes up to two pages. Most of the TrueNAS settings you don't need to change - so these could clearly be optimised under an advanced page that toggles on and off like unraid does. That would make the whole process seem much simpler to the average person.

I'm going to stick with TrueNAS for a while and see what I can contribute to bugs and features, but I really hope IX Systems are open to it. This product has the bones of awesome, but it isn't quite there yet.
 
Top