Seafile 8 OCM api error

please help me with the problem. In my configuration, there are 2 servers running on a VPN wireguard network. One server has an ip of and another is I need to share a library from one server to another, but I keep getting an error:
POST /api/v2.1/ocm/shares-prepare/ 500

'default': {
    'ENGINE': 'django.db.backends.mysql',
    'NAME': 'seahub-db',
    'USER': 'seafile',
    'PASSWORD': '',
    'HOST': '',
    'PORT': '3306'


#OCM_PROVIDER_ID = '2d9a96da-de38-44bf-b899-71db349731e3' # the unique id of this server
    "server_name": "main",
    "server_url": "", # should ends with '/'


OCM_PROVIDER_ID was commented out, for tests, don’t know if this is needed and where to get id. I tried to write the one that is listed on the site, I tried to generate it through uuidgen, with no results. (Address warehouse .com is resolved by unbound + pihole local dns). Second server has the same config only another address.
nginx configuration is standard and the same on both servers except for the address:

server {
    listen       80;
    rewrite ^$request_uri? permanent;
    server_tokens off;
server {
    listen 443 ssl http2;

    ssl_certificate /etc/nginx/ssl/;
    ssl_certificate_key /etc/nginx/ssl/;
    ssl_dhparam /etc/nginx/ssl/;
    ssl_session_timeout 5m;
    ssl_session_cache shared:SSL:5m;

# secure settings (A+ at SSL Labs ssltest at time of writing)
# see
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;

proxy_set_header X-Forwarded-For $remote_addr;

add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
server_tokens off;

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_set_header   X-Forwarded-Proto https;

    access_log      /var/log/nginx/seahub.access.log;
    error_log       /var/log/nginx/seahub.error.log;

    proxy_read_timeout  1200s;

    client_max_body_size 0;

location /seafhttp {
    rewrite ^/seafhttp(.*)$ $1 break;
    client_max_body_size 0;
    proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_connect_timeout  36000s;
    proxy_read_timeout  36000s;
    proxy_send_timeout  36000s;
    send_timeout  36000s;
location /media {
    root /opt/seafile/seafile-server-latest/seahub;


Can you add DEBUG = True to, restart the server? Then use Chrome’s debug mode to check the details of the network request with 500 errior.

xhr.js:160 POST 500
(anonymous) @ xhr.js:160
e.exports @ xhr.js:11
e.exports @ dispatchRequest.js:57
Promise.then (async)
s.request @ Axios.js:51
i.forEach.s.<computed> @ Axios.js:71
(anonymous) @ bind.js:9
value @ seafile-api.js:2626
OCMShare @ share-to-other-server.js:147
value @ Button.js:40
m @ react-dom.production.min.js:15
E @ react-dom.production.min.js:15
(anonymous) @ react-dom.production.min.js:16
k @ react-dom.production.min.js:16
L @ react-dom.production.min.js:17
O @ react-dom.production.min.js:17
A @ react-dom.production.min.js:17
vn @ react-dom.production.min.js:79
ue @ react-dom.production.min.js:285
wn @ react-dom.production.min.js:81
kn @ react-dom.production.min.js:83
Sn @ react-dom.production.min.js:82
t.unstable_runWithPriority @ scheduler.production.min.js:18
Bi @ react-dom.production.min.js:119
Ks @ react-dom.production.min.js:221
En @ react-dom.production.min.js:80

{"ocm_share_list":[{"id":1,"shared_secret":"vd1fjnwtlrd7704u97ozro2","from_user":"","to_user":"dsfsdfds","to_server_url":"","repo_id":"34f9cfad-adf5-455d-8582-ec68093b032e","repo_name":"\u041c\u043e\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430","path":"/","permission":"rw","ctime":"2021-03-04T07:57:45+00:00","to_server_name":null}]}


Second server send only: {"ocm_share_list":[]}

log from nginx: - - [05/Mar/2021:19:38:02 +0000] “GET /api/v2.1/notifications/ HTTP/2.0” 200 51 “” “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36” - - [05/Mar/2021:19:38:05 +0000] “GET /api/v2.1/repos/dd983532-da08-4903-b26f-34cc4495e0fc/ HTTP/2.0” 200 443 “” “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36” - - [05/Mar/2021:19:38:05 +0000] “GET /api2/repos/dd983532-da08-4903-b26f-34cc4495e0fc/dir/shared_items/?p=%2F&share_type=user HTTP/2.0” 200 2 “” “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36” - - [05/Mar/2021:19:38:06 +0000] “GET /api/v2.1/ocm/shares-prepare/?repo_id=dd983532-da08-4903-b26f-34cc4495e0fc HTTP/2.0” 200 21 “” “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36” - - [05/Mar/2021:19:38:11 +0000] “POST /api/v2.1/ocm/shares-prepare/ HTTP/2.0” 500 285 “” “Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36”

I found a solution. OCM and Django doesn’t work with self signed certificates and an error occurs. In my case, I disabled one self-signed certificate on the server, which is inside the wireguard. On the second server, I have a letsencrypt certificate, and this server, as I wanted, now quietly shares its folder on the internal server without ssl.

Yes, and one more thing, now that everything is working, I was disappointed with the functionality, because the maximum that can be done with a shared library is to download files and upload files to it. Initially, I assumed that it would be possible, as in all libraries, to move files from one library to another, this would close the need to think about the issue of synchronizing two servers.