Installing owncloud with dock-compose-file from doc: mariaDBserver not trusting docker-comp network

Steps to reproduce

  1. Follow the steps on how to install owncloud with docker-compose on the owncloud documentation on how to isntall owncloud on docker and use the command and the docker-compose.yml file in that guide.

  2. setup your .env file as in that guide: same OWNCLOUD_DOMAIN and OWNCLOUD_TRUSTED_DOMAINS

also tried OWNCLOUD_TRUSTED_DOMAINS = localhost,

why does that variable talk about domains when we’re providing host-IP’s anyway and how to do provide proper domains/network ip’s?

  1. do docker-compose up -d and after it started run command : “docker-compose logs --follow owncloud”

Expected behaviour

owncloud docker should run without problems and i should be able to connect to it on <LAN IPADDRESS of host running the docker-composer-containers on port set in .env: :8080 and start using and configuring my owncloud installation

Actual behaviour

server isn’t starting

I’m seeing a error that the provided docker-compose file doesn’t setup the mariaDB-srver correctly to allow traffic from the setup docker-network:

owncloud_server | Installing server database…
owncloud_server | Error while trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [1130] Host ‘’ is not allowed to connect to this MariaDB server
owncloud_server | →

Server configuration

Operating system:
arm32v7 or arm64v8 armbian ubuntu 20.04 (not sure which one) on a pine64+

Web server:
the one provide in docker-image 10.11

the one configured in the by owncloud provided docker-compose.yml file

PHP version:
the one used in the docker-container provider by owncloud

ownCloud version: (see ownCloud admin page)
the one used in ownclouds docker-container 10:11

Updated from an older ownCloud or fresh install:
fresh install

Where did you install ownCloud from:
throuh docker with docker-compose file provided by owncloud in the documentation from owncloud’s site.

Signing status (ownCloud 9.0 and above):
how to sign into a server that can’t even start correctly?

The content of config/config.php:

as provided in the docker-container version 10:11 as used through the docker-compose.yml file provided by your own documentation 

-- i can't post the link to your own website or your own github 'cause you don't allow links -- 

List of activated apps:

none installed as it's fresh install from guide in documentation

Are you using external storage, if yes which one: local/smb/sftp/…

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/…

Client configuration

who cares: server isn’t even starting

Operating system:
who cares: server isn’t even starting


ownCloud log (data/owncloud.log)

owncloud_server | Error while trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [1130] Host '' is not allowed to connect to this MariaDB server
owncloud_server |  ->

tl;dr: 3 questions:

  • why is the provided docker-compose.yml file in the documentation about installing on docker not working?
  • can a working version be provided and the documentation be adjusted for it?
  • how do i get fix it to get it running with docker-compose?

OWNCLOUD_DOMAIN and OWNCLOUD_TRUSTED_DOMAIN is unrelated to any DB issue. It’s talking about domains because in real-world deployments a proper domain would be used instead e.g. For setups without a Domain (e.g. test environments) IP addresses are working as well.

Besides that, I’m not able to reproduce the issue with the official guide from Installing with Docker :: ownCloud Documentation. Is this the one you used?

❯ wget
--2022-10-31 09:12:27--
Auflösen des Hostnamens (…,,, ...
Verbindungsaufbau zu (||:443 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 200 OK
Länge: 1781 (1,7K) [text/plain]
Wird in »docker-compose.yml« gespeichert.

docker-compose.yml                                              100%[=====================================================================================================================================================>]   1,74K  --.-KB/s    in 0s      

2022-10-31 09:12:27 (18,0 MB/s) - »docker-compose.yml« gespeichert [1781/1781]

user@localhost ~/.tmp 
❯ cat << EOF > .env
user@localhost ~/.tmp 
❯ docker-compose up -d
Creating network "tmp_default" with the default driver
Creating volume "tmp_files" with local driver
Creating volume "tmp_mysql" with local driver
Creating volume "tmp_redis" with local driver
Creating owncloud_mariadb ... done
Creating owncloud_redis   ... done
Creating owncloud_server  ... done
user@localhost ~/.tmp 
❯ docker ps
CONTAINER ID   IMAGE                   COMMAND                  CREATED         STATUS                            PORTS                                       NAMES
0e866a029656   owncloud/server:10.11   "/usr/bin/entrypoint…"   3 seconds ago   Up 2 seconds (health: starting)>8080/tcp, :::8080->8080/tcp   owncloud_server
8f6a942c1c8d   mariadb:10.6            "docker-entrypoint.s…"   4 seconds ago   Up 3 seconds (health: starting)   3306/tcp                                    owncloud_mariadb
e8458293947d   redis:6                 "docker-entrypoint.s…"   4 seconds ago   Up 3 seconds (health: starting)   6379/tcp                                    owncloud_redis
user@localhost ~/.tmp 
❯ docker logs owncloud_server -f
Creating volume folders...
Creating hook folders...
Waiting for MySQL...
services are ready!
Waiting for Redis...
services are ready!
Removing custom folder...
Linking custom folder...
Removing config folder...
Linking config folder...
Writing config file...
Fixing base perms...
Fixing data perms...
Fixing hook perms...
Installing server database...
ownCloud was successfully installed
ownCloud is already latest version
Writing objectstore config...
Writing php config...
Updating htaccess config...
.htaccess has been updated
Writing apache config...
Enabling cron background...
Set mode for background jobs to 'cron'
Writing crontab file...
Touching cron configs...
Starting cron daemon...
Starting apache daemon...
[Mon Oct 31 08:12:59.102707 2022] [mpm_prefork:notice] [pid 192] AH00163: Apache/2.4.41 (Ubuntu) configured -- resuming normal operations
[Mon Oct 31 08:12:59.102735 2022] [core:notice] [pid 192] AH00094: Command line: '/usr/sbin/apache2 -f /etc/apache2/apache2.conf -D FOREGROUND'

Please stop the compose stack with docker-compose down and provide the complete output of docker-compose up --remove-orphans -d.

Please also provide the output from docker logs owncloud_mariadb.

yes that’s the one (as it’s the only one on your site about running owncloud with docker)

I’m installing it on ARM64v8 hardware with armbian ubuntu v20 or v22 as OS
all containers are avail for that architecture.
docker, docker-compose and libseccomp2 were also updated to latest version.
everything was stopped correctly and started multiple times and each time it gave the same problem.

I tried again but removed the mysql-volume first (after docker-compose down and before docker-compose up) and somehow for whatever reason now everything starts like it should have the first time.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.