STDISCOSRV(1) Syncthing STDISCOSRV(1) (NAME) stdiscosrv - Syncthing (SYNOPSIS) stdiscosrv [--debug] [--http] [--compression] [--version] [--cert=] [--key=] [--listen=
] [--metrics-listen=
] [--db-dir=] [--db-flush-interval=] (DESCRIPTION) Syncthing (peers) . Syncthing . Syncthing . (OPTIONS) --debug (). --http HTTP ( HTTPS). --version . --compression GZIP HTTP. --cert= ( <<./cert.pem>>). --http . --key= ( <<./key.pem>>). --http . --listen=
( <<:8443>>). --metrics-listen=
Prometheus ( ). --db-dir= ( <<.>>). --db-flush-interval= ( <<5m>>). SYNCTHING (POINTING SYNCTHING AT YOUR DISCOVERY SERVER) Syncthing default . Syncthing stdiscosrv Syncthing . (settings) (Global Discovery Server) stdiscosrv : https://disco.example.com:8443/. stdiscosrv 8443 . stdiscosrv IP Dynamic DNS . v0.14.44: /v2/ https://disco.example.com:8443/v2/. default . (SETTING UP) (Description) Syncthing . . (Installing) . stdiscosrv ( stdiscosrv.exe) . . stdiscosrv . apt / . apt Syncthing . syncthing-discosrv . (Configuring) : Syncthing (static) Syncthing IP (bind) . (Certificates) HTTPS . : o (CA-signed) . HTTPS . o << >> (device ID) ( Syncthing Syncthing). . o --http SSL . . . http : $ stdiscosrv --cert=/path/to/cert.pem --key=/path/to/key.pem Server device ID is 7DDRT7J-UICR4PM-PBIZYL3-MZOJ7X7-EX56JP6-IK6HHMW-S7EK32W-G3EUPQA . CA ( ) URL : https://disco.example.com:8443/?id=7DDRT7J-UICR4PM-PBIZYL3-MZOJ7X7-EX56JP6-IK6HHMW-S7EK32W-G3EUPQA URL : https://disco.example.com:8443/ (Reverse Proxy Setup) 1.8.0: HTTP <> . SSL . : o URL o SSL HTTPS ?id=... URL . HTTPS . ?id=... . . . (Requirements) o -http: stdiscosrv -http. o / SSL . o HTTP <> IP . o HTTP <> . o HTTP <> SSL PEM . POST GET . syncthing-discosrv POST no certificates . o SSL CA . Nginx : proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Client-Port $remote_port; proxy_set_header X-SSL-Cert $ssl_client_cert; ssl_verify_client optional_no_ca; Nginx . https://discovery.example.com URL Syncthing . # HTTP 1.1 support proxy_http_version 1.1; proxy_buffering off; proxy_set_header Host $http_host; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Client-Port $remote_port; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto; proxy_set_header X-SSL-Cert $ssl_client_cert; proxy_set_header X-Forwarded-Tls-Client-Cert ""; proxy_set_header X-Tls-Client-Cert-Der-Base64 ""; upstream discovery.example.com { # Local IP address:port for discovery server server 192.0.2.1:8443; } server { server_name discovery.example.com; listen 80; access_log /var/log/nginx/access.log vhost; return 301 https://$host$request_uri; } server { server_name discovery.example.com; listen 443 ssl http2; access_log /var/log/nginx/access.log vhost; # Mozilla Intermediate configuration (https://wiki.mozilla.org/Security/Server_Side_TLS) ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384; ssl_prefer_server_ciphers off; ssl_session_tickets off; ssl_session_timeout 5m; ssl_session_cache shared:SSL:50m; ssl_verify_client optional_no_ca; # OCSP stapling ssl_stapling on; ssl_stapling_verify on; # Certificates ssl_certificate /etc/nginx/certs/discovery.example.com.crt; ssl_certificate_key /etc/nginx/certs/discovery.example.com.key; # curl https://ssl-config.mozilla.org/ffdhe2048.txt > /path/to/dhparam ssl_dhparam /path/to/dhparam; # HSTS (ngx_http_headers_module is required) (63072000 seconds) add_header Strict-Transport-Security "max-age=63072000" always; location / { proxy_pass http://discovery.example.com; } } SSL Syncthing Nginx Let's Encrypt Docker . Apache : SSLProxyEngine On SSLVerifyClient optional_no_ca RequestHeader set X-SSL-Cert "%{SSL_CLIENT_CERT}s" RequestHeader unset X-Forwarded-Tls-Client-Cert RequestHeader unset X-Tls-Client-Cert-Der-Base64 Apache httpd 2.4.38 . a2enmod remoteip . Apache httpd : RemoteIPHeader X-Forwarded-For Caddy Caddyfile : discovery.example.com { reverse_proxy 192.0.2.1:8443 { header_up X-Forwarded-For {http.request.remote.host} header_up X-Client-Port {http.request.remote.port} header_up X-Tls-Client-Cert-Der-Base64 {http.request.tls.client.certificate_der_base64} header_up -X-Ssl-Cert header_up -X-Forwarded-Tls-Client-Cert } tls { client_auth { mode request } } } Reverse Proxy Setup . Syncthing . (SEE ALSO) syncthing-networking(7), syncthing-faq(7) (AUTHORS) The Syncthing Authors (COPYRIGHT) 2014-2026, The Syncthing Authors v2.1.0 July 23, 2026 STDISCOSRV(1)