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 -->
5 `xds-server` configuration is driven by a JSON config file (`server-config.json`).
7 Here is the logic to determine which `server-config.json` file will be used:
9 1. from command line option: `--config myConfig.json`
10 1. `$HOME/.xds/server/server-config.json` file
11 1. `/etc/xds/server/server-config.json` file
12 1. `<xds-server executable dir>/server-config.json` file
14 Supported fields in configuration file are:
16 - **httpPort** : HTTP port of client webapp/REST API
17 - **webAppDir** : location of client web application (default: webapp/dist)
18 - **shareRootDir** : root directory where projects will be copied
19 - **logsDir** : directory to store logs (eg. syncthing output)
20 - **sdkScriptsDir** : directory where scripts, used to managed SDKs, are installed
21 - **sdkDbUpdate** : define how SDK database(s) is(are) updated, supported values are:
22 `disable`, `startup` (default: `startup`)
23 - **syncthing.binDir** : syncthing binaries directory (default: executable directory)
24 - **syncthing.home"** : syncthing home directory (usually .../syncthing-config)
25 - **syncthing.gui-address** : syncthing gui url (default <http://localhost:8385>)
26 - **syncthing.gui-apikey** : syncthing api-key to use (default auto-generated)
28 All fields are optional and example below corresponds to the default values.
33 "webAppDir": "webapp/dist",
34 "shareRootDir": "${HOME}/.xds/server/projects",
35 "logsDir": "/tmp/logs",
36 "sdkScriptsDir": "${EXEPATH}/scripts/sdks",
37 "sdkDbUpdate": "startup",
40 "home": "${HOME}/.xds/server/syncthing-config",
41 "gui-address": "http://localhost:8385",
42 "gui-apikey": "123456789",
49 >Environment variables are supported by using `${MY_VAR}` syntax.
52 When `xds-server` is started as a systemd service, default environment variables
53 are set into `/etc/default/xds-server` file.
55 `xds-server` configuration is also driven by a JSON config file (`server-config.json`),
56 and default JSON config is `/etc/xds/server/server-config.json`.
60 You can use your own JSON config by settings `APP_CONFIG` variable of
61 `/etc/default/xds-server` file to your file, for example `/home/MYUSER/.xds/server/server-config.json`
62 <!-- end-section-note -->
66 `CloudSync` synchronization type based on `syncthing` tool can be disabled by
67 simply removing (or renaming) `"syncthing"` key in configuration file.
68 Here is a JSON configuration file example where syncthing key as been renamed:
73 "webAppDir": "webapp/dist",
74 "shareRootDir": "${HOME}/.xds/server/projects",
75 "logsDir": "/tmp/logs",
76 "sdkScriptsDir": "${EXEPATH}/scripts/sdks",
77 "syncthing_DISABLE": {
79 "home": "${HOME}/.xds/server/syncthing-config",
84 On benefit to do that is to increase XDS-Server startup time.
89 - `CloudSync` (AKA syncthing) synchronization type can also be disabled when `"syncthing"` key is not defined in JSON configuration file.
91 <!-- end-section-note -->