Unable to figure out correct setup for Android transfers to work behind nginx reverse proxy

I have tried my darndest, but I am unable to figure out the correct setup for Android transfers to not “Upload Failed” when behind a reverse proxy. I had it working prior to the proxy. Any help would be much appreciated.

I am behind an nginx reverse proxy setup in OPNsense, that creates an endpoint at https://files.example.com which points to upstream nas.subdomain.example.com:8000. Everything works fine besides the Android client.

  1. In docker-compose, I commented out the environment variable:

    #- SEAFILE_SERVER_LETSENCRYPT

    because nginx alone takes care of https, is this correct?

  2. Also in docker-compose I set the hostname to the new nginx endpoint:

    – SEAFILE_SERVER_HOSTNAME=files.example.com

    Is this correct?

  3. In the seafile admin web ui under “Settings”, I set the “URL” section to the nginx endpoint:

    SERVICE_URL: https://files.example.com
    FILE_SERVER_ROOT: https://files.example.com/seafhttp

    Both urls are https even though the upstream is http, is this correct?

  4. In the android client, I setup the account using the nginx endpoint with https: https://files.example.com, is this correct? Or should I set it up with the upstream address without https: http://nas.subdomain.example.com:8000

seafile.conf looks like this:

ccnet.conf looks like this:

image

seahub_settings.py looks like this:

gunicorn.conf.py looks like this:

I can post logs as well, let me know. Would be grateful for any guidance.

Thanks!

I am still stuck on this. I am unable to both have a reverse proxy and file sync’ing with the android client. Anyone know how to investigate further even if you don’t have a full solution?

Much appreciated.