Hello everyone,
I’m experiencing issues accessing my files in Seafile. Initially, I was using version 11 and encountered the following error:
log_response Not Found: /seafhttp/files/2f35cd11-149e-4255-ad7b-b8b44942ff86/***.pdf
I upgraded to version 12 hoping it would resolve the problem, but the issue persists. I’m using the official Docker Compose setup with a local IP (no SSL, Caddy, or Swag).
Additionally, when I try to upload a file, I receive a network error in the UI.
Any help or guidance on resolving these issues would be greatly appreciated!
server {
listen 80;
server_name 192.168.178.100;
location / {
proxy_pass http://192.168.178.100:8002;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 1200s;
client_max_body_size 0;
}
location /seafhttp/ {
rewrite ^/seafhttp(.*)$ $1 break;
proxy_pass http://192.168.178.100:8002;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 1200s;
client_max_body_size 0;
}
location /media/ {
root /shared;
}
}
Thank you!
I think you are going to need to update your nginx config you showed there. By default the seafile docker container has an nginx reverse proxy inside of it that listens on port 80 and forwards /seafhttp to the fileserver, and everything else to seahub. So you should only need to talk to that one port 80.
If you have modified the seafile container setup to let you talk directly to seahub and fileserver without going through that nginx, then you need them to be on different ports. They can’t both be on 8002, so one of those sections in this config would need to change to the right port.
Also the /media sections should be removed completely. That might have worked as shortcut to serve some files directly from the disk before, but now those files are hidden away inside the docker container, so they will need go through the normal path.
Thank you for your answer I was playing around cluelessly with nginx config and came up with:
server {
listen 80;
server_name 192.168.178.100;
location / {
proxy_pass http://192.168.178.100:8002;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 1200s;
client_max_body_size 0;
}
location /seafhttp/ {
rewrite ^/seafhttp(.*)$ $1 break;
proxy_pass http://192.168.178.100:8082;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 1200s;
client_max_body_size 0;
}
}
my docker compose config:
seafile:
image: seafileltd/seafile-mc:10.0-latest
container_name: seafile
ports:
- 8002:8000
- 8082:8082
volumes:
- ./data/seafile-data:/shared # Requested, specifies the path to Seafile data persistent store.
environment:
- DB_HOST=db
- DB_ROOT_PASSWD=db_dev # Requested, the value shuold be root's password of MySQL service.
- TIME_ZONE=Europe/Berlin # Optional, default is UTC. Should be uncomment and set to your local time zone.
- SEAFILE_ADMIN_EMAIL=me@example.com # Specifies Seafile admin user, default is 'me@example.com'.
- SEAFILE_ADMIN_PASSWORD=asecret # Specifies Seafile admin password, default is 'asecret'.
depends_on:
- db
- memcached
networks:
- seafile-net
I still get the same error
I don’t know why you would be getting that sort of problem. I would suggest that you try switching to the go file server, and then try again and see if you get more helpful errors in the logs (or if you are really lucky, maybe stuff just works).
https://manual.seafile.com/12.0/config/seafile-conf/