From 4cb06d791bba54c74fe46d1197c384c50df6927c Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Thu, 26 Sep 2024 13:35:41 +0000 Subject: [PATCH] Reorganise the docker configuration page a little Signed-off-by: Adam Warner --- docs/docker/configuration.md | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/docs/docker/configuration.md b/docs/docker/configuration.md index f302abe0..ecb31a00 100644 --- a/docs/docker/configuration.md +++ b/docs/docker/configuration.md @@ -20,21 +20,36 @@ To set a specific password for the web interface, use the environment variable ` - Supports non-standard ports with #[port number] e.g `127.0.0.1#5053;8.8.8.8;8.8.4.4` - Supports Docker service names and links instead of IPs e.g `upstream0;upstream1` where upstream0 and upstream1 are the service names of or links to docker services -### Optional Variables +### Configuring FTL Via The Environment -#### `FTLCONF_[SETTING]` +While FTL's configuration file can be manually edited, set via the CLI (`pihole-FTL --config setting.name=value`), or set via the web interface - the recommended approach is to do this via environment variables -Set various `pihole.toml` settings via environment variable for persistence. Follows the syntax as setting a value on the CLI, e.g `pihole-FTL --config key.setting=value`. Replace `.` with `_` in the setting name, and prepend with `FTLCONF_` +As with the recommended examples above for the web password and DNS upstreams, the syntax is `FTLCONF_[section_][setting]` -For example, setting `FTLCONF_dns_dnssec: 'true'` is the functional equivalent of running `pihole-FTL --config dns.dnssec=true`, or setting the following in the toml file +Given the below `toml` formatted example from `pihole.toml`, we can translate this to the environment variable `FTLCONF_dns_dnssec` ```toml [dns] dnssec = true ``` -!!! info - FTL settings that are set via environment variables effectively become read-only, meaning that you will not be able to change them via the web interface or CLI. This is to ensure a "single source of truth" on the config. If you later unset or remove an environment variable, then FTL will revert to the default value for that setting +!!! note + All FTL settings that are set via environment variables effectively become read-only, meaning that you will not be able to change them via the web interface or CLI. This is to ensure a "single source of truth" on the config. If you later unset or remove an environment variable, then FTL will revert to the default value for that setting + + +An example of how some of these variables may look in your compose file + +```yaml + environment: + TZ: europe/London + FTLCONF_dns_revServers: 'true,192.168.0.0/16,192.168.0.1,lan' + FTLCONF_dns_upstreams: '8.8.8.8;8.8.4.4' + FTLCONF_webserver_api_password: 'correct horse battery staple' + FTLCONF_webserver_port: '8082,443s' + FTLCONF_debug_api: 'true' +``` + +### Other Variables #### `TAIL_FTL_LOG` (Default: `1`) @@ -51,8 +66,6 @@ Overrides image's default pihole group id to match a host group id !!! Warning For the above two settings, the `id` must not already be in use inside the container! -### Advanced Variables - #### `FTL_CMD` (Default: `no-daemon`) Customize the options with which dnsmasq gets started. e.g. `no-daemon -- --dns-forward-max 300` to increase max. number of concurrent dns queries on high load setups.