!!! info
    The last image of the Pi-hole docker container which contained v5.x Pi-hole components was [`2024.07.0`](https://github.com/pi-hole/docker-pi-hole/releases/tag/2024.07.0)
    <br><br>
    Versions after this will be based on v6.x Pi-hole components.

## Changed Environment Variables

Nearly all environment variables from previous versions have been removed, but functionality can be replicated by setting their `FTLCONF_` equivalent instead. (See [Configuration](../configuration.md#configuring-ftl-via-the-environment) page for more details)

### Misc

|Old Variable|New Variable|
|:-------------|:-------------|
|`CUSTOM_CACHE_SIZE`|`FTLCONF_dns_cache_size`|
|`DNS_BOGUS_PRIV`|`FTLCONF_dns_bogusPriv`|
|`DNS_FQDN_REQUIRED`|`FTLCONF_dns_domainNeeded`|
|`DNSMASQ_LISTENING`|`FTLCONF_dns_listeningMode`|
|`DNSSEC`|`FTLCONF_dns_dnssec`|
|`INTERFACE`|`FTLCONF_dns_interface`|
|`PIHOLE_DNS_`|`FTLCONF_dns_upstreams`|
|`QUERY_LOGGING`|`FTLCONF_dns_queryLogging`|
|`WEBPASSWORD`|`FTLCONF_webserver_api_password`|
|`WEB_PORT`|`FTLCONF_webserver_port`|
|`WEBTHEME`|`FTLCONF_webserver_interface_theme`|
|`WEBUIBOXEDLAYOUT`|`FTLCONF_webserver_interface_boxed`|

### DHCP Variables

|Old|New|
|:--|:--|
|`DHCP_ACTIVE`|`FTLCONF_dhcp_active`|
|`DHCP_START`|`FTLCONF_dhcp_start`|
|`DHCP_END`|`FTLCONF_dhcp_end`|
|`DHCP_ROUTER`|`FTLCONF_dhcp_router`|
|`DHCP_LEASETIME`|`FTLCONF_dhcp_leaseTime`|
|`PIHOLE_DOMAIN`|`FTLCONF_dns_domain`|
|`DHCP_IPv6`|`FTLCONF_dhcp_ipv6`|
|`DHCP_rapid_commit`|`FTLCONF_dhcp_rapidCommit`|

### Conditional Forwarding Variables

Reverse server (`REV_SERVER*`) variables should be replaced with the single `FTLCONF_dns_revServers`, which accepts an array of reverse servers (delimited by `;`) in the following format:

```text
<enabled>,<ip-address>[/<prefix-len>],<server>[#<port>],<domain>
```

If, for example, you had the following old style variables:

- `REV_SERVER: 'true'`
- `REV_SERVER_DOMAIN: 'lan'`
- `REV_SERVER_TARGET: '192.168.0.1#53'`
- `REV_SERVER_CIDR: '192.168.0.0/24'`

You would now set:

```text
FTLCONF_dns_revServers: 'true,192.168.0.0/24,192.168.0.1#53,lan'
```

### Custom dnsmasq config files

By default, Pi-hole v6 no longer reads configuration files from `/etc/dnsmasq.d/`. If you want Pi-hole to read files from this location you should:

1. Mount the local folder containing the config files into `/etc/dnsmasq.d` into the container
2. Set the environment variable `FTLCONF_misc_etc_dnsmasq_d: 'true'`

If you only want to add a single/few `dnsmasq` config lines you can use the variable `FTLCONF_misc_dnsmasq_lines`. Each line should be separated with `;`

### Removed Variables

The following variables can be removed without replacement, as they are no longer used:

- `CONDITIONAL_FORWARDING`
- `CONDITIONAL_FORWARDING_DOMAIN`
- `CONDITIONAL_FORWARDING_IP`
- `CONDITIONAL_FORWARDING_REVERSE`
- `CORS_HOSTS`
- `DNS1`
- `DNS2`
- `FTLCONF_REPLY_ADDR4`
- `FTLCONF_REPLY_ADDR6`
- `IPV6`
- `ServerIP`
- `ServerIPv6`
- `SKIPGRAVITYONBOOT`
- `TEMPERATUREUNIT`
- `VIRTUAL_HOST`
- `WEB_BIND_ADDR`
- `WEB_GID`
- `WEB_UID`
- `WEBLOGS_STDOUT`
