Jakob Borg 3176629410 cmd, lib: Fix ineffectual assignments (ineffasign) and comment spelling 9 years ago
..
LICENSE 6ff74cfcab build, cmd/stdiscosrv, cmd/strelaysrv: Rename binaries to add "st" prefix 9 years ago
README.md 6ff74cfcab build, cmd/stdiscosrv, cmd/strelaysrv: Rename binaries to add "st" prefix 9 years ago
clean.go 6ff74cfcab build, cmd/stdiscosrv, cmd/strelaysrv: Rename binaries to add "st" prefix 9 years ago
db.go 6ff74cfcab build, cmd/stdiscosrv, cmd/strelaysrv: Rename binaries to add "st" prefix 9 years ago
main.go 6ff74cfcab build, cmd/stdiscosrv, cmd/strelaysrv: Rename binaries to add "st" prefix 9 years ago
psql.go 3176629410 cmd, lib: Fix ineffectual assignments (ineffasign) and comment spelling 9 years ago
ql.go 6ff74cfcab build, cmd/stdiscosrv, cmd/strelaysrv: Rename binaries to add "st" prefix 9 years ago
querysrv.go 6ff74cfcab build, cmd/stdiscosrv, cmd/strelaysrv: Rename binaries to add "st" prefix 9 years ago
stats.go 6ff74cfcab build, cmd/stdiscosrv, cmd/strelaysrv: Rename binaries to add "st" prefix 9 years ago

README.md

stdiscosrv

Latest Build

This is the global discovery server for the syncthing project.

To get it, run go get github.com/syncthing/stdiscosrv or download the latest build from the build server.

Usage

The discovery server supports ql and postgres backends. Specify the backend via -db-backend and the database DSN via -db-dsn.

By default it will use in-memory ql backend. If you wish to persist the information on disk between restarts in ql, specify a file DSN:

$ stdiscosrv -db-dsn="file:///var/run/stdiscosrv.db"

For postgres, you will need to create a database and a user with permissions to create tables in it, then start the stdiscosrv as follows:

$ export STDISCOSRV_DB_DSN="postgres://user:password@localhost/databasename"
$ stdiscosrv -db-backend="postgres"

You can pass the DSN as command line option, but the value what you pass in will be visible in most process managers, potentially exposing the database password to other users.

In all cases, the appropriate tables and indexes will be created at first startup. If it doesn't exit with an error, you're fine.

See stdiscosrv -help for other options.