I’m currently experimenting to migrate a Seafile 12 non-docker to docker on a new machine.
Since things have gone wrong on my last try I simply tried to delete all the other directories besides /opt/seafile for a fresh start. But now starting docker in the directory with the docker files I get the following error.
seafile | nginx: [alert] could not open error log file: open() “/var/log/nginx/error.log” failed (40: Too many levels of symbolic links)
seafile | 2026/07/02 12:36:00 [emerg] 39#39: open() “/var/log/nginx/seahub.access.log” failed (40: Too many levels of symbolic links)
What’s wrong here?
The error “Too many levels of symbolic links” for /var/log/nginx/error.log usually indicates a circular symbolic link within your Seafile data volume on the host machine.
This typically happens when a symlink named var-log exists inside the logs directory of your Seafile data path and points to itself or a parent directory.
To fix this, please try the following:
- On your host machine, navigate to the logs directory inside your Seafile data volume (usually
/opt/seafile-data/seafile/logs or similar, depending on your docker-compose.yml configuration).
- Look for a symbolic link named
var-log.
- Delete that symbolic link:
rm var-log
- Restart your Seafile container:
docker compose restart seafile
The container’s initialization script should then recreate the necessary links correctly.
For reference, a similar issue was discussed here: https://forum.seafile.com/t/failed-to-access-shared-logs-var-log-too-many-levels-of-symbolic-links/23118 (Note: link corrected based on context of common issues).