Seafile: Can not download files, can not preview pdf

What app is this about, and its version: Seafile v13.0.19~ynh1
What YunoHost version are you running: 12.1.39
What type of hardware are you using: Old laptop or computer

Describe your issue

Hi!

A couple of days ago I installed seafile. I intregrated OnlyOffice and it is mostly working, nice! But I am having a couple of issues I just can’t fix:

  • Can not download individual files. When I try, an empty browser window opens and nothing happens. Downloading folders as zip work.
  • Can not preview pdf files: When I try, I see what appears to be the UI of the pdf preview, with the title of the pdf at the top, but in the middle where the content should be I just see an spinning wheel.

Some notes:

  • Trying this on two different browsers (Librewolf + Chromium), with and without VPN to make sure it’s not a local networking quirk.

  • both seafile and onlyoffice are installed on the main .noho.st domain, like: “example,noho,st/seafile” and “example,noho,st/onlyoffice”

  • I have already received one seafile update through yunohost web interface some days ago.

  • In the yunohost web interface → Applications → onlyoffice, I am told how to integrate OnlyOffice into Seafile: by adding some lines to “seahub_settings.py”. I found two files with that name on my system:
    /var/www/seafile/conf/seahub_settings.py
    /etc/yunohost/apps/seafile/conf/seahub_settings.py
    Both files start with the warning:
    “WARNING: Don’t edit this file. All change will be removed after each app upgrade”
    I added the onlyoffice lines to /var/www/seafile/conf/seahub_settings.py, it works, but is reset after an upgrade. So my first question is: How do I change seahub settings persistently? Or do I just have to re-add the changes I made every update? (Same question goes for other config files like seafile.conf)

  • I tried to set “use_go_fileserver” to “false” in /var/www/seafile/conf/seafile.conf, but then when trying to download a file, instead of an empty page I get a page just saying “Internal server error”

  • In /var/www/seafile/conf/seahub_settings.py I tried to set “USE_PDFJS” to “False” and add pdf to “ONLYOFFICE_FILE_EXTENSION” to get OnlyOffice to preview pdfs, but this changed nothing.

Any idea how to fix this? Thanks :slight_smile:

Share relevant logs or error messages

Don’t know where to find relevant logs, please tell me if you know, I’ll post them.

Although this is probably unrelated:

in /var/www/seafile/conf/seahub_settings.py there is this line:

LOGOUT_REDIRECT_URL = ‘https://example.noho.st/yunohost/sso/?action=logout’

But this URL does not actually work anymore, right? It should probably be changed to:

LOGOUT_REDIRECT_URL = ‘https://example.noho.st/yunohost/portalapi/logout’

Any error in the browser console or in seafile and onlyoffice services logs ?

No. Only maybe interesting part is in journalctl of seahub:

Mär 23 14:42:45 seahub.sh[2005]: WARNING:root:Redis has not been set up
Mär 23 14:42:45 seahub.sh[2005]: WARNING:root:Memcached has not been set up

Even though redis service is running and seahub_settings.py by default contains this block:

CACHES = {
    "default": {
        "BACKEND": "django.core.cache.backends.redis.RedisCache",
        "LOCATION": "redis://127.0.0.1:6379/0",
    }
}

Nothing relevant in the browser console when loading the pdf ?

Thanks for your help! There kinda is, when I try to download a file:

Failed to load resource: the server responded with a status of 500 ()

And when I try to preview a pdf:

Message: Unexpected server response (500) while retrieving PDF “``https://example.noho.st/seafhttp/repos/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/files/example.pdf/?op=download”

So it’s the same error, not being able to download files.

Hi, i don’t know this file, but i saw these important config parameters in Seafile website.

Maybe it can help:

Config Seafile and OnlyOffice in the same machine

When you want to deploy OnlyOffice and Seafile on the same server, Seafile should be deployed at the root URL while OnlyOffice should be deployed using a subfolder URL.

URL example for OnlyOffice: https://seafile.example.com/onlyofficeds

Do NOT CHANGE the SUBFOLDER if not absolutely required for some reason!

The subfolder page is only important for communication between Seafile and the DocumentServer, there is nothing except the welcome page (e.g. no overview or settings). Users will need access to it though for the OnlyOffice document server editor to work properly.

see here:

It appears that your installation does not comply with these rules

That’s for Seafile v11 though, and this hint has been removed from newer versions of the manual:

I got the feeling OnlyOffice does not really have anything to do with the issue, just mentioned it for the sake of collecting all the details.

I feel like it got something to do with my domain setup, can someone confirm downloads of individual files work, on a setup with no own domain (ie. https://example.noho.st/seafile)

Just guessing though.

Could you check this folder permissions ?
ls -la /home/yunohost.app/seafile/

drwxr-x---+  5 seafile seafile 4096 14. Mär 13:52 .
drwxr-xr-x  12 root    root    4096 14. Mär 13:52 ..
drwxrwx---   2 seafile seafile 4096 14. Mär 13:52 notification-data
drwx------   7 seafile seafile 4096 14. Mär 14:00 seafile-data
drwxrwx---+  4 seafile seafile 4096 14. Mär 20:23 seahub-data

EDIT: Also just adding, I am able to open/edit .docx files with onlyoffice.

False lead… Anyway that’s an error 500 not 403… but let’s follow it to the end :

ls -la /home/yunohost.app/seafile/seafile-data/

drwx------ 7 seafile seafile 4096 14. Mär 14:00 .
drwxr-x—+ 5 seafile seafile 4096 14. Mär 13:52 ..
drwxr-xr-x 3 seafile seafile 4096 14. Mär 13:59 httptemp
drwxr-xr-x 2 seafile seafile 4096 14. Mär 13:59 library-template
drwxr-xr-x 5 seafile seafile 4096 14. Mär 13:59 storage
drwxr-xr-x 2 seafile seafile 4096 20. Mär 13:29 tmpfiles
drwxr-xr-x 2 seafile seafile 4096 14. Mär 14:00 webdavtmp

Could you share what do return

lsof -i :8082
curl -I http://127.0.0.1:8082

sure!

COMMAND    PID    USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
fileserve 1775 seafile    6u  IPv6  25004      0t0  TCP *:8082 (LISTEN)

curl -I http://127.0.0.1:8082

HTTP/1.1 404 Not Found
Content-Type: text/plain; charset=utf-8
X-Content-Type-Options: nosniff
Date: Mon, 23 Mar 2026 23:42:03 GMT
Content-Length: 19

Out of ideas…
Could you run sudo tail -f /var/log/nginx/example.noho.st-error.log , try downloading a file and see if there’s more precision about the error.
Same thing with sudo tail -f /var/log/nginx/example.noho.st-access.log

Still more ideas than I have! example.noho.st-error.log does not change when I try to download, but some lines are added to example.noho.st-access.log:

192.168.1.1 - - [24/Mar/2026:08:27:20 +0100] "GET /favicon.ico HTTP/2.0" 302 138 "https://example.noho.st/seafhttp/repos/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/files/example.pdf/?op=download" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36"
192.168.1.1 - - [24/Mar/2026:08:27:20 +0100] "GET /yunohost/sso/?r=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX HTTP/2.0" 200 11028 "https://example.noho.st/seafhttp/repos/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/files/example.pdf/?op=download" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36"
163.172.170.157 - - [24/Mar/2026:08:28:25 +0100] "GET /seafhttp/repos/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/files/example.pdf/?op=download HTTP/1.1" 400 35 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"

PS: 192.168.1.1 is my router, but no idea what 163.172.170.157 is.

EDIT: Adding to this, when I do “curl -I https://example.noho.st/seafhttp/ ” I get this:

HTTP/2 404 
server: nginx
date: Tue, 24 Mar 2026 10:21:15 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: frame-ancestors 'self' https://exampple.noho.st/onlyoffice https://example.noho.st/seafile
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

The “You’ve just been SSOed” seems weird, I thought the file server should be public, with sso disabled? /etc/ssowat/conf.json contains this part:

"seafile.file_server": {
    "auth_header": false,
    "protect_against_basic_auth_spoofing": false,
    "public": true,
    "uris": [
        "example.noho.st/seafhttp"
    ],
    "users": []
},

That makes me think there should be no sso check here! I also tried to manually add “unprotected_urls”: “``example.noho.st/seafhttp``,

but that did not change anything about the curl output.

Another thing that seems weird to me is: in the admin web ui, going to Applications → seafile, looking at the “Tiles and permissions” part, I see different permissions I can set (feg. Permission ‘file_server’, Permission ‘media’ and so on). The main field has a “corresponds to” line followed by an URL, and every sub-field (like Permission ‘media’) has one as well. The main URL seems fine (https://example.noho.st/seafile/). For other sub-fields like Permission ‘media’ it seems fine as well (https://example.noho.st/seafile/media). But the URL for Permission ‘file_server’ seems very weird and different than everywhere else:

https://example.noho.st/seafileexample.noho.st/seafhttp

This seems wrongly formatted to me! Does that help any further?

Still would love to know if someone else who installed seafile in a “subfolder” of the main noho.st domain (like https://example.noho.st/seafile/ feg.) has the same issue, or if it’s really just me?

More or less the same settings on a working instance of seafile…
Could you consider force upgrade to reset settings to default values? And, to answser one of your earlier questions, yes, you will have to add again onlyoffice settings since seahub_settings.py is regenerated.

Did “yunohost app upgrade seafile --force”, nothing changed…

Do you have seafile installed to it’s own domain? Or subfolder to the “example.noho.st”? Do you also have the same format for the url of permission ‘file_server’ in web ui?

Like: https://example.noho.st/seafileexample.noho.st/seafhttp

Sorry to bother again, did you respect the installation manual you referred to?

and especially the paragraph:
“OnlyOffice on a separate host and URL¶”

could you share your settings?

did you respect the installation manual you referred to?

What do you mean by respect? I am using yunohost, and can not really apply the manual 1:1 here. Have looked through it for hints that could explain the behavior though. Now, after the forced upgrade, onlyoffice is not integrated at all any more. Still the same issue.

and especially the paragraph:
“OnlyOffice on a separate host and URL¶

I have. But I am using OnlyOffice on the same host and the same server.

could you share your settings?

Sure, what settings do you need? Have not changed anything manually anyways though.