Docker Swarm with traefik fpm mariadb redis cron

Hi,

I’m trying to get nextcloud running with Docker Swarm with traefik as main proxy and a nextcloud compose with the fpm version, mariadb, redis, cron and nginx as fpm proxy. I succeded to get it up and running.

But there is a problem. I can install apps but they won’t load and the picture in the navigation is also not loaded.

Navigationbar:
image

traefik compose:

version: '3.8'

volumes:
  certificates:

services:
  proxy:
    image: traefik
    ports:
      - 80:80
      - 443:443
    volumes:
      # Traefik can read the labels of other services
      - /var/run/docker.sock:/var/run/docker.sock:ro
      # Store the certificates
      - certificates:/certificates
    deploy:
      update_config:
        # Rollback if update of service fails
        failure_action: rollback
    command:
      # Enable Docker in Traefik, so that it reads labels from Docker services
      - --providers.docker=true
      # Enable Docker Swarm mode
      - --providers.docker.swarmMode=true
      # Only explicitly expose services with `traefik.enable=true`
      - --providers.docker.exposedbydefault=false
      # Set the default network for all exposed services
      - --providers.docker.network=traefik_default
      # Set entrypoints
      - --entrypoints.web.address=:80
      - --entrypoints.websecure.address=:443
      # Enable permanent HTTPS redirection
      - --entrypoints.web.http.redirections.entryPoint.to=websecure
      - --entrypoints.web.http.redirections.entryPoint.scheme=https
      - --entrypoints.web.http.redirections.entrypoint.permanent=true
      # Configure public certificates
      - --entrypoints.websecure.http.tls.certResolver=letsencrypt
      - --certificatesresolvers.letsencrypt.acme.email=service@domain.net
      - --certificatesresolvers.letsencrypt.acme.storage=/certificates/acme.json
      - --certificatesresolvers.letsencrypt.acme.tlschallenge=true
      # Enable logs
      - --accesslog
      - --log
  whoami:
    image: "traefik/whoami"
    deploy:
      labels:
        - "traefik.enable=true"
        - "traefik.http.routers.whoami.rule=Host(`whoami.domain.net`)"
        - "traefik.http.routers.whoami.entrypoints=websecure"
        - "traefik.http.routers.whoami.tls=true"
        - "traefik.http.routers.whoami.tls.certresolver=letsencrypt"
        - "traefik.http.services.whoami.loadbalancer.server.port=80"

nextcloud compose:

version: "3.8"

networks:
  traefik_default:
    external: true
  default:

volumes:
  server-data: # Main web server folder
  custom_apps: # Installed apps
  config: # Nextcloud configuration
  user-data: # User data
  themes: #  Branding
  db-mysql: # SQL database
  cache-data: #  Redis cache data

services:
  # fpm proxy
  proxy:
    image: nginx:alpine
    volumes:
      - server-data:/var/www/html:ro
      - ./nginx.conf:/etc/nginx/nginx.conf
    depends_on:
      - app
    networks:
      - default
      - traefik_default
    deploy:
      labels:
        - traefik.enable=true
        - traefik.http.services.nextcloud.loadbalancer.server.port=80
        - traefik.http.routers.nextcloud.rule=Host(`cloud.domain.net`)
        - traefik.http.routers.nextcloud.entrypoints=websecure
        - traefik.http.routers.nextcloud.tls=true
        - traefik.http.routers.nextcloud.tls.certresolver=letsencrypt
        - traefik.http.routers.nextcloud.middlewares=nextcloud-proxy,nextcloud-dav
        # Middlewares
        # https://help.nextcloud.com/t/hsts-and-dav-with-docker-and-traefik/79650
        #- traefik.http.middlewares.nextcloud-header.headers.stsSeconds=15552001
        #- traefik.http.middlewares.nextcloud-proxy.headers.customRequestHeaders.X-Forwarded-Proto=https
        ## Proxy
        ## https://github.com/azonictechnophile/nextcloud_on_docker/blob/4255c29e58f485ae1bad7f0ade61bb99b09e8c21/roles/docker_container/tasks/nginx.yml#L46
        - traefik.http.middlewares.nextcloud-proxy.headers.referrerPolicy=no-referrer
        - traefik.http.middlewares.nextcloud-proxy.headers.SSLRedirect=true
        - traefik.http.middlewares.nextcloud-proxy.headers.STSSeconds=315360000
        - traefik.http.middlewares.nextcloud-proxy.headers.browserXSSFilter=true
        - traefik.http.middlewares.nextcloud-proxy.headers.contentTypeNosniff=true
        - traefik.http.middlewares.nextcloud-proxy.headers.forceSTSHeader=true
        - traefik.http.middlewares.nextcloud-proxy.headers.STSIncludeSubdomains=true
        - traefik.http.middlewares.nextcloud-proxy.headers.STSPreload=true
        - traefik.http.middlewares.nextcloud-proxy.headers.customFrameOptionsValue=SAMEORIGIN
        ## CalDAV/CardDAV
        ## https://docs.nextcloud.com/server/15/admin_manual/configuration_server/reverse_proxy_configuration.html#traefik
        - traefik.http.middlewares.nextcloud-dav.redirectRegex.regex=https://(.*)/.well-known/(card|cal)dav
        - traefik.http.middlewares.nextcloud-dav.redirectRegex.replacement=https://$${1}/remote.php/dav/
        - traefik.http.middlewares.nextcloud-dav.redirectRegex.permanent=true
  # Database
  db:
    image: mariadb
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    volumes:
      - db-mysql:/var/lib/mysql
    networks:
      - default
    environment:
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_PASSWORD=nextcloud
      - MYSQL_ROOT_PASSWORD=nextcloud
  # Data cache
  cache:
    image: redis:alpine
    networks:
      - default
    command: redis-server --requirepass nextcloud
    volumes:
      - cache-data:/data
  cron:
    image: nextcloud:production-fpm-alpine
    volumes:
      - server-data:/var/www/html
    entrypoint: /cron.sh
    depends_on:
      - db
      - cache
  # Nextcloud
  app:
    image: nextcloud:production-fpm-alpine
    networks:
      - default
    volumes:
      - server-data:/var/www/html 
      - custom_apps:/var/www/html/custom_apps 
      - config:/var/www/html/config 
      - user-data:/var/www/html/data 
      - themes:/var/www/html/themes/ 
    depends_on:
      - db
      - cache
    environment:
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_PASSWORD=nextcloud
      - MYSQL_HOST=nextcloud_db
      - MYSQL_PORT=3306
      - NEXTCLOUD_ADMIN_USER=admin
      - NEXTCLOUD_ADMIN_PASSWORD=nextcloud
      - TRUSTED_PROXIES=nextcloud_proxy
      - REDIS_HOST=nextcloud_cache
      - REDIS_HOST_PASSWORD=nextcloud
      - REDIS_PORT=6379
      - NEXTCLOUD_TRUSTED_DOMAINS=cloud.domain.net
      - OVERWRITEPROTOCOL=https

nginx.conf:

worker_processes auto;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    set_real_ip_from  10.0.0.0/8;
    set_real_ip_from  172.16.0.0/12;
    set_real_ip_from  192.168.0.0/16;
    real_ip_header    X-Real-IP;

    #gzip  on;

    upstream php-handler {
        server nextcloud_app:9000;
    }

    # https://github.com/azonictechnophile/nextcloud_on_docker/blob/4255c29e58f485ae1bad7f0ade61bb99b09e8c21/roles/docker_container/templates/nginx.conf.j2
    # Loesung fpr Forward https ?
    #map $http_host $this_host {
    #    "" $host;
    #    default $http_host;
    #}
    #map $http_x_forwarded_proto $the_scheme {
    #    default $http_x_forwarded_proto;
    #    "" $scheme;
    #}
    #map $http_x_forwarded_host $the_host {
    #   default $http_x_forwarded_host;
    #   "" $this_host;
    #}

    server {
        listen 80;

        # Add headers to serve security related headers
        # Before enabling Strict-Transport-Security headers please read into this
        # topic first.
        #add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
        #
        # WARNING: Only add the preload option once you read about
        # the consequences in https://hstspreload.org/. This option
        # will add the domain to a hardcoded list that is shipped
        # in all major browsers and getting removed from this list
        # could take several months.
        add_header Referrer-Policy "no-referrer" always;
        add_header X-Content-Type-Options "nosniff" always;
        add_header X-Download-Options "noopen" always;
        add_header X-Frame-Options "SAMEORIGIN" always;
        add_header X-Permitted-Cross-Domain-Policies "none" always;
        add_header X-Robots-Tag "none" always;
        add_header X-XSS-Protection "1; mode=block" always;

        # Remove X-Powered-By, which is an information leak
        fastcgi_hide_header X-Powered-By;

        # Path to the root of your installation
        root /var/www/html;

        location = /robots.txt {
            allow all;
            log_not_found off;
            access_log off;
        }

        # The following 2 rules are only needed for the user_webfinger app.
        # Uncomment it if you're planning to use this app.
        #rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
        #rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last;

        # The following rule is only needed for the Social app.
        # Uncomment it if you're planning to use this app.
        #rewrite ^/.well-known/webfinger /public.php?service=webfinger last;

        location = /.well-known/carddav {
            return 301 $scheme://$host:$server_port/remote.php/dav;
        }

        location = /.well-known/caldav {
            return 301 $scheme://$host:$server_port/remote.php/dav;
        }

        # set max upload size
        client_max_body_size 10G;
        fastcgi_buffers 64 4K;

        # Enable gzip but do not remove ETag headers
        gzip on;
        gzip_vary on;
        gzip_comp_level 4;
        gzip_min_length 256;
        gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
        gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;

        # Uncomment if your server is build with the ngx_pagespeed module
        # This module is currently not supported.
        #pagespeed off;

        location / {
            rewrite ^ /index.php;
        }

        location ~ ^\/(?:build|tests|config|lib|3rdparty|templates|data)\/ {
            deny all;
        }
        location ~ ^\/(?:\.|autotest|occ|issue|indie|db_|console) {
            deny all;
        }

        location ~ ^\/(?:index|remote|public|cron|core\/ajax\/update|status|ocs\/v[12]|updater\/.+|oc[ms]-provider\/.+)\.php(?:$|\/) {
            fastcgi_split_path_info ^(.+?\.php)(\/.*|)$;
            set $path_info $fastcgi_path_info;
            try_files $fastcgi_script_name =404;
            include fastcgi_params;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param PATH_INFO $path_info;
            # fastcgi_param HTTPS on;

            # Avoid sending the security headers twice
            fastcgi_param modHeadersAvailable true;

            # Enable pretty urls
            fastcgi_param front_controller_active true;
            fastcgi_pass php-handler;
            fastcgi_intercept_errors on;
            fastcgi_request_buffering off;
        }

        location ~ ^\/(?:updater|oc[ms]-provider)(?:$|\/) {
            try_files $uri/ =404;
            index index.php;
        }

        # Adding the cache control header for js, css and map files
        # Make sure it is BELOW the PHP block
        location ~ \.(?:css|js|woff2?|svg|gif|map)$ {
            try_files $uri /index.php$request_uri;
            add_header Cache-Control "public, max-age=15778463";
            # Add headers to serve security related headers (It is intended to
            # have those duplicated to the ones above)
            # Before enabling Strict-Transport-Security headers please read into
            # this topic first.
            #add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always;
            #
            # WARNING: Only add the preload option once you read about
            # the consequences in https://hstspreload.org/. This option
            # will add the domain to a hardcoded list that is shipped
            # in all major browsers and getting removed from this list
            # could take several months.
            add_header Referrer-Policy "no-referrer" always;
            add_header X-Content-Type-Options "nosniff" always;
            add_header X-Download-Options "noopen" always;
            add_header X-Frame-Options "SAMEORIGIN" always;
            add_header X-Permitted-Cross-Domain-Policies "none" always;
            add_header X-Robots-Tag "none" always;
            add_header X-XSS-Protection "1; mode=block" always;

            # Optional: Don't log access to assets
            access_log off;
        }

        location ~ \.(?:png|html|ttf|ico|jpg|jpeg|bcmap)$ {
            try_files $uri /index.php$request_uri;
            # Optional: Don't log access to other assets
            access_log off;
        }
    }
}

i don’t know docker swarm. but i think the nginx and the fpm container don’t use the same volumes. or? sure that the custom_apps volume from app: is available to the nginx container?

i use a volumes_from in my setup.

@Reiner_Nippes Thanks a lot :slight_smile:. It’s working now.

  proxy:
    image: nginx:alpine
    volumes:
      - server-data:/var/www/html:ro
      - custom_apps:/var/www/html/custom_apps:ro
      - config:/var/www/html/config:ro
      - user-data:/var/www/html/data:ro
      - themes:/var/www/html/themes:ro

For anybody who maybe using my snippets above. Better comment these lines

#- traefik.http.middlewares.nextcloud-proxy.headers.STSSeconds=315360000
#- traefik.http.middlewares.nextcloud-proxy.headers.forceSTSHeader=true
#- traefik.http.middlewares.nextcloud-proxy.headers.STSIncludeSubdomains=true
#- traefik.http.middlewares.nextcloud-proxy.headers.STSPreload=true

and enable it when everything is working (https://docs.nextcloud.com/server/latest/admin_manual/installation/harden_server.html#enable-http-strict-transport-security).

Well. It worked only on first sight. Nextcloud is reachable with the proxy configuration but now there is a strange problem with my database. Nextcloud can’t connect to it. Although it is reachable from nextcloud app container.

version: "3.8"

networks:
  traefik_default:
    external: true
  default:
    internal: true

volumes:
  webserver: # Main web server folder
  custom_apps: # Installed apps
  config: # Nextcloud configuration
  data: # User data
  themes: #  Branding
  db: # SQL database
  cache: #  Redis cache data

# Defined as an external resources, which means that it has already been defined in Docker,
# either by running the docker secret create command or by another stack deployment. If the
# external secret does not exist, the stack deployment fails with a secret not found error.
# https://docs.docker.com/compose/compose-file/#configs
# e.g.: openssl rand -base64 20 | docker secret create db_root_password -
secrets:
  nextcloud_db_password:
    external: true
  db_root_password:
    external: true
  nextcloud_admin_password:
    external: true

services:
  # Database
  db:
    # Microsoft is using version 10.3 for Azure. Seems like a valid "lts" version.
    # https://docs.microsoft.com/en-us/azure/mariadb/concepts-supported-versions#mariadb-version-103
    # Minimum is Version 10.2 https://docs.nextcloud.com/server/latest/admin_manual/installation/system_requirements.html
    # Since Version 10.3 Emoji Support
    # set to use the Barracuda InnoDB file format (this is only needed on MySQL 5.x and MariaDB < 10.3):
    image: mariadb:10.3
    command:
      - "--transaction-isolation=READ-COMMITTED"
      - "--binlog-format=ROW"
      # Enable emojis in filenames (https://github.com/docker-library/mariadb/issues/235#issuecomment-478657847)
      - "--character-set-server=utf8mb4"
      - "--collation-server=utf8mb4_unicode_ci"
    volumes:
      - db:/var/lib/mysql
    networks:
      - default
    secrets:
      - db_root_password
      - nextcloud_db_password
    environment:
      - MYSQL_HOST=nextcloud_db
      - MYSQL_ROOT_PASSWORD=nextcloud
      #- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/db_root_password
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_PASSWORD=nextcloud
      #- MYSQL_PASSWORD_FILE=/run/secrets/nextcloud_db_password
    deploy:
      update_config:
        parallelism: 1
        max_failure_ratio: 0
        failure_action: rollback
  # Data cache
  cache:
    # Use of Redis is recommended to prevent file locking problems
    # https://hub.docker.com/_/nextcloud
    image: redis:alpine
    networks:
      - default
    #command: redis-server --requirepass ${SECRET}
    volumes:
      - cache:/data
    deploy:
      update_config:
        parallelism: 1
        max_failure_ratio: 0
        failure_action: rollback
  # Cron
  # https://docs.nextcloud.com/server/15/admin_manual/configuration_server/background_jobs_configuration.html#cron
  cron:
    image: nextcloud:production-fpm-alpine
    volumes:
      - webserver:/var/www/html
      - custom_apps:/var/www/html/custom_apps
      - config:/var/www/html/config
      - data:/var/www/html/data
      #- data:/data
      - themes:/var/www/html/themes
      # Change cron jobs
      # https://help.nextcloud.com/t/docker-setup-cron/78547/6
      #- ./cron.sh:/cron.sh:ro
    entrypoint: /cron.sh
    depends_on:
      - db
      - cache
    networks:
      - default
    deploy:
      update_config:
        parallelism: 1
        max_failure_ratio: 0
        failure_action: rollback
  # Nextcloud
  app:
    image: nextcloud:production-fpm-alpine
    networks:
      - default
    volumes:
      - webserver:/var/www/html
      - custom_apps:/var/www/html/custom_apps
      - config:/var/www/html/config
      - data:/var/www/html/data
      #- data:/data
      - themes:/var/www/html/themes
    depends_on:
      - db
      - cache
      - cron
    secrets:
      - nextcloud_admin_password
      - nextcloud_db_password
    environment:
      # https://github.com/docker/compose/issues/3270#issuecomment-543603959
      #- NEXTCLOUD_DATA_DIR=/data
      - NEXTCLOUD_ADMIN_USER=nextcloud
      - NEXTCLOUD_ADMIN_PASSWORD=nextcloud
      #- "NEXTCLOUD_ADMIN_PASSWORD_FILE=/run/secrets/nextcloud_admin_password"
      - TRUSTED_PROXIES=traefik_proxy
      - NEXTCLOUD_TRUSTED_DOMAINS=cloud.domain.net
      - OVERWRITEPROTOCOL=https
      # Database and cache configuration
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_PASSWORD=nextcloud
      #- "MYSQL_PASSWORD_FILE=/run/secrets/nextcloud_db_password"
      - MYSQL_HOST=nextcloud_db
      #- MYSQL_PORT=3306
      - REDIS_HOST=nextcloud_cache
      #- REDIS_HOST_PASSWORD=${SECRET}
      #- REDIS_PORT=6379
      #- SMTP_HOST=cloud.mail.net
      #- SMTP_SECURE=ssl
      #- SMTP_PORT=465
      #- SMTP_AUTHTYPE=plain
      #- SMTP_NAME=service@cloud.mail.net
      #- SMTP_PASSWORD=
      #- MAIL_FROM_ADDRESS=noreply@cloud.mail.net
      #- MAIL_DOMAIN (not set by default) Set a different domain for the emails than the domain where Nextcloud is installed.
    deploy:
      update_config:
        parallelism: 1
        max_failure_ratio: 0
        failure_action: rollback
  # fpm proxy
  fpm:
    image: nginx:alpine
    volumes:
      - webserver:/var/www/html:ro
      - custom_apps:/var/www/html/custom_apps:ro
      - config:/var/www/html/config:ro
      - data:/var/www/html/data:ro
      #- data:/data:ro
      - themes:/var/www/html/themes:ro
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
    depends_on:
      - app
    networks:
      - default
      - traefik_default
    deploy:
      update_config:
        parallelism: 1
        max_failure_ratio: 0
        failure_action: rollback
      labels:
        - traefik.enable=true
        - traefik.http.services.nextcloud.loadbalancer.server.port=80
        - traefik.http.routers.nextcloud.rule=Host(`cloud.domain.net`)
        - traefik.http.routers.nextcloud.entrypoints=websecure
        - traefik.http.routers.nextcloud.tls=true
        - traefik.http.routers.nextcloud.tls.certresolver=letsencrypt
        - traefik.http.routers.nextcloud.middlewares=nextcloud-fpm,nextcloud-dav
        # Middlewares
        ## Proxy
        ## https://github.com/azonictechnophile/nextcloud_on_docker/blob/4255c29e58f485ae1bad7f0ade61bb99b09e8c21/roles/docker_container/tasks/nginx.yml#L46
        - traefik.http.middlewares.nextcloud-fpm.headers.referrerPolicy=no-referrer
        - traefik.http.middlewares.nextcloud-fpm.headers.SSLRedirect=true
        #- traefik.http.middlewares.nextcloud-fpm.headers.STSSeconds=15552001
        #- traefik.http.middlewares.nextcloud-fpm.headers.STSSeconds=315360000
        - traefik.http.middlewares.nextcloud-fpm.headers.browserXSSFilter=true
        - traefik.http.middlewares.nextcloud-fpm.headers.contentTypeNosniff=true
        #- traefik.http.middlewares.nextcloud-fpm.headers.forceSTSHeader=true
        #- traefik.http.middlewares.nextcloud-fpm.headers.STSIncludeSubdomains=true
        #- traefik.http.middlewares.nextcloud-fpm.headers.STSPreload=true
        - traefik.http.middlewares.nextcloud-fpm.headers.customFrameOptionsValue=SAMEORIGIN
        #- traefik.http.middlewares.nextcloud-fpm.headers.customRequestHeaders.X-Forwarded-Proto=https
        ## CalDAV/CardDAV
        ## https://docs.nextcloud.com/server/15/admin_manual/configuration_server/reverse_proxy_configuration.html#traefik
        - traefik.http.middlewares.nextcloud-dav.redirectRegex.regex=https://(.*)/.well-known/(card|cal)dav
        - traefik.http.middlewares.nextcloud-dav.redirectRegex.replacement=https://$${1}/remote.php/dav/
        - traefik.http.middlewares.nextcloud-dav.redirectRegex.permanent=true

Somehow the installation continues although there is no connection established (see db logs). When I log in it’s quite slow and the introduction video is not playing. Further clicking on Apps to install some is taking super long to load and then only some apps are available.

Logs of nextcloud_app:

Configuring Redis as session handler
Initializing nextcloud 19.0.4.2 ...
Initializing finished
New nextcloud instance
Installing with MySQL database
starting nextcloud installation
Error while trying to create admin user: Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Try again
 -> 
retrying install...
Nextcloud was successfully installed
setting trusted domains…
System config value trusted_domains => 1 set to string cloud.domain.net
[19-Nov-2020 20:35:37] NOTICE: fpm is running, pid 1
[19-Nov-2020 20:35:37] NOTICE: ready to handle connections

The logs of the database is showing that no root password is set. The binlog-format needs another option? The nextcloud manual mentions only the paramter I’ve already set. So I wonder why is it not working?

Logs of nextcloud_db:

2020-11-19 20:35:13+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.3.27+maria~focal started.
2020-11-19 20:35:14+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-11-19 20:35:14+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.3.27+maria~focal started.
2020-11-19 20:35:14+00:00 [Note] [Entrypoint]: Initializing database files
2020-11-19 20:35:14 0 [Warning] You need to use --log-bin to make --binlog-format work.


PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:

'/usr/bin/mysqladmin' -u root password 'new-password'
'/usr/bin/mysqladmin' -u root -h  password 'new-password'

Alternatively you can run:
'/usr/bin/mysql_secure_installation'

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the MariaDB Knowledgebase at http://mariadb.com/kb or the
MySQL manual for more instructions.

Please report any problems at http://mariadb.org/jira

The latest information about MariaDB is available at http://mariadb.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Consider joining MariaDB's strong and vibrant community:
https://mariadb.org/get-involved/

2020-11-19 20:35:16+00:00 [Note] [Entrypoint]: Database files initialized
2020-11-19 20:35:16+00:00 [Note] [Entrypoint]: Starting temporary server
2020-11-19 20:35:16+00:00 [Note] [Entrypoint]: Waiting for server startup
2020-11-19 20:35:16 0 [Note] mysqld (mysqld 10.3.27-MariaDB-1:10.3.27+maria~focal) starting as process 119 ...
2020-11-19 20:35:16 0 [Warning] You need to use --log-bin to make --binlog-format work.
2020-11-19 20:35:16 0 [Note] InnoDB: Using Linux native AIO
2020-11-19 20:35:16 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-11-19 20:35:16 0 [Note] InnoDB: Uses event mutexes
2020-11-19 20:35:16 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-11-19 20:35:16 0 [Note] InnoDB: Number of pools: 1
2020-11-19 20:35:16 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-11-19 20:35:16 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
2020-11-19 20:35:16 0 [Note] InnoDB: Completed initialization of buffer pool
2020-11-19 20:35:16 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-11-19 20:35:16 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-11-19 20:35:16 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-11-19 20:35:16 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-11-19 20:35:16 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-11-19 20:35:16 0 [Note] InnoDB: Waiting for purge to start
2020-11-19 20:35:16 0 [Note] InnoDB: 10.3.27 started; log sequence number 1625443; transaction id 20
2020-11-19 20:35:16 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2020-11-19 20:35:16 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-11-19 20:35:16 0 [Note] InnoDB: Buffer pool(s) load completed at 201119 20:35:16
2020-11-19 20:35:16 0 [Warning] 'user' entry 'root@41956b51d057' ignored in --skip-name-resolve mode.
2020-11-19 20:35:16 0 [Warning] 'proxies_priv' entry '@% root@41956b51d057' ignored in --skip-name-resolve mode.
2020-11-19 20:35:16 0 [Note] Reading of all Master_info entries succeeded
2020-11-19 20:35:16 0 [Note] Added new Master_info '' to hash table
2020-11-19 20:35:16 0 [Note] mysqld: ready for connections.
Version: '10.3.27-MariaDB-1:10.3.27+maria~focal'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  mariadb.org binary distribution
2020-11-19 20:35:17+00:00 [Note] [Entrypoint]: Temporary server started.
Warning: Unable to load '/usr/share/zoneinfo/leap-seconds.list' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
2020-11-19 20:35:18 10 [Warning] 'proxies_priv' entry '@% root@41956b51d057' ignored in --skip-name-resolve mode.
2020-11-19 20:35:18+00:00 [Note] [Entrypoint]: Creating database nextcloud
2020-11-19 20:35:18+00:00 [Note] [Entrypoint]: Creating user nextcloud
2020-11-19 20:35:18+00:00 [Note] [Entrypoint]: Giving user nextcloud access to schema nextcloud

2020-11-19 20:35:18+00:00 [Note] [Entrypoint]: Stopping temporary server
2020-11-19 20:35:18 0 [Note] mysqld (initiated by: root[root] @ localhost []): Normal shutdown
2020-11-19 20:35:18 0 [Note] Event Scheduler: Purging the queue. 0 events
2020-11-19 20:35:18 0 [Note] InnoDB: FTS optimize thread exiting.
2020-11-19 20:35:18 0 [Note] InnoDB: Starting shutdown...
2020-11-19 20:35:18 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2020-11-19 20:35:18 0 [Note] InnoDB: Buffer pool(s) dump completed at 201119 20:35:18
2020-11-19 20:35:19 0 [Note] InnoDB: Shutdown completed; log sequence number 1625452; transaction id 21
2020-11-19 20:35:19 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2020-11-19 20:35:19 0 [Note] mysqld: Shutdown complete

2020-11-19 20:35:20+00:00 [Note] [Entrypoint]: Temporary server stopped

2020-11-19 20:35:20+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.

2020-11-19 20:35:20 0 [Note] mysqld (mysqld 10.3.27-MariaDB-1:10.3.27+maria~focal) starting as process 1 ...
2020-11-19 20:35:20 0 [Warning] You need to use --log-bin to make --binlog-format work.
2020-11-19 20:35:20 0 [Note] InnoDB: Using Linux native AIO
2020-11-19 20:35:20 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-11-19 20:35:20 0 [Note] InnoDB: Uses event mutexes
2020-11-19 20:35:20 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-11-19 20:35:20 0 [Note] InnoDB: Number of pools: 1
2020-11-19 20:35:20 0 [Note] InnoDB: Using SSE2 crc32 instructions
2020-11-19 20:35:20 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
2020-11-19 20:35:20 0 [Note] InnoDB: Completed initialization of buffer pool
2020-11-19 20:35:20 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-11-19 20:35:20 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2020-11-19 20:35:20 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-11-19 20:35:20 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-11-19 20:35:20 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-11-19 20:35:20 0 [Note] InnoDB: 10.3.27 started; log sequence number 1625452; transaction id 20
2020-11-19 20:35:20 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2020-11-19 20:35:20 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-11-19 20:35:20 0 [Note] Server socket created on IP: '::'.
2020-11-19 20:35:20 0 [Note] InnoDB: Buffer pool(s) load completed at 201119 20:35:20
2020-11-19 20:35:20 0 [Warning] 'proxies_priv' entry '@% root@41956b51d057' ignored in --skip-name-resolve mode.
2020-11-19 20:35:20 0 [Note] Reading of all Master_info entries succeeded
2020-11-19 20:35:20 0 [Note] Added new Master_info '' to hash table
2020-11-19 20:35:20 0 [Note] mysqld: ready for connections.
Version: '10.3.27-MariaDB-1:10.3.27+maria~focal'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution