# Advanced server settings

A few server settings have no place in the web page: extra public host names, and how much history and activity log the wall keeps. Whoever runs the server changes them offline.

## Change them

1. Stop qKVM.
2. Write a small JSON file, `server-settings.json` say:

```json
{"allowed_hosts": ["kvm.example.com"], "history_days": 90, "history_mb": 200, "activity_mb": 100}
```

3. As the account that runs qKVM, apply it with the server's storage key:

```sh
qkvm --data-dir /path/to/data --vault-key-file /path/to/private/vault.key --configure-server server-settings.json
```

4. Start qKVM again.

## The settings

| Setting | What it does | Default |
|---|---|---|
| `allowed_hosts` | Public host names the wall answers to besides its own. Replaces the whole list; an empty list removes them all. | None |
| `history_days` | Days of history kept | 90 |
| `history_mb` | The most history kept, in MB | 200 |
| `activity_mb` | The most activity log kept, in MB | 50 |

## Rules

- Only these four fields are taken. Fields you leave out stay as they are.
- Write host names without a scheme, path, port or wildcard.
- The command refuses to run while qKVM runs on that folder, and checks both copies of the settings before it changes anything.
- It cannot change accounts, passwords, two-factor sign-in or permissions.
- Never edit `qkvm.json` or `qkvm.bak` by hand: they are encrypted.

Names under `ts.net` need no entry: qKVM answers them already. See [Over Tailscale or NetBird](https://qkvm.com/docs/web/over-tailscale-or-netbird).

## Related

- [Command line](https://qkvm.com/docs/web/command-line)
- [History](https://qkvm.com/docs/web/history)
- [Activity log](https://qkvm.com/docs/web/activity-log)

[Full reference](https://github.com/qkvm/qkvm/blob/main/GUIDE.md#advanced-server-settings)
