Installing Nextcloud and MariaDB with Docker (can't create Nextcloud admin account) rights problem?

I’m trying to install Nextcloud and MariaDB on a Synology DS420+ with DSM 7 using Docker and can’t get any further. First, Nextcloud should only be accessible in the LAN and later via VPN. Apparently I succeeded in installing MariaDB, creating a database with users and installing Nextcloud - at least there were no error messages. The maridadb directory is also not empty and /docker/mariaDB/nextcloudDB/db.opt exists. But I can’t get past the create admin account screen of Nextcloud.

Error while trying to create admin user: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] No such file or directory

Could it be the permissions for /docker?

What should the ownership/rights of /docker be? In my case only members of administrtors have rw access.

I created the directories for MariaDB and Nextcloud sometimes via the Synology File Station and sometimes via the volume dialogue in Docker. The Nextcloud directories belong to user 33 and group root, the MariaDB directories to user 999 and group users. However, according to the control panel, neither user 33 nor 999 exist. Where do users 33 and 999 come from?

I would like to have a user only for Docker (and thus Nextcloud and MariaDB), how do I do that?
Does anyone know better/clearer instructions for installing Nextcloud (and MariaDB) with Docker?

I have no clue if it helps but there is basic docker-compose file you can start from at the official Nextcloud image on docker hub…

uid 33 is www-data from Nextcloud container, 999 might be some user from Maria DB container…

For me your problem sounds more like the two containers are not properly linked together - please double check if both belong to the same docker network and you provide the right hostname in NC setup (or even better use environment variables to setup in docker way).

Docker is not easy to start with - it helps to familiarize yourself with docker concepts of networking, storage and rights management for persistent volumes before you continue… Synology might have added some specials to regular docker as well (at least Qnap do…)