My users have been experiencing random loss of data in our Nextcloud setup. I will post the configurations below:
compose.yml
name: nextcloud-aio
services:
nextcloud-aio-mastercontainer:
image: ghcr.io/nextcloud-releases/all-in-one:latest
init: true
restart: always
network_mode: bridge
container_name: nextcloud-aio-mastercontainer
environment:
NEXTCLOUD_DATADIR: /mnt/ncdata/nextcloud
NEXTCLOUD_KEEP_DISABLED_APPS: "true"
APACHE_PORT: 11000
APACHE_IP_BINDING: 127.0.0.1
ports:
- "8080:8080"
- "8443:8443"
volumes:
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config
- /var/run/docker.sock:/var/run/docker.sock:ro
caddy:
image: caddy:2-alpine
container_name: caddy
restart: always
network_mode: host
volumes:
- /opt/caddy/Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
onlyoffice:
image: onlyoffice/documentserver:9.4
container_name: onlyoffice-9.4
restart: always
networks:
- nextcloud-aio
ports:
- "127.0.0.1:8081:80"
environment:
JWT_ENABLED: "true"
JWT_SECRET: ${ONLYOFFICE_JWT_SECRET}
JWT_IN_BODY: "true"
NODE_ENV: "production-linux"
NGINX_ACCESS_LOG: "true"
volumes:
- ./local-production-linux.json:/etc/onlyoffice/documentserver/local-production-linux.json:ro
- onlyoffice_data:/var/www/onlyoffice/Data
- onlyoffice_log:/var/log/onlyoffice
- onlyoffice_lib:/var/lib/onlyoffice
- onlyoffice_fonts:/usr/share/fonts/truetype/custom
networks:
nextcloud-aio:
name: nextcloud-aio
external: true
volumes:
nextcloud_aio_mastercontainer:
name: nextcloud_aio_mastercontainer
external: true
caddy_data:
name: caddy_data
external: true # already exists from your current setup
caddy_config:
name: caddy_config
external: true
onlyoffice_data:
name: onlyoffice_data # matches the volume you already created & filled
external: true
onlyoffice_log:
name: onlyoffice_log
external: true
onlyoffice_lib:
name: onlyoffice_lib
external: true
onlyoffice_fonts:
name: onlyoffice_fonts
external: true
local-production-linux.json
{
"services": {
"CoAuthoring": {
"autoAssembly": {
"enable": true,
"interval": "5m"
},
"token": {
"inbox": { "inBody": true },
"outbox": { "inBody": true }
},
"log": {
"level": "debug"
}
}
}
}
The local-production-linux.json was added as an attempt to prevent data loss, but we are still getting reports. Initially I assumed it was tied to documents being edited by many people at the same time, but yesterday I got a report from a user who lost data in a personal spreadsheet only edited by him. In this particular case I even looked at the docservice cache folder, but couldn’t find the version he lost.
We have force save enabled in the nextcloud connector as well. At this point, I am out of ideas. If anyone can help us with this, I will gladly share more information if needed.