Docker compose causes 'yaml: unmarshal errors:'

Try to fresh install from manual (to convert my local seafile installation later to docker).

https://manual.seafile.com/latest/setup/setup_ce_by_docker/#install-docker

But no matter if I change the .env or use the original .env, I get the error message. Equal if I use an absolute path or the file in the path self

root@server:/opt/seafile/docker > docker compose -f .env up -d
yaml: unmarshal errors:
  line 1: cannot unmarshal !!str `COMPOSE...` into cli.named
root@server:/opt/seafile/docker > ll
insgesamt 20
drwxr-xr-x 2 root root   95  8. Jun 11:24 .
drwxr-xr-x 7 root root  112  8. Jun 10:18 ..
-rw-r--r-- 1 root root  646  8. Jun 11:09 caddy.yml
-rw-r--r-- 1 root root  931  6. Jun 15:02 .env
-rw-r--r-- 1 root root 1102  8. Jun 11:15 .env.bak
-rw-r--r-- 1 root root 1483  8. Jun 11:10 seadoc.yml
-rw-r--r-- 1 root root 2651  8. Jun 11:10 seafile-server.yml
root@server:/opt/seafile/docker >

I think the error about yaml unmarshaling is complaining about parsing one of those config files. I had that error happen when my text editor replaced some spaces with tabs, but I can’t guess what problem it’s seeing with your files.

You can try the “docker-compose logs” command to see if it will give you a more specific error about what’s wrong with the configs, or you could try posting your configs here to see if someone can spot the error.

Thats all the original files from manual.

The only difference is the target directory.

mkdir /opt/seafile
cd /opt/seafile

# Seafile CE 12.0
wget -O .env https://manual.seafile.com/12.0/repo/docker/ce/env
wget https://manual.seafile.com/12.0/repo/docker/seadoc.yml
wget https://manual.seafile.com/12.0/repo/docker/ce/seafile-server.yml
wget https://manual.seafile.com/12.0/repo/docker/caddy.yml

Even with the unchanged .env file, I get this error.

My system is Debian 12.

The only difference is the target directory.

Yes, must change the yml-Files to other directory:

root@server:/opt/seafile/docker 493 > grep seafile *.yml
caddy.yml:    container_name: seafile-caddy
caddy.yml:      - CADDY_INGRESS_NETWORKS=seafile-net
caddy.yml:      - ${SEAFILE_CADDY_VOLUME:-/opt/seafile-caddy}:/data/caddy
caddy.yml:      - seafile-net
caddy.yml:  seafile-net:
caddy.yml:    name: seafile-net
seadoc.yml:    image: ${SEADOC_IMAGE:-seafileltd/sdoc-server:1.0-latest}
seadoc.yml:      - DB_USER=${SEAFILE_MYSQL_DB_USER:-seafile}
seadoc.yml:      - seafile-net
seadoc.yml:  seafile-net:
seadoc.yml:    name: seafile-net
seafile-server.yml:    container_name: seafile-mysql
seafile-server.yml:      - "${SEAFILE_MYSQL_VOLUME:-/opt/seafile-mysql/db}:/var/lib/mysql"
seafile-server.yml:      - seafile-net
seafile-server.yml:    container_name: seafile-memcached
seafile-server.yml:      - seafile-net
seafile-server.yml:  seafile:
seafile-server.yml:    image: ${SEAFILE_IMAGE:-seafileltd/seafile-mc:12.0-latest}
seafile-server.yml:    container_name: seafile
seafile-server.yml:      - ${SEAFILE_VOLUME:-/opt/seafile-data}:/shared
seafile-server.yml:      - DB_USER=${SEAFILE_MYSQL_DB_USER:-seafile}
seafile-server.yml:      - SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=${SEAFILE_MYSQL_DB_SEAFILE_DB_NAME:-seafile_db}
seafile-server.yml:      - seafile-net
seafile-server.yml:  seafile-net:
seafile-server.yml:    name: seafile-net

Hm… Must not change yml-files - they have the environement variables from the .env file. The absolute paths in there are default vaules, if environment is not defined.

Here is my .env:

COMPOSE_FILE='seafile-server.yml,caddy.yml,seadoc.yml'
COMPOSE_PATH_SEPARATOR=','

SEAFILE_IMAGE=seafileltd/seafile-mc:12.0-latest
SEAFILE_DB_IMAGE=mariadb:10.11
SEAFILE_MEMCACHED_IMAGE=memcached:1.6.29
SEAFILE_CADDY_IMAGE=lucaslorentz/caddy-docker-proxy:2.9-alpine

SEAFILE_VOLUME=/opt/seafile/docker/seafile-data
SEAFILE_MYSQL_VOLUME=/opt/seafile/docker/seafile-mysql/db
SEAFILE_CADDY_VOLUME=/opt/seafile/docker/seafile-caddy

SEAFILE_MYSQL_DB_HOST=db
INIT_SEAFILE_MYSQL_ROOT_PASSWORD='Q+pTK4dZlNEhcJL7NAni'
SEAFILE_MYSQL_DB_USER=seafile
SEAFILE_MYSQL_DB_PASSWORD='uQgA-H43CwaVQQn4Ui4-6'

TIME_ZONE=Etc/UTC

JWT_PRIVATE_KEY=Pw4ZGLCxJexIFP33o1nURyXEVY4oDjInbtg37F1M

SEAFILE_SERVER_HOSTNAME=blackedout.name.de
SEAFILE_SERVER_PROTOCOL=http

INIT_SEAFILE_ADMIN_EMAIL=blacked.mail@gmail.de
INIT_SEAFILE_ADMIN_PASSWORD=USgWHxxPbgWKmCN2TkPK18f7QfMW3FHU6XMuvi1y


SEADOC_IMAGE=seafileltd/sdoc-server:1.0-latest
SEADOC_VOLUME=/opt/seafile/docker/seadoc-data

ENABLE_SEADOC=true


NOTIFICATION_SERVER_IMAGE=seafileltd/notification-server:12.0-latest
NOTIFICATION_SERVER_VOLUME=/opt/seafile/notification-dat

That all looks fine to me. So maybe the problem is something that isn’t visible. I used podman instead of docker so I can’t verify this, but I think it needs to make a temp file, so maybe you need to give the docker user write access to that directory “chmod 777 .”. The other thing I can think of is that maybe one of those files has the windows newlines instead of unix style, so try “dos2unix *”.

I can’t think of anything else, but maybe if you can get more details from that “docker-compose logs” command we might get another clue.

Neither chmod on the directories nor dos2unix worked.

docker compose logs has empty output

If I try it with podman, is there a how-to for seafile, similar to docker?

There is no official howto for installing with podman that I know of, but I wrote up my own little guide after I got it working.