syncthing/cmd/discosrv
Audrius Butkevicius f83ae630c1 Merge pull request #31 from syncthing/http
Allow plain HTTP serving behind a proxy
2015-11-08 12:26:05 -05:00
..
clean.go Add relay support, add ql support 2015-07-23 19:12:40 +01:00
db.go Add relay support, add ql support 2015-07-23 19:12:40 +01:00
LICENSE GPL->MIT 2015-03-25 08:07:33 +01:00
main.go Allow plain HTTP serving behind a proxy 2015-11-07 16:01:31 +01:00
psql.go New discovery protocol over HTTPS 2015-09-20 22:00:19 +02:00
ql.go New discovery protocol over HTTPS 2015-09-20 22:00:19 +02:00
querysrv.go Allow plain HTTP serving behind a proxy 2015-11-07 16:01:31 +01:00
README.md Correct example DSN (fixes #29) 2015-11-08 14:53:39 +01:00
stats.go Errors should not increment for ever 2015-09-12 22:44:59 +02:00

discosrv

Latest Build

This is the global discovery server for the syncthing project.

To get it, run go get github.com/syncthing/discosrv 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:

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

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

$ export DISCOSRV_DB_DSN="postgres://user:password@localhost/databasename"
$ discosrv -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 discosrv -help for other options.