Android app not working

Hello, I don’t understand why android app is not working. Desktop clients and web interface work fine.
Can’t download files and can’t upload or sync photos.

I’m pretty sure something is wrong in nginx, but can’t figure out what.
Here is my nginx conf (replaced real names and ip):

server {
	listen 443 ssl http2;
	error_page 497  https://$host:$server_port$request_uri;

	server_tokens off;
        ssl on;
        ssl_certificate /etc/ssl/websites/;
        ssl_certificate_key /etc/ssl/websites/;
        ssl_session_timeout 5m;

        ssl_dhparam /etc/ssl/websites/dhparam.pem;
	ssl_protocols TLSv1.2 TLSv1.3;
        ssl_prefer_server_ciphers on;

        add_header Strict-Transport-Security "max-age=31536000";
        add_header X-Frame-Options SAMEORIGIN;
        add_header X-Content-Type-Options nosniff;
        add_header X-XSS-Protection "1; mode=block";

        proxy_set_header X-Forwarded-For $remote_addr;

	location / {
		    proxy_set_header   Host $host;
		    proxy_set_header   X-Real-IP $remote_addr;
		    proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
		    proxy_set_header   X-Forwarded-Host $server_name;
		    proxy_read_timeout  1200s;
                    proxy_set_header   X-Forwarded-Proto https;
		    access_log      /var/log/nginx/seahub.access.log;
		    error_log       /var/log/nginx/seahub.error.log;
		    client_max_body_size 0;

	location /seafhttp {
	        rewrite ^/seafhttp(.*)$ $1 break;
	        proxy_request_buffering off;
	        client_max_body_size 0;
		proxy_connect_timeout  36000s;
		proxy_read_timeout  36000s;
		proxy_send_timeout  36000s;
		send_timeout  36000s;

                access_log      /var/log/nginx/seafhttp.access.log;
                error_log       /var/log/nginx/seafhttp.error.log;
                proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;

        location /media {
            root /home/seafile/seafile-server-latest/seahub;


There are errors in nginx logs:

x.x.x.x - - [01/Sep/2020:16:03:14 +0200] "GET /api2/repos/dc394e57-d480-44f2-9298-26f39c583cb2/upload-link/?p=My+Photos%2FCamera HTTP/1.1" 200 84 "-" "Dalvik/2.1.0 (Linux; U; Android 9; Redmi Note 4 Build/PQ3A.190801.002)"

2020/08/31 23:59:02 [error] 2406#2406: *87732 connect() failed (111: Connection refused) while connecting to upstream, client: x.x.x.x, server:, request: "GET /seafhttp/repo/6d5d7600-c8ca-490e-bbe2-31d368b21f9f/commit/HEAD HTTP/2.0", upstream: "", host: ""

x.x.x.x - - [01/Sep/2020:16:02:53 +0200] "GET /seafhttp/upload-api/fa5a5b7b-b469-4f1f-8fb2-31809c23fbac HTTP/2.0" 400 0 "-" "okhttp/3.9.1"

here my conf files:

host =

# -*- coding: utf-8 -*-
SECRET_KEY = "mysecretkey"

any help please?

I still can’t figure out where is the issue, anybody can help me?


I got a similar problem an traced it down using Wireshark.

Server on (docker containered seafile)
Client on (Android 10 app 2.2.25)

If I try to upload files The following TLS packages are exchanged (among other TCP packages):

|334|83.850430389|||TLSv1.2|249|Client Hello|
|336|83.851779792|||TLSv1.2|3038|Server Hello, Certificate, Server Key Exchange, Server Hello Done|
|340|83.870728877|||TLSv1.2|75|Alert (Level: Fatal, Description: Certificate Unknown)

This seems to be the source of my problem, but I do not know how to resolve it at the actual time. Maybe you could find a solution by verifying that you have the same problem.

I really don’t understand: I set up a test server, with same identical configuration files. The only difference is that it’s in a virtual machine and in LAN, and Android app works with this server :scream:

I just backed up everything and reinstalled on a fresh install on the same server, then imported dbs and data backup. Now it works. But, really, the mistery will remain unsolved