First time Seafile install can't get past Error: Failed to create mysql user seafile@%.%.%.%'

Hello all,

I’m completely lost. This is the first time I’m trying out Seafile, and I think it will do what I want, without the overhead of Nextcloud and ownCloud. I cannot seem to make a brand new docker Seafile installation get past the following error message (docker-compose.yaml follows).

I appreciate all the direction that I can get, and look forward to contributing to these forums once I get this installation up and running.

Error: Failed to create mysql user seafile@%.%.%.%: Operation CREATE USER failed for 'seafile'@'%.%.%.%'
[2022-04-25 23:49:08] Now running in auto mode.
Traceback (most recent call last):
  File "/scripts/", line 86, in <module>
  File "/scripts/", line 56, in main
  File "/scripts/", line 154, in init_seafile_server
    call('{} auto -n seafile'.format(setup_script), env=env)
  File "/scripts/", line 70, in call
    return subprocess.check_call(*a, **kw)
  File "/usr/lib/python3.8/", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/opt/seafile/seafile-pro-server-9.0.5/ auto -n seafile' returned non-zero exit status 1.

My docker-compose.yaml (I’ve tried all 3 images with the same result). I’m using the 3 free user Pro version. I am using traefik, but it doesn’t seem to be the issue because I can’t get past the db problem, also why the ports are commented out. I get my SSL from Letsencrypt through Traefik/Cloudflare, but again, we’re not even there at this stage.

Memcached and Mariadb are both running on the db network. Other containers connect to the db network and mariadb with no problems. $DB_HOST and $MYSQL_ROOT_PASSWORD are global across all containers, so these work.

I’ve confirmed with mariadb that root has access to everything by reissuing the command:


I’ve also used $DOCKERDIR/seafile with /opt/seafile

version: '2.0'
        # image: seafileltd/seafile-mc:latest
        # image: seafileltd/seafile:latest
        container_name: seafile
          - traefik
          - db
        # ports:
        #   - "80:80"
        #   - "443:443"  # If https is enabled, cancel the comment.
          - DB_HOST=$DB_HOST
          - DB_ROOT_PASSWD=$MYSQL_ROOT_PASSWORD  # Requested, the value shuold be root's password of MySQL service.
          # - TIME_ZONE=$TZ # Optional, default is UTC. Should be uncomment and set to your local time zone.
          - SEAFILE_ADMIN_EMAIL=[redacted] # Specifies Seafile admin user, default is ''
          - SEAFILE_ADMIN_PASSWORD=[redacted]     # Specifies Seafile admin password, default is 'asecret'
          # - SEAFILE_SERVER_LETSENCRYPT=false   # Whether to use https or not
          # - # Specifies your host name if https is enabled
          - $DOCKERDIR/seafile:/shared   # Requested, specifies the path to Seafile data persistent store.
        external: true
        external: true

I’m hoping someone has experienced the same or similar …

Thanks again.