Skip to content

Commit

Permalink
Reorganise the docker configuration page a little
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Warner <[email protected]>
  • Loading branch information
PromoFaux committed Sep 26, 2024
1 parent 5834322 commit fde1448
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions docs/docker/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`)

Expand All @@ -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.
Expand Down

0 comments on commit fde1448

Please sign in to comment.