After upgrading to NC 30 I`m receiving error about the .ncdata

Hello Team,

I was running NC 29 and last week I have deleted the current container and recreated it again, this way the version 30 was downloaded. Everything was fine no errors during the data migration. Once the container was up and running I was able to access my NC server. But today I have received this error:

Error
Your data directory is invalid.

Ensure there is a file called “.ncdata” in the root of the data directory. It should have the content: “# Nextcloud data directory”

When I try to open the web interface, no changes are made after the upgrade. I have checked the permissions of the folders and everything looks fine:
The owner of the data and config folders is set via compose file with environment variables PUID and GUID. I have verified that the same user have the permissions.

What I`m missing?

Please post your Compose file.

version: "2.1"
services:
  nextcloud:
    image: lscr.io/linuxserver/nextcloud:latest
    container_name: nextcloud
    network_mode: lsio
    environment:
      - PUID=996
      - PGID=100
      - TZ=Europe/Sofia
    volumes:
      - /srv/dev-disk-by-uuid-6012a070-6359-4231-b4c0-90bd811e3fea/AppData/nextcloud:/config
      - /srv/dev-disk-by-uuid-bd2d3502-8cd5-45b5-b15b-e3012ac4ed69/Media2/nextcloudData:/data
    ports:
      - 553:443
    restart: unless-stopped

Is there an .ncdata file in /srv/dev-disk-by-uuid-bd2d3502-8cd5-45b5-b15b-e3012ac4ed69/Media2/nextcloudData:/data?

I have deleted the current container and recreated it again, this way the version 30 was downloaded.

You just mean doing docker compose pull && docker compose up -d or similar, correct?

Something similar is happening to me.

When this error pops up I have ro remove the containers and deploy the stack again…

Regards

Same here after 30.0.0 upgrade. Right after upgrade it worked but today in the morning it started to throw this error.
OCC commands won’t work either (same error). Tried to redeploy same image but it didn’t help.

was able to fix tha issue (temporarily I suppose) by downgrading to 29 and upgrading to 30 again

to fix the issue
we had to add .ncdata file with requested text to /var/www/data in the container
before we had only .ocdata file there