---
title: "Configuration"
description: "Defaults, where Regent keeps its files, and environment variables."
---

> Documentation Index
> Fetch the complete documentation index at: https://regent.c4n.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration

## Defaults

```sh
regent config
```

```
SETTING    VALUE
network    not set: regent create asks
agents     not set: regent create asks
share      not set: regent create asks
git        Ada Lovelace <ada@example.com>
rex-app    copy  (copies the address for Rex.app after create)
idle-stop  off
```

| Key | Values |
| --- | --- |
| `network` | `tailnet` or `ssh` |
| `agents` | IDs separated by commas, `detected` or `none` |
| `share` | Items separated by commas, or `none` |
| `git` | `'Name <email>'` or `off` |
| `rex-app` | `copy` or `off` |
| `idle-stop` | A duration like `30m`, or `off` |

`regent config unset KEY` works for every key above. It forgets the default, so `create` asks
again (`git` forgets the identity too); `rex-app` goes back to `copy`.

## Files

| Path | What it holds |
| --- | --- |
| `~/.config/regent/config.toml` | Defaults and tailnet credentials (as references) |
| `~/.config/regent/ssh/NAME.conf` | The `regent-NAME` ssh entry, one file per environment |
| `~/.ssh/config` | One `Include ~/.config/regent/ssh/*.conf` line at the top, added once; the file before it is kept as `~/.ssh/config.before-regent` |
| `~/.local/state/regent/NAME` | Each environment's metadata and ssh key |
| `~/.local/state/regent` | Also snapshots, the egress proxy's lists and log, the last trace, locks (`_locks`), and the update check (`update.json`, `version`) |
| `~/.local/share/regent/shared` | Shared logins |

Regent respects `XDG_CONFIG_HOME`, `XDG_STATE_HOME` and `XDG_DATA_HOME` in place of
`~/.config`, `~/.local/state` and `~/.local/share`.

## Tailnet credentials

Credentials are references, never values: `op://Vault/Item/field` (1Password),
`keychain:SERVICE/ACCOUNT`, `file:PATH` or `env:NAME`.

```toml
[tailscale]
oauth_client_id     = "op://Personal/Tailscale Regent/Client ID"
oauth_client_secret = "op://Personal/Tailscale Regent/Client secret"
auth_key            = "op://Personal/Tailscale Regent/Auth Key"   # fallback
```

With an OAuth client (scopes `devices:core` and `auth_keys`, write, for `tag:regent`), Regent
creates a one-time key for each environment and deletes its device on `rm`.

## Environment variables

| Variable | What it does |
| --- | --- |
| `REGENT_INTEGRATIONS` | `rex,herdr`, `herdr`, `none`: which integrations to use |
| `REGENT_ASCII=1` | ASCII instead of Unicode glyphs |
| `REGENT_NO_UPDATE_CHECK=1` | Don't look for a new release (Regent checks once a day, in a terminal; never in CI) |
| `NO_COLOR` | No colour |
| `REGENT_TRACE=1` | Record where the time went; read it with `regent trace` |
| `REGENT_TS_OAUTH_CLIENT_ID` | Overrides `oauth_client_id` in `config.toml`: the ID or a reference to it |
| `REGENT_TS_OAUTH_CLIENT_SECRET` | Overrides `oauth_client_secret`: a reference to the secret |
| `REGENT_TS_AUTHKEY_REF` | Overrides `auth_key`: a reference to a reusable `tag:regent` auth key |
| `REGENT_TS_AUTHKEY_FILE` | A file holding the auth key, used when no `auth_key` is set (after it, Regent tries the Keychain item `regent`/`tailscale-authkey`) |
| `OP_ACCOUNT` | The 1Password account for `op://` references; when it isn't set, `op_account` in `config.toml` (`regent tailnet setup --op-account`) |

Source: https://regent.c4n.dev/docs/reference/configuration/index.mdx
