|
| 1 | +# Config |
| 2 | + |
| 3 | +## Config settings |
| 4 | + |
| 5 | +| Property | Description | Default | |
| 6 | +|---------------------|-------------|---------| |
| 7 | +| ConfigFile | Path and filename to the config file | OS dependent | |
| 8 | +| LogFileMain | Path and filename to the main log file | stdout | |
| 9 | +| LogFileHTTPError | Path and filename to the HTTP error log | stdout | |
| 10 | +| LogFileHTTPAccess | Path and filename to the HTTP access log | stdout | |
| 11 | +| ControlsFiles | Path of the directory containing controls files | OS dependent | |
| 12 | +| ListenPort | Local TCP port where loxwebhook will listen. You can choose any [valid](https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers) and free local port as long as loxwebhook is reachable on port 443 from the public internet. | 443 | |
| 13 | +| PublicURI | URI (host and domain) where loxwebhook will be reachable on the public internet | none | |
| 14 | +| LetsEncryptCache | Path of the directory where we will store the Let's Encrypt cache. It's important to keep the cache during restarts to avoid hitting Let's Encrypt [rate limits](https://letsencrypt.org/docs/rate-limits/) | `./cache/letsencrypt` | |
| 15 | +| MiniserverURL | URL to reach the Loxone Miniserver including protocol and port `http://192.168.123.1:80` | none | |
| 16 | +| MiniserverUser | Username to access the Loxone Miniserver | `admin` | |
| 17 | +| MiniserverPassword | Password to access the Loxone Miniserver | `admin` | |
| 18 | +| MiniserverTimeout | Timeout (seconds) for requests to Loxone Miniserver | 2 | |
| 19 | + |
| 20 | +## Set config values |
| 21 | + |
| 22 | +You can set config values in a config file, set environment variables or set flags when you start loxwebhook. |
| 23 | + |
| 24 | +Settings in environment variables will overwrite settings in a config file and settings given by flags will overwrite both. |
| 25 | + |
| 26 | +## Config file |
| 27 | + |
| 28 | +You can use `config.example.toml` ([online](https://github.com/axxelG/loxwebhook/blob/master/config.example.toml)) as a starting point |
| 29 | + |
| 30 | +The default location for the config file depends on the operating system. |
| 31 | + |
| 32 | +- Windows: `.\config.toml` |
| 33 | +- Other (Linux): `/etc/loxwebhook/config.toml` |
| 34 | + |
| 35 | +You can set a custom file location via environment variable or by flag |
| 36 | + |
| 37 | +- Environment variable: Set `LOXWEBHOOK_CONFIG` to `<path>/<filename>` |
| 38 | +- Flag: Call `loxwebhook --config <path>/<filename>` |
| 39 | + |
| 40 | +## Environment variables |
| 41 | + |
| 42 | +- Must be prefixed with `LOXWEBHOOK_` |
| 43 | +- Must be all uppercase |
| 44 | + |
| 45 | +Examples: |
| 46 | + |
| 47 | +- Windows: |
| 48 | + - cmd `set LOXWEBHOOK_LISTENPORT=1234` |
| 49 | + - powershell `$env:LOXWEBHOOK_LISTENPORT = 1234` |
| 50 | +- Linux: `export LOXWEBHOOK_LISTENPORT=1234` |
| 51 | + |
| 52 | +## Flags |
| 53 | + |
| 54 | +Use `loxwebhook -h` to get a list with all possible flags |
0 commit comments