2016-07-04 10:51:22 +00:00
|
|
|
stdiscosrv
|
|
|
|
==========
|
2014-07-30 20:15:16 +00:00
|
|
|
|
|
|
|
This is the global discovery server for the `syncthing` project.
|
|
|
|
|
2015-03-25 07:16:52 +00:00
|
|
|
Usage
|
|
|
|
-----
|
2014-08-02 07:03:38 +00:00
|
|
|
|
2015-07-21 22:56:27 +00:00
|
|
|
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:
|
|
|
|
|
|
|
|
```bash
|
2016-07-04 10:51:22 +00:00
|
|
|
$ stdiscosrv -db-dsn="file:///var/run/stdiscosrv.db"
|
2015-07-21 22:56:27 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
For `postgres`, you will need to create a database and a user with permissions
|
2016-07-04 10:51:22 +00:00
|
|
|
to create tables in it, then start the stdiscosrv as follows:
|
2015-03-25 07:16:52 +00:00
|
|
|
|
|
|
|
```bash
|
2016-07-04 10:51:22 +00:00
|
|
|
$ export STDISCOSRV_DB_DSN="postgres://user:password@localhost/databasename"
|
|
|
|
$ stdiscosrv -db-backend="postgres"
|
2015-03-25 07:16:52 +00:00
|
|
|
```
|
|
|
|
|
2015-07-21 22:56:27 +00:00
|
|
|
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.
|
2015-03-25 07:16:52 +00:00
|
|
|
|
2016-07-04 10:51:22 +00:00
|
|
|
See `stdiscosrv -help` for other options.
|
2017-01-10 07:50:11 +00:00
|
|
|
|
|
|
|
##### Third-party attribution
|
|
|
|
|
|
|
|
[cznic/lldb](https://github.com/cznic/lldb), Copyright (C) 2014 The lldb Authors.
|