"Your data (...) are probably accessible from the internet" warning with 24-fpm

When upgrading my Nexcloud container from 23 to 24, I moved to an FPM version (I have Caddy as a proxy in front of Nextcloud).

Everything works fine, but I noticed (by accident) that I have the following warning in the summary of my installation (on the web nterface)

Your data directory and files are probably accessible from the internet. The .htaccess file is not working

I read that it is related to an .httpaccess file, but I do not use Apache anywhere. This error was not present before when I was using a non-FMP container.

  • is this a true warning (and therefore how to fix it?)
  • or something not to worry about (in which case it would be worthwhile not displaying it for FMP versions)

Where is your data directory located? If your nextcloud installation is in /var/www/nextcloud, the data directory should not be in that path. I have it in /var/lib/nextcloud.

I don’t know why this warning comes up with fpm. But it is general a good practice to keep the data directory outside the installation directory.

This is a docker installation, the data folder provided by the image is mounted for persistance (/etc/docker/data/nextcloud/var-www-html:/var/www/html)