# Administration

> Health, Workers, Logs, API Keys, the admin account, updates, and where MTConnect Server keeps its files.

URL: https://www.trakhound.com/docs/mtconnect-server/administration

The App's **System** section shows the health of MTConnect Server and the computer it runs on, the status of its Workers, and its Logs. This page also covers the Admin Account, API Keys, updates, and where MTConnect Server keeps its files.

## System Pages

| Page | Shows |
| --- | --- |
| **System > Health** | The health of the computer and the Instance MTConnect Server runs on, with each check's status and details, and the Instance version |
| **System > Workers** | The Collection and Agent Hub Workers, with their status, CPU, uptime, restarts, errors logged, and last error. **Restart**, **Stop**, or **Start** a Worker, or open its Logs |
| **System > Logs** | What the Workers, Api, Services, and Instance have logged. Filter by source, Device, and level, follow new entries, and download them |
| **System > API Keys** | The Keys other systems use the [REST API](https://www.trakhound.com/docs/mtconnect-server/api) with (standalone installs only) |

The App's header shows the status of the Collection and Agent Hub Workers (**Running**, **Starting**, **Stopping**, **Stopped**, or **Error**). Hover over it to see each Worker's status and how long it's been in it. Each Device's page also has a **Logs** tab with its entries from the Workers.

## API Keys

1. Go to **System > API Keys** and click **Create API Key**.
2. Enter a **Name**, choose when it **Expires** (Never, in 30 days, in 90 days, or in 1 year), and create it.
3. **Copy the Key now.** It can't be shown again.

Send it in the `X-API-Key` header, or as `Authorization: Bearer <key>`. A Key can use the whole API, but not the App or the Instance's System API, and it can't manage other Keys. **Revoke** a Key to stop everything using it immediately.

## Admin Account

Everything in MTConnect Server requires signing in, except the Agent Hub's MTConnect port. The Admin Account is set in the installer (`/ADMINUSERNAME=` and `/ADMINPASSWORD=` for a silent install). To reset its password, run this in the install directory, on the same computer, from an Administrator command prompt. The password is read from standard input:

```
TrakHound.MTConnectServer.exe set-admin <username>
```

Each user can choose a **Light** or **Dark** theme with the button in the App's header.

## Updates

When a newer version is available, the App's header shows **Update** with the new version next to the installed version. Click it to download the installer, and run it to [upgrade](https://www.trakhound.com/docs/mtconnect-server/installation#upgrade). The App checks `https://applications.trakhound.com` every few hours, and skips the check without internet access.

| Parameter | Default | Description |
| --- | --- | --- |
| `updateCheck` | `true` | `false` turns off the update check |
| `updatePrerelease` | `false` | `true` also offers Prerelease versions |

Both are parameters in the App's configuration, in `config\default\app` in the install directory.

## Files and Services

| Item | Location or Value |
| --- | --- |
| Install directory | `C:\Program Files\TrakHound\MTConnectServer` |
| Configuration | `config\default` in the install directory |
| Licenses | `config\default\licenses\trakhound.json` |
| Logs | `logs` in the install directory |
| SQLite databases (default) | `data` in the install directory |
| Windows Service | `TrakHound-MTConnectServer` (TrakHound MTConnect Server), running `TrakHound.MTConnectServer.exe` |
| Ports | `8490` (App and API) and `5001` (Agent Hub), by default |

## TrakHound Admin

MTConnect Server is a [TrakHound Instance](https://www.trakhound.com/docs/trakhound-framework/instances). Its TrakHound Admin interface (`/_admin`) is disabled, so the Instance only serves MTConnect Server. To enable it, set `adminInterfaceEnabled: true` in `config\default\instance.config.yaml` in the install directory, and restart the `TrakHound-MTConnectServer` Service. The Admin still requires signing in.
