Setting up custom discovery server


(ekvvp) #1

Hello everyone ! I want have my own discovery server because synchronization does not work by default sttings.

Can someone help me set it up ? I need step by step instructions with all commands for a beginner Ubuntu user.

I tried to set it up, but have no results. What i’ve done:

root@134-0-119-52:~# sudo ./stdiscosrv

stdiscosrv v0.14.5 (go1.7 linux-amd64) jenkins@build.syncthing.net 2016-08-23 08:42:09 UTC

Server device ID is M55TU7H-EUED7VA-AIMRPHV-QRVDJZE-MKORQ7X-7OFLRTR-PGIEKL6-5OD5GQP

Stats: 0.00 announces/s, 0.00 queries/s, 0.00 answers/s, 0.00 errors/s

further have made changes like in docs: 134.0.119.52:8443/?id=M55TU7H-EUED7VA-AIMRPHV-QRVDJZE-MKORQ7X-7OFLRTR-PGIEKL6-5OD5GQP as connection settings

but there are notes after setting changes:

Can someone help with step by step instruction for beginner ?


Blocked IP addresses in Russia
(Antony Male) #2

Have you read the docs?


(ekvvp) #3

Yes, i have. Sorry by noob’s question maybe, but i’m standard user )

I will write by on the items like it pointed out on docs.

  1. Run stdiscosrv without any flags on server (ubuntu 16.04)
  2. At first start stdiscosrv generated certificate files by default ./cert.pem and ./key.pem in same directory, database doesn’t generated in same directory (by discription it has to)
  3. After that have a note: “Server device ID is QN5PG5M-JYYZFR7-ECUMUYY-NSCQDN4-2YX7PBK-NSD5XYO-THOJ25R-DQSZAQV” and later Stats: 0.00 announces/s, 0.00 queries/s, 0.00 answers/s, 0.00 errors/s
  4. in section “Certificates” my case is "Use any certificate pair and let clients authenticate the server based on its “device ID” (similar to Syncthing-to-Syncthing authentication). This option can be used with the certificate automatically generated by the discovery server." The discovery server generate its device ID at start. So i write ID in the discovery server conection settings URL https://mydomein.com:8443/?id=QN5PG5M-JYYZFR7-ECUMUYY-NSCQDN4-2YX7PBK-NSD5XYO-THOJ25R-DQSZAQV
  5. after this actions i have error that https://mydomein.com:8443/ not found. If i write for the experiment https://mydomein.com:8443 only, have an error in ssh-client “http: TLS handshake error from [2a00:f940:1:1:2::c1d]:35468: remote error: tls: bad certificate” as it should be. But i can’t understand why discovery server not found after ID has pointed out.

What i’ve done incorrect ? help me plz.


(Antony Male) #4

Screenshot of the Global Discovery Servers bit of the UI? Make sure you’ve set the server correctly?


(ekvvp) #5

is that ?


(Audrius Butkevicius) #6

You might need domain.com/v2/?id=…

Or just /v2?id= The docs might be outdated


(Simon) #7

Either what @AudriusButkevicius said or use the 0.14.44 release of the discovery server.


(ekvvp) #8

Thx for answers.

Realy works on 0.14.44 release as pointed out in docs.

Tried …/v2/?id=… on 0.14.5, no result. But 0.14.44 solved the problem.


#9

On the releases page: https://github.com/syncthing/discosrv/releases

0.14.44 was released (2/8/18) after 0.14.5 (8/23/17).

Is 0.14.44 the preferred version for a discovery server when downloading from releases page?

Debian Sid uses 0.14.46. Am sure when Syncthing lists another release for manual downloading any confusion will be cleared up.


#10

How to use this link https://discosrv.tk:8443/?id=554GCWZ-7TSUAIF-UEZPIWY-6AVBFKD-D77HEDC-6MT2QMO-KC542YI-EKUX2AC? where the setting for discovery server ?

i set this link in settings>connections>Global Discovery servers but it dont help


(Jakob Borg) #11

0.14.44 is the latest, recommended version. That it doesn’t get the “latest release” badge is a quirk of there not being any source in that actual repo and should be fixed…


#12

download 0.14.44 but when I run it he updated on last version how stop update before run ?


(Jakob Borg) #13

You should run the latest Syncthing, which is 0.14.47. The discussion about 0.14.44 above is for the discovery server, which you should not run.


(ekvvp) #14

Have a VPS and domain with valid CA-signed SSL certificate. In accordance with docs i have to change settings as https://disco.example.com, without any ID, 443 by default. After i’ve done it, there are no any errors “global@…” or something about “TLS handshake error from [2a00:f940:1:1:2::193]:53488: remote error: tls: bad certificate” in ssh-client, but haven’t any connections too, all devices are disconnected (discovery server address for all the same).

Why is synchronization not occured in this case ?


(Jakob Borg) #15

Expand the devices and see if the address shows any discovery results. See if those addresses make sense.


(ekvvp) #16

In my case…

…and in another case by default settings (remote device with my domain adress in the settings, without any “@global” errors too). In case of usage default setting on both devices all is ok as it should be.