nextcloud for Truenas Scale

RMAZOUZI

Explorer
Joined
Jan 15, 2023
Messages
54
Hello ,

according to you r experience Which is the best and more stable nextcloud ofr truenas scale "nextcloud truechart or nextcloud officiel" the reliability and stability is most important thing for us.
 

deralexmalex

Cadet
Joined
Apr 10, 2023
Messages
5
I can not answer your question in that way what you asked for.
I am new at trueNas. But I am running a small Nextcloud for a few years.

Actually all my home applikations are hosted on docker, which is installed on clean debian PCs.
In my opinion that is the most stable way to host and maintain services.

So to Nextcloud. I tested somthing with the original Nextcloud Docker Image and the Nextcloud Image of linuxserver.io.

For me the complete selfhostet Nextcloud Fromm linuxserver.io is that stable then the Original Nextcloud installs where never before. I use it with an simple MariaDB container, deployed with Docker compose/Portainer Stacks.

In my opinion, especially for Nextcloud Updates, it is that important to get the maximal controll about the process und have an easy ability to roll back if something went wrong. That heppend to me to often with Nextcloud.

If you want more Information i van post my docker-compose Code here.
 

RMAZOUZI

Explorer
Joined
Jan 15, 2023
Messages
54
This is very interesting I would like to implement nextcloud on production environment with basic features which can work for long time
 

deralexmalex

Cadet
Joined
Apr 10, 2023
Messages
5
Okay. How I sad, my Cloud is running in a really small home enviremoent. Nextcloud is really CPU performance-hungry. Especially, if you have much Pictures which have to render in realtime.
Sometimes it is usefull to have look to the Nextcloud-OCC-commands. Those commands safed my Nextcloud-Life. With OCC-Commands you can reinitalize your Data-Indexes, for example.


Here my docker-compose.yaml
version: "3"
services:
nextcloud:
image: linuxserver/nextcloud:25.0.4
container_name: nextcloud
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Berlin
volumes:
- /docker/nextcloud/nextcloud/appdata:/config
- /docker/nextcloud_data/data:/data # decentral datamount, to have the ability to backup the cloud-app-data seperatly from the uploaded userdata
ports:
- 8443:443
depends_on:
- mariadb
restart: unless-stopped
mariadb:
image: mariadb:10.5.12
container_name: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
environment:
- PUID=1000
- PGID=1000
- MYSQL_ROOT_PASSWORD=changeme
- MYSQL_PASSWORD=changeme
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- TZ=Europe/Berlin
volumes:
- /docker/nextcloud/mariadb/lib_mysql:/var/lib/mysql
restart: unless-stopped


In the first login screen after deployment you have to set some parameters special.

You have to set those data for the SQL conection depending what you choosed in the docker-compose.yaml
- MYSQL_PASSWORD=changeme
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud

And you have to change the Datapath from '/www/nextcloud/data' or something like that to '/data'. Because we set it in the docker-compose.yaml.


What I want to test in the next time is, mount an NFS share from truenas directly to my Proxmox debian-VM which i want run docker. But not on traditional way but directly with the docker compose file.


Sorry for my bad english. I hope you can follow my thougts.
 

deralexmalex

Cadet
Joined
Apr 10, 2023
Messages
5
Her the correct docker-compose. The Quote removed the in yaml really important tabs.

Code:
version: "3"
services:
 nextcloud:
   image: linuxserver/nextcloud:25.0.4
   container_name: nextcloud
   environment:
     - PUID=1000
     - PGID=1000
     - TZ=Europe/Berlin
   volumes:
     - /docker/nextcloud/nextcloud/appdata:/config
     - /docker/nextcloud_data/data:/data                   # decentral datamount, to have the ability to backup the cloud-app-data seperatly from the uploaded userdata
   ports:
     - 8443:443
   depends_on:
     - mariadb
   restart: unless-stopped
 mariadb:
   image: mariadb:10.5.12
   container_name: mariadb
   command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
   environment:
     - PUID=1000
     - PGID=1000
     - MYSQL_ROOT_PASSWORD=changeme
     - MYSQL_PASSWORD=changeme
     - MYSQL_DATABASE=nextcloud
     - MYSQL_USER=nextcloud
     - TZ=Europe/Berlin
   volumes:
     - /docker/nextcloud/mariadb/lib_mysql:/var/lib/mysql
   restart: unless-stopped
 
Last edited by a moderator:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Added code tags to show the appropriate indents/tabs.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
It should be noted that although docker compose may work on some versions of SCALE, it's not supported to do that and the ability to do so is likely to disappear when the container engine is changed away from docker at some point.
 

deralexmalex

Cadet
Joined
Apr 10, 2023
Messages
5
I don't know how powerfull the VM Hypervisor of truenas is and how good the performance with is. I am really new at that hypervisor-field and actually I am running Proxmox with Truenas Scale VM and LXC with Docker which i want siwtch to an VM wit Docker. But I think it should be possible to run docker with all its dependencies in a VM on truenas Scale right?
For me to use the embedded features of truenas apps, it feels like loosing controll. Even because I dont have any plan of kubernetis which seems to be running with that applications.

The information about the change from docker to an other technology is intresting. Are there planas of the truenas Developers to change the "Application"-technology on Scale?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I think it should be possible to run docker with all its dependencies in a VM on truenas Scale right?
True, yes... also this: https://www.truenas.com/community/t...cale-possible-alternatives.100109/post-735320
Are there planas of the truenas Developers to change the "Application"-technology on Scale?
As I understand it, there's no plan to change the Apps framework, which is based on K3s. Since that framework is not reliant on docker and I have also seen reference to a change of the container engine coming soon, I suspect that docker will soon disappear from the build, replaced by another container engine which will be a seamless shift for the apps (but not for anything running directly with docker compose on the host system).

You would be able to work around that with a VM, or with the "jail" type system mentioned in the link above.
 

LarsR

Guru
Joined
Oct 23, 2020
Messages
719
i think iX system is following an upstream change from the k3s project which switched from docker to containerd as container runtime
 

deralexmalex

Cadet
Joined
Apr 10, 2023
Messages
5
That are really intresting information for me.
That could be a reason why only the active ability to install apps, eats mor CPU and ram then a simple docker server wich allready provided a few services.

I think I should have a look at jails. That sounds interesting, too.

But back to roots of this thread.

I am thinking around too to change my nextcloud setup to Proxmox/Truenas Scale (running in Proxmox VM), too.

Which way would you guys prefer to run an stable Nextcloud with datastore on a truenas datapool which is easy to maintain. Important for me is a good possibility to backup the App and userdata separately, good DB performance (i think NFS is not a good deal for it. But for the userdata it should work fast enough) and an easy way to maintain and roll back, if an update is going wrong.
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
I'm probably different than most. I simply use the nextcloud docker, and extend it for my own purposes. I want mariadb for example, cron works, SSL works, and I use my own backup scripts that run within the container. I build it outside of truenas. I can leave it to be the same version for years if I wish, so, very stable. Just more setup work first time.
 

RMAZOUZI

Explorer
Joined
Jan 15, 2023
Messages
54
I'm probably different than most. I simply use the nextcloud docker, and extend it for my own purposes. I want mariadb for example, cron works, SSL works, and I use my own backup scripts that run within the container. I build it outside of truenas. I can leave it to be the same version for years if I wish, so, very stable. Just more setup work first time.
Can u please share with us the script of backup of nextcloud data and database
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
It's specific to my install, likely wouldn't do you much good. But I started with this just to save a little time: https://github.com/DecaTec/Nextcloud-Backup-Restore. That works with both mariadb and postgresql. I'm using Kopia to backup most of my hostpaths.
 

RMAZOUZI

Explorer
Joined
Jan 15, 2023
Messages
54
I would like to thank you for your share
Tell me please if I run rsync task to synchronize the main pool datastore which include daraset of nextcloud is that will be helpful to backup nextcloud data ?
 

sfatula

Guru
Joined
Jul 5, 2022
Messages
608
Top