Seafile Docker with Apache reverse proxy

I’m using the official seafile docker setup on my server with the following command:

docker run -u root -d \
    --name seafile \
    -e \
    -v /opt/seafile-data:/shared \
    -p 22080:80 \

On my ISPConfig I have created a new site with LetsEncrypt certificate, HTTP to HTTPS rewrite and the following apache directives:

ProxyRequests Off
ProxyPreserveHost On
AllowEncodedSlashes NoDecode
<Proxy *>
	Order deny,allow
	Allow from all
ProxyPass               /  http://localhost:22080/ nocanon
ProxyPassReverse  /  http://localhost:22080/
ProxyPassReverse  /
RequestHeader set X-Forwarded-Proto "https"
RequestHeader set X-Forwarded-Port "443"

Everything is working fine, except the file upload. When I upload a file I’m getting “Unknown error”. Did I missed something in my setup? I have not changed something in the seafile configs yet.

Thanks in advance!

The Seafile Docker container already contains nginx. So you have to set it up to run over nginx. So you maybe have a problem with the locations. You should look how to run Apache over nginx.

I’ve got the same problem.
With apache reverse proxy + seafile docker, everything is fine except uploading the files.
Creating and deleting files works well.
@mo-mueller Did you solve this issue?

Same issue

I got a ConnectionError when uploading files on seafile-docker instance. The reason was the URL given in “Admin Settings” → “Settings” → “FILE_SERVER_ROOT” (usually something like “…/seafhttp”) was not configured properly. Here is the Apache VirtualHost file I put on the server / host that fixed this (Sorry I had to obfuscate the URLs):

<VirtualHost *:80>
RewriteEngine on
ServerName seafile dot myserver dot com
ProxyPreserveHost On
ProxyRequests Off

ProxyPass /seafhttp httpcolonslashslashlocalhost:34539
ProxyPassReverse /seafhttp httpcolonslashslashlocalhost:34539
RewriteRule ^/seafhttp - [QSA,L]

ProxyPass / httpcolonslashslashlocalhost:34538/
ProxyPassReverse / httpcolonslashslashlocalhost:34538/

And here is the relevant configuration changes in my docker-compose.yml

    image: seafileltd/seafile-mc:latest
    container_name: seafile
      - "34538:80"
      - "34539:8082"

So I published the port “8082” of the container to port “34539” on the server. Any request to seafile dot myserver dot com/seafhttp will be forwarded to the port “34539”.
This is the basic configuration, you might want to add HTTPS with letsencrypt / certbot or manually.