Seafile: Can not download files, can not preview pdf

Ah, I missed the rewrite directive.

Try force upgrading (after a full backup)

Already did that, but did not change anything.

Does this folder exist?

And does this file exist inside it?

Can you share the force upgrade log?

Yes.

ls -al /var/www/seafile/seafile_image/opt/seafile/seafile-server-13.0.19/seahub/media
insgesamt 52
drwxr-x---+ 13 seafile seafile 4096 17. Mär 23:35 .
drwxr-x---+ 16 seafile seafile 4096 23. Dez 10:43 ..
drwxr-x---+  4 seafile seafile 4096  9. Mär 04:04 assets
drwxr-x---+  2 seafile seafile 4096 27. Jun 2025  audio
lrwxrwxrwx   1 seafile seafile   28 17. Mär 23:35 avatars -> ../../../seahub-data/avatars
drwxr-x---+  2 seafile seafile 4096 27. Jun 2025  bootstrap
drwxr-x---+  3 seafile seafile 4096 28. Aug 2025  comment-editor
drwxr-x---+  4 seafile seafile 4096 23. Dez 10:43 css
lrwxrwxrwx   1 seafile seafile   27 17. Mär 23:35 custom -> ../../../seahub-data/custom
drwxr-x---+  2 seafile seafile 4096 19. Sep 2025  favicons
drwxr-x---+  7 seafile seafile 4096 23. Dez 10:43 img
drwxr-x---+  5 seafile seafile 4096 27. Jun 2025  js
drwxr-x---+  3 seafile seafile 4096 27. Jun 2025  office-template
drwxr-x---+  4 seafile seafile 4096 23. Dez 10:43 sdoc-editor
drwxr-x---+  4 seafile seafile 4096 30. Jul 2025  seafile-editor

Yes.

ls -al /var/www/seafile/seafile_image/opt/seafile/seafile-server-13.0.19/seahub/media/js/pdf/web/
insgesamt 524
drwxr-x---+   6 seafile seafile   4096 23. Dez 10:43 .
drwxr-x---+   4 seafile seafile   4096 27. Jun 2025  ..
drwxr-x---+   2 seafile seafile  12288 27. Jun 2025  cmaps
-rw-r-----+   1 seafile seafile    726 27. Jun 2025  custom.css
drwxr-x---+   3 seafile seafile   4096 27. Jun 2025  images
drwxr-x---+ 113 seafile seafile   4096 27. Jun 2025  locale
drwxr-x---+   2 seafile seafile   4096 27. Jun 2025  standard_fonts
-rw-r-----+   1 seafile seafile  63481 27. Jun 2025  viewer.css
-rw-r-----+   1 seafile seafile 432300 23. Dez 10:43 viewer.js

Sure! https://pastebin.com/raw/0Nak4UJW

Argh. Set debug to true in config file and restart seafile services and try to reproduce the error. Hoping you get a more explicit error

Added “Debug = True” to seahub_settings.py, but don’t find any more details in the usual logs (mainnohostsubdomain.noho.st-access.log, mainnohostsubdomain.noho.st-error.log), where else should I look?

Also should mention that with @otm33 we found out that there is an issue with sso, the fileserver part is protected by it, but shouldn’t be. When I do:
curl -I https://mainnohostsubdomain.noho.st/seafhttp/
I get

HTTP/2 404
server: nginx
date: Thu, 26 Mar 2026 21:31:13 GMT
content-type: text/plain; charset=utf-8
content-length: 19
x-sso-wat: You’ve just been SSOed
x-content-type-options: nosniff
content-security-policy: upgrade-insecure-requests
x-xss-protection: 1; mode=block
x-download-options: noopen
x-permitted-cross-domain-policies: none
x-frame-options: SAMEORIGIN
permissions-policy: interest-cohort=()
strict-transport-security: max-age=63072000; includeSubDomains; preload

Most interesting is the “You’ve just been SSOed” part, does not appear for @otm33, and works great there.
So currently my assumption is:

Installing seafile in a “subfolder” will break SSO config for seafile and prevent downloads.

No idea how to fix though. Would be really helpful if someone else tried this, because if it actually works for nobody, we should enforce a separate subdomain for it when installing.

No, sorry, that’s another false lead: I didn’t pay attention (it was late…) but I tried without the trailing slash. If you run curl -I https://mainnohostsubdomain.noho.st/seafhttp you will also get a 301.

Oh well, yes I do… :sweat_smile:

Would be really helpful if someone else tried this, because if it actually works for nobody, we should enforce a separate subdomain for it when installing.

That still stands though, I need a volunteer without seafile currently installed.

I fully removed onlyoffice and seafile, reinstalled only seafile to a new, free subdomain. Still the same issue. Created new user, adding a file to default library: same issue… Can’t understand how I am the only one with the issue :melting_face: