# Settings

**Tools > Settings...** (Ctrl+,) opens the Settings window. It is also in the notification-area menu
(**Settings...**), in the taskbar Jump List (**Settings**) and on the command line (`tktail settings`). Every
way opens the same window; when it is already open, it comes to the front.

*Screenshot: Settings: the General page*

- The **categories** are on the left. **Search settings** above them finds an option on any page -
  type *tray*, *retention*, *MCP*, *font* - and lists every match with its page.
- Changes are kept in the window until you choose **OK** (apply and close) or **Apply** (apply and keep the
  window open). **Cancel** discards what you changed since the last Apply.
- A value that is not accepted - a number out of its range, text where a number belongs - is marked in red
  under it, and OK / Apply say what to correct; nothing is saved until it is right.
- Most changes work at once. Options marked **Applies when TKTail starts again** take effect at the next
  start; after Apply the window lists which ones. Options under *New views* apply to the files and views you
  open afterwards - **View** menu toggles change the tab in front.
- **Restore Defaults...** resets the values of the page you are on (after a confirmation); nothing is saved
  until OK or Apply, and Windows entries (autostart, Explorer) are not changed by it.
- **Help** (or F1) opens this page.

*Screenshot: Settings in the dark theme*

Settings are saved in `settings.ini` in TKTail's [data folder](https://tktail.dev/help/data-and-privacy/). The Startup and Windows
Integration pages show and change Windows itself (your user's startup entry, Explorer menu, shortcuts) - they
are not stored in `settings.ini`.

With [linked windows](https://tktail.dev/help/windows/) open, Settings opens in the main window and its changes reach every window.
In safe mode (`--safe-mode`) changes apply to that session only and are not saved.

## General

| Option | What it changes | Default |
|---|---|---|
| Reuse the running TKTail for files opened from Explorer or the command line | Off: every start opens a separate TKTail. *Next start.* | On |
| Restore the window size and position at start | *Next start.* | On |
| Reopen the workspace at start | The tabs, splits and positions of the main window come back ([When TKTail starts again](https://tktail.dev/help/viewing-logs/#when-tktail-starts-again)). | On |
| Closing the window | Ask every time / minimize to the notification area / exit TKTail ([Closing the window](https://tktail.dev/help/getting-started/#closing-the-window)). | Ask every time |
| Exiting while linked windows are open | Ask / close them / leave them running ([Linked windows](https://tktail.dev/help/windows/#exiting-the-main-window)). | Ask every time |
| Always show the TKTail icon in the notification area | Otherwise the icon shows while TKTail is hidden there, monitors files in the background or has unread alerts. | On |
| Minimizing hides TKTail in the notification area | | Off |
| Theme | Follow Windows / Light / Dark (also View > Theme). | Follow Windows |
| Viewer font | Any installed font; empty: Cascadia Mono, then Consolas. | empty |
| Font size | 6-48 pt (also Ctrl+Plus / Ctrl+Minus / Ctrl+0). | 10 pt |
| Line spacing | 0.8-3.0 times the font's own spacing. | 1.0 |
| Show the license owner's name next to the edition | The license badge and the status bar. | On |

## Startup

Whether and how TKTail starts when you sign in to Windows - read from Windows each time the page opens, see
[Windows integration](https://tktail.dev/help/windows-integration/#starting-with-windows).

| Option | What it changes | Default |
|---|---|---|
| Start TKTail when I sign in to Windows | Adds (or removes) TKTail in your user's startup programs. No administrator rights. | Off |
| Start | With the window shown / minimized / hidden in the notification area. | Hidden in the notification area |
| Repair | Shown when the entry starts another TKTail.exe (a moved portable copy): points it to this one. | |

## Viewer

| Option | What it changes | Default |
|---|---|---|
| Show line numbers | New views (View > Line Numbers changes the tab in front). | On |
| Show the observation time of each line | New views. | Off |
| Wrap long lines | New views (Alt+Z changes the tab in front). | Off |
| Follow the end of the file (LIVE) when a file opens | New views; off: a file opens paused at the top. | On |
| Encoding of new files | Detect automatically, or one encoding; View > Encoding changes one file. | Detect automatically |
| Tab width | 1-16 columns, files opened afterwards. | 4 |
| Highlight the line with the caret | | On |
| Count the lines that arrive while a view is paused | The PAUSED badge says *+n*. | On |
| LIVE shows new data at most | 10-60 frames per second; lower uses less CPU while files grow fast. New views. | 60 |
| Encoding / line endings of exported files | What File > Export proposes. | UTF-8 / as in the source |

## Monitoring

*Screenshot: Settings: Monitoring*

| Option | What it changes | Default |
|---|---|---|
| Check files every (window shown) | A safety net: Windows notifications report changes at once. 50 ms - 60 s. | 250 ms |
| Check files every (hidden in the notification area) | 100 ms - 10 min. | 2 s |
| When a log is rotated | Follow the file name (`tail -F`) or the original file (`tail -f`) - files opened afterwards; a tab can change it in the Inspector. | Follow the file name |
| Rotated files remembered per log | 1-50. *Next start.* | 5 |
| Follow dated file rotation automatically | `app_2026-10-14.log`, then `app_2026-10-15.log`: the new file becomes LIVE in the same place. A file can turn it on or off for itself (Inspector) - [Rotating dated log files](https://tktail.dev/help/rotating-dated-logs/). | On |
| Previous files of the series kept open | 0-50: the files before the LIVE one stay open next to it; 0 closes each one when the next becomes LIVE. Trial / Pro - in Free the previous file closes (following works in every edition). | 2 |
| Build the full line index automatically for files up to | Larger files are indexed on request (View > Build Full Line Index); 0: only on request. New files. | 16,384 MB |

Files on network shares have their own refresh mode, per file, in the Inspector
([Files on network shares](https://tktail.dev/help/large-and-network-files/#files-on-network-shares)). The page also says how many files are
monitored in the background ([Monitoring files in the background](https://tktail.dev/help/alerts-and-monitoring/#monitoring-files-in-the-background)).

## Search

| Option | What it changes | Default |
|---|---|---|
| Match case / Regular expression / Wrap around | The find bar's options in new views ([Search](https://tktail.dev/help/search/)). | Off / Off / On |
| Search terms remembered | 0-200. | 30 |
| Search Results sessions kept across restarts | 1-50 (their queries; results are searched again on request). *Next start.* | 10 |
| Include subfolders | Folder searches from the toolbar and the Explorer. | On |
| Threads for folder searches | 0-16; 0 = automatic. *Next start.* | 0 |

## Formats

TKTail recognizes a log's format from its content; View As, a folder's `.tktail` file and your custom formats
decide otherwise, per file or folder - there is no global format or delimiter setting
([Record formats](https://tktail.dev/help/viewing-logs/#record-formats-view-as)).

- **Custom Format Studio...** closes Settings and opens the [Studio](https://tktail.dev/help/custom-formats/).
- **Custom formats folder** - where your format profiles are (Open, Copy).
- **Favorite Formats...** - the formats listed first in View As.

## Alerts & Incidents

| Option | What it changes | Default |
|---|---|---|
| Keep a history of alerts on disk | `alerts.jsonl` in the data folder. *Next start.* | On |
| Text kept with each alert | The matching line (bounded) / only the matched text / no text. | The matching line |
| Alerts kept / kept for at most | 100-1,000,000 alerts, 1-3650 days. *Next start.* | 10,000 / 90 days |
| Recent alerts kept in memory | For the Alerts view, 1-10,000. *Next start.* | 100 |
| Show the matching text in Windows notifications | Off: the notification names the alert only. | On |
| Incidents kept / kept for at most / Evidence kept on disk up to | 10-100,000 incidents, 1-3650 days, 16-65,536 MB. Pinned incidents and incidents still capturing are always kept. *Next start.* | 1,000 / 90 days / 512 MB |
| Evidence Store up to | The evidence packages together, 16-1,048,576 MB. A package that does not fit is refused - packages are never deleted to make room ([Saving evidence](https://tktail.dev/help/saving-evidence/)). *Next start.* | 2,048 MB |
| One evidence package up to / one full-file package up to | 1-4,000 MB each. *Next start.* | 256 MB / 4,000 MB |
| Free disk space kept | 0-1,048,576 MB: a package is not saved if less would stay free. *Next start.* | 1,024 MB |
| Warn when the Evidence Store is | 50-100 % of its limit. *Next start.* | 80 % |

**Manage Alerts...** opens the list of your alerts ([Alerts and monitoring](https://tktail.dev/help/alerts-and-monitoring/)); the
alert definitions and incidents folders have Open and Copy.

## Metrics

| Option | What it changes | Default |
|---|---|---|
| Counter names | In the language of Windows / in English / both - display only. | In the language of Windows |
| Sample the METRICS panel's counters every | 1, 2, 5, 10 or 30 seconds. Needs Metrics in the license. | 1 second |
| Keep metric history in memory for | 5, 15, 30 or 60 minutes. Needs Metrics in the license. | 15 minutes |

See [Metrics](https://tktail.dev/help/metrics/). Without the capability the page says which licenses include it.

## AI Access (MCP)

The permissions of AI clients (see [AI integration](https://tktail.dev/help/mcp/)). The page says whether AI access is on, what your
license includes and whether TKTail is listening for HTTP clients.

| Option | What it changes | Default |
|---|---|---|
| Allow AI access (MCP) | AI clients you connect may read the sources open in the main window, search them, and read alerts, incidents and metrics. They change nothing unless a permission below allows it. Same as Tools > Allow AI Access (MCP). | Off |
| Allow AI to save custom formats | Save format profiles - only into your custom formats, never over a built-in one. | Off |
| Allow AI to save searches and Metric Sets | Create, change and delete your Saved Searches and your Metric Sets (never the built-in sets). | Off |
| Allow AI to manage alerts | Create, change, enable, disable and delete alerts - only on sources AI clients may read. | Off |
| Allow AI to save evidence and pin searches | Redacted evidence packages in the Evidence Store, within its limits, and pinned searches kept across restarts; an AI client can only ask to delete a package - you confirm it ([Saving evidence](https://tktail.dev/help/saving-evidence/)). | Off |
| Investigation Roots... | Folders you approve for AI clients beyond what is open in TKTail ([Extended Investigation](https://tktail.dev/help/mcp/#extended-investigation-folders-you-approve)); Trial, Pro and Developer licenses. | none |

The three "may change" permissions need AI access too; each works on its own (allowing alerts does not allow
searches). See [What AI clients may change](https://tktail.dev/help/mcp/#what-ai-clients-may-change).

**How AI clients see this TKTail** - every answer names this TKTail by its **Node ID** and the run that answered
([Which TKTail answered](https://tktail.dev/help/mcp/#which-tktail-answered)); what else it says is your choice, applied to the next answer:

| Option | What it changes | Default |
|---|---|---|
| Display name | Your name for this TKTail in every answer, for example *Order Server* (at most 64 characters). A label, not a unique key. | empty |
| Include the computer name | Answers name this computer as Windows has it configured. | Off |
| Include the Windows user name | Answers name the Windows user TKTail runs as. | Off |
| Include the user's domain | Answers name that user's domain (or this computer, for a local account). | Off |
| Node ID | Read only: this data folder's random ID - the same after a restart; another data folder or a portable copy has its own. **Copy Node ID** copies it. | |

**Connect an AI client: stdio** - every edition: the **Command** an AI client starts (`"...\TKTail.exe" mcp
--stdio`) with **Copy Command** and **Copy Client Configuration** (a JSON `mcpServers` entry).

**Connect an AI client: HTTP** - Trial, Pro and Developer licenses ([HTTP](https://tktail.dev/help/mcp/#connect-over-http)):

| Option | What it changes | Default |
|---|---|---|
| Accept AI clients over HTTP | The main window listens for MCP clients at the **Address** shown. Every request needs the token. Applies at once. | Off |
| Listen on | **This computer only** (127.0.0.1 and ::1) or **Every network interface** - the legacy network mode: MCP reachable from other computers over plain HTTP, the token and the answers not encrypted; TKTail asks you to confirm. Not recommended for new set-ups ([details](https://tktail.dev/help/mcp/#connect-over-http)). | This computer only |
| Port | 1024-65535. A port another program uses is reported in the status line; TKTail never picks another one. | 47711 |

**Copy HTTP Client Configuration** copies an `mcpServers` entry with the address and the token; **Copy Token**
copies the token alone (the page never shows it); **Regenerate Token...** makes a new one after a confirmation -
clients with the old token are refused from their next request. Turning AI access off while a client is connected
refuses its next question at once; turning HTTP off ends its connection. **AI Access Help** opens the AI guide.

## Windows Integration

Explorer's right-click menu, shortcuts, the taskbar Jump List, and **Repair** / **Remove All...** - see
[Windows integration](https://tktail.dev/help/windows-integration/). The page reads what Windows has when it opens; changes are made
on OK / Apply. The Jump List options are stored in `settings.ini`.

## Files & Storage

Where TKTail keeps each kind of data - the data folder, settings, workspace, recent files, alert definitions,
alert history, incidents, custom formats, Saved Searches, Metric Sets, the application log, the license file
in use and the temporary evidence copies - each with **Open** and **Copy**. **Change Data Folder...** and
**Use the Default Data Folder** choose where the data lives from the next start. See
[Where TKTail stores data](https://tktail.dev/help/data-and-privacy/).

## Privacy & Cleanup

| Option | What it changes | Default |
|---|---|---|
| Remember recently opened files / used folders | File > Recent Files / Folders, the Explorer, the Jump List. | On |
| Remember search terms and Search Results sessions | | On |
| Recent files / folders kept | 1-500. *Next start.* | 50 / 30 |
| Clear Recent Files / Clear Recent Folders / Clear Search History | At once, after a confirmation. | |
| Remove evidence copies | When TKTail starts / a day or a week after they were made (when TKTail starts) / only with Clean Now. *Next start.* | A day after |
| Clean Now | Removes TKTail's temporary files that nothing uses now, after listing what it touches. | |

See [Privacy and cleanup](https://tktail.dev/help/data-and-privacy/#privacy).

## Logging

The application log (also live in View > Tool Views > Output).

| Option | What it changes | Default |
|---|---|---|
| Write to the log from | Trace / Debug / Information / Warning / Error. *Next start.* | Information |
| Keep file paths in the log | Off: paths are left out of the log file (privacy). *Next start.* | Off |
| Size of one log file / Log files kept / kept for at most | 64-65,536 KB, 1-50 files, 1-365 days. *Next start.* | 1,024 KB / 5 / 14 days |

## Terminal

| Option | What it changes | Default |
|---|---|---|
| Shell of a new terminal | Automatic (PowerShell 7, Windows PowerShell, Command Prompt) or one of them. | Automatic |
| Lines kept for scrolling back | 1,000-100,000 per terminal, in memory only. New terminals. | 10,000 |

More shells can be added as `terminal.custom.N` entries in `settings.ini` (see the Terminal section of the
[Bottom panel](https://tktail.dev/help/bottom-panel/#terminal)).

## The settings file and keys (advanced)

`settings.ini` is UTF-8 text, written atomically (a crash never leaves half a file) and merged with what other
TKTail windows saved meanwhile. A line TKTail cannot read is ignored and listed in **View > Tool Views >
Problems** (Open Settings File shows it). The keys the window edits have public names -
`tktail settings list` prints them with their values and when they take effect, `tktail settings get <key>`
one ([Command line](https://tktail.dev/help/command-line/#settings-and-windows-integration)). Changing settings from the command
line is planned; use the Settings window.

---

The HTML page: https://tktail.dev/help/settings/
