Simplified doc-site generation
[AGL/documentation.git] / docs / ATTIC / 3_Developer_Guides / 4_X(cross)_Development_System:_User's_Guide / 4_X(cross)_Development_System:_ Internals / 3.4.4.3_xds-agent / 3.4.4.3.2_Config.md
1 <!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/devguides/master/xds-docs-guides-devguides-book.yml -->
2
3 # Configuration
4
5 xds-agent configuration is driven by a JSON config file.
6
7 The tarball mentioned in previous section includes this file with default settings.
8
9 Here is the logic to determine which conf file will be used:
10
11 1. from command line option: `--config myConfig.json`
12 1. `$HOME/.xds/agent/agent-config.json` file
13 1. `/etc/xds/agent/agent-config.json` file
14
15 Supported fields in configuration file are (all fields are optional and example
16 below corresponds to the default values):
17
18 - **httpPort** : http port of agent REST interface
19 - **webAppDir** : location of client webapp / dashboard (default: webapp/dist)
20 - **logsDir**  : directory to store logs (eg. syncthing output)
21 - **xdsServers** : an array of xds-server object
22   - **xdsServers.url**: url of xds-server to connect to
23 - **syncthing**: a object defining syncthing settings
24   - **syncthing.binDir** : syncthing binaries directory (default: executable directory)
25   - **syncthing.home"** : syncthing home directory (usually .../syncthing-config)
26   - **syncthing.gui-address** : syncthing gui url (default <http://localhost:8386>)
27   - **syncthing.gui-apikey** : syncthing api-key to use (default auto-generated)
28
29 ```json
30 {
31     "httpPort": "8800",
32     "webAppDir": "./www",
33     "logsDir": "${HOME}/.xds/agent/logs",
34     "xdsServers": [
35         {
36           "url": "http://localhost:8000"
37         }
38     ],
39     "syncthing": {
40         "home": "${HOME}/.xds/agent/syncthing-config",
41         "gui-address": "http://localhost:8386",
42         "gui-apikey": "1234abcezam"
43     }
44 }
45 ```
46
47 >**Note:**
48 >
49 >environment variables are supported by using `${MY_VAR}` syntax.