Can't download file from web even the FILE_SERVICE_ROOT is correct

caddy.yml is changed as

  • 8192:80

and then also change seahub_settings.py
SERVICE_URL = “http://xxx.freeddns.org:8192
FILE_SERVER_ROOT = ‘http://xxx.freeddns.org:8192/seafhttp

when I try to click download from web, it shows

# Not Found

The requested URL was not found on this server.

and I can see the URL is missing the port number 8192 as below. Why?

http://xxx.freeddns.org/seafhttp/repos/319d776f-e8f5-43b5-a1f6-64b962719278/files/session_default.png/?op=download

if I manually put the port number 8192 as below, then I can download the file successfully.

http://xxx.freeddns.org:8192/seafhttp/repos/319d776f-e8f5-43b5-a1f6-64b962719278/files/session_default.png/?op=download

Make sure that the SEAFILE_SERVER_HOSTNAME and SEAFILE_SERVER_PROTOCOL are set correctly in the .env file. If they are incorrect, change them to the correct values and restart the docker container. Additionally, check if there are any network firewalls or load balancers that might be causing issues. You can use Chrome’s development console to inspect the network requests and see if the correct address is being used when attempting to download the file.

Note, in version 12.0, SEAFILE_SERVER_HOSTNAME and SEAFILE_SERVER_PROTOCOL are used instead of SERVICE_URL and FILE_SERVER_ROOT.

Hi Daniel

which .env file contains SEAFILE_SERVER_HOSTNAME and SEAFILE_SERVER_PROTOCOL? where is this .env file? Thanks a lot

Please check the upgrade notice document: Upgrade notes for 12.0.x - Seafile Admin Manual

Thanks for reply. I go through the link you mentioned. I checked the /opt/seafile-data/seafile/conf and I don’t have .env file

I did a new clean install and my version is 12.0.9 CE version using docker. I followed this installation guide
https://manual.seafile.com/13.0/setup/overview/

If you use a new docker installation, you should have followed the document: Setup community edition - Seafile Admin Manual

Just search word “env” in this page.

I got .env file and including the port number as below

SEAFILE_SERVER_HOSTNAME=xxxx.freeddns.org:8192

and the web login page can’t start.

If I remove the port number in SEAFILE_SERVER_HOSTNAME, then the web login page is OK except I am not able to download file.

The port number is programmed in caddy.yml as

  • 8192:80