docs icon indicating copy to clipboard operation
docs copied to clipboard

Improve discosrv documentation for debugging

Open mcx808 opened this issue 8 months ago • 3 comments

I'm having a hard time debugging a Discovery Server install.

It's behind a Caddy proxy so I've implemented the required directives from the documentation and it seems to be working but there's not mush I can do to test the API.

I've pointed 3 clients at the base url (https://example.com/), but they are unable to discover each other. If I curl the base address of my Caddy server, or directly to the backend (https://example.com:8443/) it just returns "Not Found" without any http response header. The logs show nothing, even when calling the baseURL, but since there's no API docs I don't know what else to try.

I am running stdiscosrv-linux-arm64-v1.29.5 with the flags --http, --debug, and I also added the flag --db-dir=/data since the startup message showed Error reading database: open records.db: no such file or directory but this error still remains. Am I supposed to init a DB or something?

mcx808 avatar Apr 24 '25 18:04 mcx808

Update

Ok, I found when browsing issue https://github.com/syncthing/docs/issues/893 that syncthing/discosrv:v2 continers are maintained by syncthing, which isn't mentioned anywhere in the documentation. In order to rule out any issues with my container build from alpine, I ran this version instead, and it seems to work. Here's my compose file:

services:
  stdiscosrv:
    image: syncthing/discosrv:v2
    container_name: syncthing-discovery
    restart: always
    networks:
      - services
    entrypoint: ["/bin/stdiscosrv", "--http", "--debug"]
networks:
  services:
    external: true

I'm still frustrated by the lack of documentation though. The console now shows that this is stdiscosrv v2.0.0-beta.10.dev.11.gabe34fc1-v2 but seems to be the latest version tag that's not a beta? But it was updated 17 hours ago as of today, so is this solution not fully maintained?

mcx808 avatar Apr 24 '25 19:04 mcx808

The v2 branch of Syncthing is still in beta. I'd recommend sticking to v1 until we release v2.0.0 :)

bt90 avatar Apr 24 '25 19:04 bt90

Ah ok, I misread the version. Will redeploy the latest/1.29 tag.

mcx808 avatar Apr 24 '25 19:04 mcx808