> ## Content Index
> Fetch the complete content index at: https://snubmonkey.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Change the Pi-hole v6 Web Session Timeout.
- URL: https://snubmonkey.com/pihole-v6-session-timeout/
- Published: 2025-04-10T19:16:07.000Z
- Updated: 2026-10-22T23:20:41.000Z
- Description: Adjust how long Pi-hole v6 keeps an inactive web session open, and learn how that differs from API session limits and DNS query limits. Includes verified settings and commands.
- Author: SNUBmonkeyteam
- Tags: tips

# 

[Pi-hole](https://pi-hole.net/?ref=snubmonkey.com) v6 lets you choose how long an inactive web interface session remains valid. The setting is separate from the limit on concurrent API sessions and from the DNS resolver’s forwarded-query limit.  

## Change the web session timeout

Pi-hole v6 stores FTL settings in `/etc/pihole/pihole.toml`. The default web session timeout is 1,800 seconds (30 minutes). The web interface refreshes an active session, so this setting applies when the session is inactive.

You can change the value in **Settings → All settings → Webserver & API**. Or use the FTL configuration command. For a one-hour timeout:

```sh
$ sudo pihole-FTL --config webserver.session.timeout 3600

```

Common values:

| Seconds | Duration   |
| ------- | ---------- |
| 1800    | 30 minutes |
| 3600    | 1 hour     |
| 86400   | 24 hours   |
| 604800  | 7 days     |
| 2592000 | 30 days    |

Check the configured value with:

```sh
$ sudo pihole-FTL --config webserver.session.timeout

```

The FTL configuration command validates and applies settings. Directly editing `pihole.toml` is also possible, but use the web interface or CLI where practical to reduce the chance of invalid configuration.

A longer timeout is more convenient, but an unattended authenticated browser session may remain usable for longer. Choose a duration appropriate for who can access the device and dashboard.

## Session timeout is not an API session limit

The `webserver.session.timeout` setting controls the lifetime of an inactive web session. The separate `webserver.api.max_sessions` setting controls how many concurrent API sessions are allowed. Its documented default is 16.

That API limit does not control how many DNS queries Pi-hole can process at once.

## DNS forwarded-query limit

If FTL reports that the maximum number of concurrent DNS queries has been reached, changing the web session timeout or API session limit will not address it. The dnsmasq directive `dns-forward-max` controls the maximum number of concurrent forwarded queries.

Investigate the warning and your DNS workload before raising the limit. If you decide to add the directive through Pi-hole v6’s `misc.dnsmasq_lines` setting, first inspect the existing value:

```sh
$ sudo pihole-FTL --config misc.dnsmasq_lines

```

The setting is an array of dnsmasq configuration lines. If the array is empty, you can set it like this:

```sh
$ sudo pihole-FTL --config misc.dnsmasq_lines '["dns-forward-max=300"]'

```

This replaces the entire `misc.dnsmasq_lines` array. If it already contains entries, include those existing lines in the new array so you do not remove them. This is an advanced setting: invalid or conflicting dnsmasq directives can stop DNS service. Increasing the limit also uses more resources under load, so do it only when the warning reflects a real capacity issue.

##   
Verify and troubleshoot

Read the relevant value after changing it:

```sh
$ sudo pihole-FTL --config webserver.session.timeout
$ sudo pihole-FTL --config misc.dnsmasq_lines

```

If a configuration change causes a problem, consult the FTL log and generate a debug log for troubleshooting:

```sh
$ sudo pihole -d

```

Avoid restarting FTL unnecessarily. A restart briefly interrupts DNS service for clients using that Pi-hole instance. The FTL configuration interface applies settings and handles the required service restart.

## 

Use `webserver.session.timeout` to control inactive dashboard sessions. Use `webserver.api.max_sessions` only when you need to change the number of concurrent API sessions, and investigate `dns-forward-max` only when addressing forwarded DNS query capacity. These settings solve different problems, so adjust only the one that matches the behavior you are troubleshooting.

We hope this was helpful.  
**Keep learning.** Keep **exploring. Stay secure.**