How to remove apps from nextcloud inside TrueNAS Scale

I have just tried to integrate collabora/onlyoffice with my nextcloud-instance. For that, I installed the app inside nextcloud to connect collabora with it. This made the nextcloud web-ui instantly unusable (known issue, nobody cares apparently, whatever).

I am now trying to uninstall/remove the app via the shell. I’m running nextcloud in a container on TrueNAS Scale.

I’m not at all savvy when it comes to shell commands. Is there a comprehensive guide I could follow in order to achieve my goal? The docs are not helpful in any way (they assume a certain understanding that I don’t possess) and neither is google or existing forum posts. Maybe someone explained it already but I can’t find it.

Thank you

EDIT: It’s the official nextcloud app, not the TrueCharts version

you are likely looking for occ

you can remove an app with occ app:remove. with plain docker it’s like

docker exec --user www-data <nextcloud app container> php occ app:remove <app name>

or more specific in this case

docker exec --user www-data <nextcloud app container> php occ app:remove richdocumentscode

you are really wrong. we spend lot of time here to assist and understand the problem while silly admins are only looking for “quick fix”… from my feeling collabora-built-in aka richdocumentscode is freezing UI most often occurs on poorly administered devices where admins don’t know what they are doing and expect everything to work itself. but this integration is pretty complex - look at Nextcloud Collabora integration for details

Thank you for adressing this so quickly.

First of all, I’m sorry if I sounded ungrateful here. I appreciate the hard work behind all of this. But if simply enabling an app can break nextcloud (or rather it’s UI) just like that, my opinion is that some sort of safety net should be put into place. Of course, in hindsight I should have read up on it better, but I’m clearly not the only one with this experience and just calling users like myself “silly admins” (as true as that may be) comes off as nothing but arrogant and dismissive. I guess I didn’t make it clear enough: this is all unfriendly enough for inexperienced users and replies like that just make it worse. But I guess frustration is talking through us here, for similarly justified reasons…

Where exactly do I need to enter those commands, though? TrueNAS Scale offers different shells. I also don’t know what <nextcloud app container> stands for. Again, I’m very inexperienced with this, which is why I was asking for easy-to-follow instructions. I also suspect that I am not exactly working with “plain docker”, although I might be wrong.

No you’re right. TrueNAS scale is using TrueCharts, which again is based on Kubernetes, which again is a way too complex system, just to run a few apps on a NAS box.

The reason why they are using such a complex system in the backend is, as the name suggests, that it is intended to be scalable, meaning you should be able to run TrueNAS scale clusters at some point in the future. However, this feature is currently still in its early stages, and therfore not exposed to the UI.

All this wouldn’t be a big deal if the True NAS middleware, which is supposed to hide all the complexity from the user, and thus make it easy, already would be coming along that far, in order to work flawlessly. Unfortunately, this isn’t the case, at least in my opinion. Also the UX in general is worse in Scale than it is in Core, imho.

In my opinion, the whole TrueCharts / Apps integartion on TrueNAS Scale can be called beta at best, even on a single TrueNAS Scale server. At this state it might be good enough to run some simple Docker apps, but not so much for complex apps like Nextcloud.

If I absolutely had to run Nextcloud on a TrueNAS Scale box, I’d probably spin up a Debian VM and install Nextcloud in that.

/End of rant :wink:

I’m sorry if my statement sounds rude for you. Unfortunately you are not the first one who tries to setup pretty complex system without deep understanding of the underlying technology. We help but often enough people loose focus once their problem is solved by tweaking some parameter without looking for the root cause.

This is exactly what I told you before - you are looking for help in the wrong place. People run Nextcloud on various hardware from bare metal to virtual machines over different container technologies to a RaspberryPi. This forum is for Nextcloud support and you can’t expect deep knowledge of other systems like TrueNAS (even it might exist as in comment from bb77). You must review TrueNAS docs how you can run Nextclouds occ command inside of the container.

I probably should have made that clear. I’m not a TrueNAS Scale expert, I’m still using TrueNAS Core and I use it stryctly as a NAS. However, what I stated in my little rant is based on the experience from people who are experts, and based on my own tests as a somewhat expirienced homelaber. :wink:

And maybe my little rant came across a bit too harsh, so let me sum it up in different words…

Is it possible to run Nextcloud on TrueNAS Scale?

Yes, if you are willing to deal with its quirks and what I’d call to be some strange logic of how certain things need to be done.

Would I use it in production?

No. I just don’t trust it enough its current state, and neither am I willing to deal with its quirks and keep up to date with the rapid developement and the constant changes of it. As I said, I still consider it a beta.

Also, but that has nothing to do with the quality of the product itself, I like when things are separated, so I’m generally not a big fan of these all-in-one boxes. I run my applications on Proxmox, mostly in VMs, and I have separate TrueNAS core box for backups and media storage.

And last but not least, I’m already familiar with Proxmox, and just don’t feel it’s worth it for me to learn TrueNAS scale, especially with all its unique quirks. Of course, this is not meant to discourage anyone who wants to do so… :slight_smile:

1 Like

Really? I thought they are using k3s which is a project that is not intended to run on multiple servers apparently it is?
Edit see GitHub - k3s-io/k3s: Lightweight Kubernetes

I guess many users like me expect it to be as simple as all the marketing around it makes it look. As bb77 said, all of this is pretty new and still needs time to ripen enough for this to be remotely true.

I think I understand now. Sorry for complaining at the wrong place (although my stance on the problem with richdocumentscode still stands :slight_smile: ) and I think I found a solution to my problem. Once I’m done and everythin is up again, I will post the instructions and mark this thread as solved

1 Like

Yes, as far as I know it is K3s. However TrueNAS itself is not precise either, and they just call it Kubernetes in their product comparison table. And the K3s project itself calls their product a lightweight Kubernetes distribution. So, I guess, I was at least not completely wrong calling it like that :wink:

But I won’t get into a discussion about container technlogies and orchestration tools with you, because I’m pretty sure you have waaaaay more expirience in this area than I do :wink:


So for anyone else looking for a solution, this is what helped me. This forum post helped me a lot!

navigating to the shell

  • On your TrueNAS Scale, navigate to the Apps tab on the left. Look for nextcloud among your Installed Applications.
  • Open nextcloud’s three-point menu to access the shell. In the first drop-down menu, choose the pod that does not contain “postgres” or “cronjob” in the name. For container, choose nextcloud. Commands just said /bin/sh for me.
  • Click choose to open the shell.

get the right directory

  • Inside the shell, you need to find out where occ is located. For me, it was already the correct working directory. If it get’s listed when entering ls, you’re on the right track (Otherwise, navigate using cd and cd ..; I believe there is also some sort of find command, but it didn’t work for me)
  • If you found occ, just enter pwd and note what it prints, for me it was /var/www/html (i.e. the directory containing occ). Note that that is what I’m using in the following commands, so bear in mind to change it to your directory if it’s different to mine.

become root

  • enter su
    Instead of #, the input line should now be preceded by something like root@nextcloud...:/var/www/html#

enable maintenance mode

  • haven’t tried it without this, but I guess it is needed/recommended to enable maintenance mode. This should also keep other users from accessing nextcloud while you’re working on it.
  • enter su -m www-data -c 'php /var/www/html/occ maintenance:mode --on'
    If the console prints Maintenance mode enabled, it worked.

removing richtextdocumentscode

  • su -m www-data -c 'php /var/www/html/occ app:remove richdocumentscode' will disable and remove the app from your nextcloud. Note the documentation for details and more app-commands.
  • su -m www-data -c 'php /var/www/html/occ maintenance:mode --off' will disable maintenance mode. It might take a few minutes for the nextcloud login to work again.