Trouble with installing Nextcloud with docker compose and storing all data on TrueNAS Scale NAS

Joined
May 5, 2023
Messages
1
Hi,
for the past few days I’ve been trying to get the following setup to work:
Nextcloud installation in docker on a server.
Store all of Nextclouds data in a different server running TrueNAS Scale.

The problem:
Everytime I try to deploy the Nextcloud stack I get an error message. Here is the full message:
Failure
failed to deploy a stack: Network nextcloud_default Creating Network nextcloud_default Created Volume “nextcloud_database” Creating Volume “nextcloud_database” Created Volume “nextcloud_data” Creating Volume “nextcloud_data” Created Container nextcloud-db-1 Creating Error response from daemon: failed to chmod on /mnt/dietpi_userdata/docker-data/volumes/nextcloud_database/_data: chmod /mnt/dietpi_userdata/docker-data/volumes/nextcloud_database/_data: operation not permitted

Here is the docker compose file I am using:
Code:
version: '2'

volumes:
database:
driver: local
driver_opts:
type: "nfs"
o: "addr=192.168.2.190,rw,noatime,tcp,timeo=20,nfsvers=4"
device: ":/mnt/main/nextcloud/database"
data:
driver: local
driver_opts:
type: "nfs"
o: "addr=192.168.2.190,rw,noatime,rsize=8192,wsize=8192,tcp,timeo=20,nfsvers=4"
device: ":/mnt/main/nextcloud/data"

services:
db:
image: mariadb:10.6
restart: always
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
volumes:
- database:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud

app:
image: nextcloud
restart: always
ports:
- 8001:80
links:
- db
volumes:
- data:/var/www/html
environment:
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_HOST=db


My TrueNAS Scale Setup:
Main Dataset:
/mnt/main/nextcloud
Permissions:
Owner / Group: root
All permissions are granted except for write permissions for group and other

Nextcloud Data (/mnt/main/nextcloud/data) and Database (/mnt/main/nextcloud/database) Dataset settings:
Owner / Group: root
All permissions are granted to everyone
ACL Type: SMB/NFSv4
ACL Mode: Passthrough

NFS Settings:
Enable NFSv4: On
NFSv3 ownership model for NFSv4: Off
Everything else if off / empty
I tried to create / delete files in my data and dataset shares with a seperate container and it worked. However Nextcloud seems to have a problem with permissions and I am not able to find a solution.
 
Top