Docker-Installation - default environment variable value

In the official nextcloud container image from docker hub ( Nextcloud - Official Image | Docker Hub) you can read in the section " Auto configuration via environment variables":

If you set any values, they will not be asked in the install page on first run.

Unfortunately this will not work in my environment. Any idea?

They do - i tested this multiple times (and everybody does).

Please double check you configure the variables right e.g. spelling, use docker inspect to see the variables are visible inside of the container, remove old container and start with the fresh one (most or all variables are only used when the container is created, not when they have been added later)

Thanks for your tips. But unfortunately it still does not work.
I stopped the containers, ran docker container prune, dropped all existing data directories, and even pulled fresh images.

My docker-compose.yml looks (in the nextcloud app section) like this:

     image: nextcloud
     container_name: nextcloud-app
     restart: unless-stopped
       - nextcloud-db
       - NEXTCLOUD_ADMIN_PASSWORD_FILE=/run/secrets/nextcloud_admin_password
       - NEXTCLOUD_ADMIN_USER_FILE=/run/secrets/nextcloud_admin_user
       - MYSQL_PASSWORD_FILE=/run/secrets/mysql_password
       - MYSQL_DATABASE_FILE=/run/secrets/mysql_db
       - MYSQL_USER_FILE=/run/secrets/mysql_user

With docker inspect I cannot find any of these environment variables in the container.

you docker-compose file looks right.

I’m wondering you don’t see this variables… do you see any other variables? you may try to inject other variables… maybe try the “common” variant with plain variables (without _FILE suffix) just to verify you can find and use the variables inside the container.

BTW: I would recommend you to use specific version of images e.g. nextcloud:23.2 to avoid “docker :latest tag” pitfall.

Actually, I double-checked that and also the _FILE environment variables are in the container. But nevertheless the parameters will not be shown in the first run UI.
When I bash into the container I can also see that the values are in the /run/secrets files.