> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agent.golf/llms.txt
> Use this file to discover all available pages before exploring further.

# Install Uplink

> Create an Uplink key and run a Self-Hosted Uplink instance in Docker, in Kubernetes, or on a Linux or macOS host.

Create an Uplink key, give it to Uplink, and start Uplink in your network. One Self-Hosted Uplink instance can serve the sessions of many users.

**Settings > Uplink > Self-Hosted** shows the same start commands in the **Uplink Instance Setup** card: **Docker**, **Kubernetes**, and **Linux / macOS**.

One shared Uplink instance in your VPC. Developer machines, CI runners, and remote workstations send OTLP over HTTPS to it. It runs as a systemd service on a Linux host and connects out to Agent Golf.

A single Uplink instance can serve many developers. Give it a persistent disk for the state directory, a TLS
certificate for port 4318, and outbound access to Agent Golf. The container image runs the same way.

## Before you install

* An Agent Golf workspace. See [Create an Account](https://docs.agent.golf/getting-started/create-account.md).
* The **Manage Uplink Keys** permission, to create the Uplink key. See [Default roles](https://docs.agent.golf/account/users.md#default-roles).
* A Docker host, a Kubernetes cluster, or a [supported](#supported-systems) Linux or macOS host.
* On a Linux or macOS host, [cosign](https://docs.sigstore.dev/cosign/system_config/installation/) in a directory of `PATH`. The install script uses it to check the release signature, and stops without it.
* A persistent, encrypted disk for the [state directory](https://docs.agent.golf/uplink/overview.md#state-directory).
* Outbound access to `api.agent.golf` on port 443 and to the Agent Golf data connection on port 7422. See [Network](https://docs.agent.golf/uplink/network.md).
* Inbound access to port 4318 from the machines where your harnesses run.

## Supported systems

| System | Requirements |
| - | - |
| Linux | `amd64` or `arm64` with glibc 2.34 or later. Tested on Ubuntu 22.04, 24.04, and 26.04, Debian 13, Red Hat Enterprise Linux 9 and 10, and Amazon Linux 2023. |
| macOS | macOS 26 or 27 on Apple silicon (`arm64`). |
| Docker | `linux/amd64` or `linux/arm64`. Docker and Kubernetes pull the image for the host architecture. |

Windows, Intel Macs, and Linux distributions with musl libc, such as Alpine Linux, are not supported. Uplink supports an operating system release only while its vendor gives it full support.

Every release is on the [Uplink releases page](https://github.com/agentgolf/uplink/releases). The [latest release](https://github.com/agentgolf/uplink/releases/latest) is always at the same link.

## Create an Uplink key

An Uplink key (`agu_...`) starts an uplink instance without a person signing in. The key belongs to your workspace, so the instance keeps running when a person leaves. Many uplink instances can use the same key.

Create the key in one of these ways:

* **In the dashboard.** Open **Settings > Uplink > Self-Hosted**. In the **Keys That Start Uplink Instances** card, enter a **Key Name**, for example the cluster or host that runs Uplink, and select **Create Uplink Key**. Copy the secret, then select **Hide Secret**. Agent Golf keeps only a digest and cannot show the secret again.

* **With `uplink auth create-key -name <name>`.** The command prints only the secret, so you can pipe it straight into a secret store. For example, to put the key in a Kubernetes Secret in a new `uplink` namespace:

  ```bash theme={null}
  kubectl create namespace uplink
  uplink auth create-key -name prod-cluster | \
    kubectl --namespace uplink create secret generic uplink-key --from-file=uplink-key=/dev/stdin
  ```

* **With `uplink auth login -key`.** Run it where Uplink runs, with the same user, environment, and volume: in the container, in the pod, or on the host. The command names the key after the host, or after `-name`, and saves it in the `uplink-key` file in the state directory. A waiting uplink instance finds the file and starts. You do not restart it.

Both commands sign you in once to create the key, and keep no sign-in:

1. The command prints a sign-in URL and a code.
2. Open the URL in a browser where you are signed in to Agent Golf. On **Approve a Device**, confirm that **Device Code** matches the code in the terminal. Approve only codes from commands that you started.
3. Select the workspace in **Workspace**, then select **Approve**.
4. If your account has more than one organization, or more than one workspace in the organization, the terminal asks which one to use. Enter the number.

Keep the secret out of files that go into a repository.

### How Uplink reads the key

* Uplink reads the key from `AGENTGOLF_UPLINK_KEY`, from the file in `AGENTGOLF_UPLINK_KEY_FILE`, or from the `uplink-key` file in the state directory. Uplink does not start with both variables set. See [Uplink key](https://docs.agent.golf/uplink/configuration.md#uplink-key).
* Uplink reads a key file again before it gets each access token, so a changed file or Secret takes effect without a restart.
* Without a key, or with a key file that holds no usable key, Uplink keeps running but stays not ready and starts no engines. See [Troubleshoot Uplink](https://docs.agent.golf/uplink/troubleshooting.md#uplink-has-no-uplink-key).
* A value in `AGENTGOLF_UPLINK_KEY` that does not start with `agu_` stops Uplink at start. See [Uplink stops because the key variable holds no Uplink key](https://docs.agent.golf/uplink/troubleshooting.md#uplink-stops-because-the-key-variable-holds-no-uplink-key).
* When you revoke a key in **Settings > Uplink > Self-Hosted**, each uplink instance that uses it stops within 10 minutes. After a restart, it waits until it has a usable key.

## Install and start Uplink

> [tab] Docker
>
> The image is `ghcr.io/agentgolf/uplink`. Each release has two tags: `<version>` and `uplink-v<version>`. The Helm chart uses `uplink-v<version>`.
>
> ```bash theme={null}
> docker run -d --name uplink --restart on-failure \
>   -e AGENTGOLF_UPLINK_KEY=<uplink-key> \
>   -p 4318:4318 -p 127.0.0.1:4319:4319 \
>   -v uplink-state:/data/.ag-uplink \
>   ghcr.io/agentgolf/uplink:<version>
> ```
>
> | Option | Purpose |
> | - | - |
> | `--restart on-failure` | Starts Uplink again after it exits with an error. Uplink needs a [restart policy](#use-a-restart-policy). |
> | `-e AGENTGOLF_UPLINK_KEY` | The Uplink key. To keep the key out of the container settings, mount a file, for example a Docker secret, and set `AGENTGOLF_UPLINK_KEY_FILE` to its path. |
> | `-p 4318:4318` | The OpenTelemetry listener for your harnesses. To publish it only on the host loopback, use `-p 127.0.0.1:4318:4318`. |
> | `-p 127.0.0.1:4319:4319` | The admin listener for `/healthz`, `/readyz`, and `/metrics`. See [Secure the admin listener](https://docs.agent.golf/uplink/network.md#secure-the-admin-listener). |
> | `-v uplink-state:/data/.ag-uplink` | The [state directory](https://docs.agent.golf/uplink/overview.md#state-directory). Keep this volume when you upgrade or replace the container. |
>
> Follow the log with `docker logs -f uplink`.
>
> You can also start the container without `AGENTGOLF_UPLINK_KEY`, then run `docker exec -it uplink uplink auth login -key`. The command saves the key in the volume, and the waiting instance starts with it.
>
> The image runs as UID and GID `10004`. A new named volume gets the correct owner. If you mount a host directory instead, make it writable by UID `10004`. To change a setting, such as TLS, add an `-e` option and run the container again. See [Configuration](https://docs.agent.golf/uplink/configuration.md).

> [tab] Kubernetes
>
> The Helm chart is `oci://ghcr.io/agentgolf/charts/uplink`. The chart version is the Uplink version, and the chart uses the image from the same release. Store the Uplink key in a Secret, and name the Secret in `uplinkKey.existingSecret`:
>
> ```bash theme={null}
> kubectl create namespace uplink
> kubectl --namespace uplink create secret generic uplink-key \
>   --from-literal=uplink-key=<uplink-key>
> helm install uplink oci://ghcr.io/agentgolf/charts/uplink --version <version> \
>   --namespace uplink \
>   --set uplinkKey.existingSecret=uplink-key
> ```
>
> Replace `<version>` with the [latest release](https://github.com/agentgolf/uplink/releases/latest). Always set `--version`, so that each install and upgrade stays on a known release. To keep the key out of your shell history, create the Secret with `uplink auth create-key`, as [Create an Uplink key](#create-an-uplink-key) shows.
>
> What the chart installs:
>
> * One StatefulSet replica with a `ReadWriteOnce` volume at `/data/.ag-uplink`. From the next chart release after 0.1.46, the default size is `300Gi`, which fits about 10 developers for 90 days. Earlier chart versions default to `20Gi`, so set `persistence.size` from [Plan the disk](#plan-the-disk). The StatefulSet keeps the volume when you delete the release. An upgrade keeps the size of the existing volume.
> * A `ClusterIP` Service `uplink` with the OpenTelemetry listener on port 4318 and the local API on port 9090. The chart always turns on the local API, because its probes use it. See [Local API](https://docs.agent.golf/uplink/local-api.md#with-the-helm-chart).
> * With the release name `uplink`, the pod is `uplink-0` and the container is `uplink`.
> * Container resources: requests of `500m` CPU and `1Gi` memory, and a memory limit of `4Gi`. Set them in `resources`. See [Sizing](#sizing).
>
> Without a usable key, the pod runs but is not ready. It does not restart.
>
> Size the volume for the history that you keep. Add `--set persistence.size=<size>` to `helm install` with a size from [Plan the disk](#plan-the-disk), and keep the same value in each upgrade. Use a storage class that allows volume expansion, so that you can [grow the volume](#grow-the-disk) later.
>
> The chart README lists every value and its default, for example `otlp.tls.existingSecret` for HTTPS, `persistence.size`, `networkPolicy`, and `config` for the [Uplink settings](https://docs.agent.golf/uplink/configuration.md). Read it for the version that you install:
>
> ```bash theme={null}
> helm show readme oci://ghcr.io/agentgolf/charts/uplink --version <version>
> helm show values oci://ghcr.io/agentgolf/charts/uplink --version <version>
> ```

> [tab] Linux and macOS
>
> Install the binary, give it the key in the environment, and start `uplink`. These are the **Linux / macOS** commands from the dashboard:
>
> ```bash theme={null}
> curl -fsSL https://get.agent.golf/uplink | sh
> export AGENTGOLF_UPLINK_KEY=<uplink-key>
> uplink
> ```
>
> Uplink then runs in the terminal until you stop it. On a Linux server, [run Uplink as a systemd service](#run-uplink-as-a-systemd-service) instead.
>
> On macOS, you can also run `uplink auth login -key`, approve the sign-in, and then run `uplink`. The command saves the key in `~/.ag-uplink/prod/uplink-key`. With the default settings, Uplink accepts only harnesses on the same Mac, over plain HTTP.
>
> To install for all users, pipe the script to `sudo sh`. Without `UPLINK_INSTALL_DIR`, the script installs to `/usr/local/bin` when that directory is writable, else to `~/.local/bin`. Check the installed version with `uplink -version`.
>
> > [accordion] Install script options and signature check
> >
> > The script needs [cosign](https://docs.sigstore.dev/cosign/system_config/installation/). It checks the keyless signature of `SHA256SUMS` with cosign, then checks the archive against `SHA256SUMS`. If cosign cannot verify the signature, the script shows the cosign error and stops. When cosign is not in `PATH`, the script stops before the download and tells how to install cosign. A checksum from the same release does not prove who built the archive, so the script does not install with the checksum only. When you install with `sudo`, put cosign in a directory of root's `PATH`, for example `/usr/local/bin`.
> >
> > | Environment variable | Purpose |
> > | - | - |
> > | `UPLINK_VERSION` | Install this version instead of the latest release. |
> > | `UPLINK_INSTALL_DIR` | Install into this directory. The script creates it when it does not exist. |
> > | `UPLINK_REPOSITORY` | Download from this repository URL, for example a mirror. The default is `https://github.com/agentgolf/uplink`. |
> > | `UPLINK_REQUIRE_SIGNATURE` | Set to `1` to stop when `UPLINK_SKIP_SIGNATURE` is also `1`. |
> > | `UPLINK_SKIP_SIGNATURE` | Set to `1` to install without the signature check. The script warns. |
> >
> > The script stops when `UPLINK_REQUIRE_SIGNATURE` and `UPLINK_SKIP_SIGNATURE` are both `1`. For example, to install a specific version into `/opt/uplink/bin`:
> >
> > ```bash theme={null}
> > curl -fsSL https://get.agent.golf/uplink | sudo UPLINK_VERSION=<version> UPLINK_INSTALL_DIR=/opt/uplink/bin sh
> > ```
>
> > [!WARNING]
> >
> > The signature check does not protect the one-line install. `https://get.agent.golf/uplink` redirects to the
> > latest release's `install.sh`, which is an asset of the same release as the archives and `SHA256SUMS`. Anyone
> > who can change the release assets or intercept the download can also replace `install.sh`, and the replaced
> > script runs with `sudo` before any check. For CI and enterprise installs, use the [verified
> > install](#verified-install).

## Run Uplink as a systemd service

1. Install the binary for all users, so that it is in `/usr/local/bin`:

   ```bash theme={null}
   curl -fsSL https://get.agent.golf/uplink | sudo sh
   ```

   Without `sudo`, the script installs to `~/.local/bin` when `/usr/local/bin` is not writable, and the unit below does not find the binary.

2. Create a system user for the service:

   ```bash theme={null}
   sudo useradd --system --home-dir /var/lib/uplink --shell /usr/sbin/nologin uplink
   ```

3. Create `/etc/uplink/uplink.env` with mode `0600`, owned by root, and put the Uplink key in it. systemd reads this file before it starts the service, so the `uplink` user does not need to read it.

   ```bash theme={null}
   AGENTGOLF_UPLINK_KEY=<uplink-key>
   OTLP_HTTP_HOST=0.0.0.0
   OTLP_TLS_CERT_FILE=/etc/uplink/tls/cert.pem
   OTLP_TLS_KEY_FILE=/etc/uplink/tls/key.pem
   ```

   `OTLP_HTTP_HOST=0.0.0.0` lets harnesses on other machines reach the listener, and the TLS files turn on HTTPS. The `uplink` user must be able to read the TLS files. When the harnesses run on the Uplink host, remove these three lines. See [Network](https://docs.agent.golf/uplink/network.md).

4. Create `/etc/systemd/system/uplink.service`. If you set `UPLINK_INSTALL_DIR`, change `ExecStart` to that directory.

   ```ini theme={null}
   [Unit]
   Description=Agent Golf Uplink
   Wants=network-online.target
   After=network-online.target

   [Service]
   User=uplink
   Group=uplink
   EnvironmentFile=/etc/uplink/uplink.env
   Environment=HOME=/var/lib/uplink
   StateDirectory=uplink
   StateDirectoryMode=0700
   ExecStart=/usr/local/bin/uplink
   Restart=on-failure
   RestartSec=5
   TimeoutStopSec=45

   [Install]
   WantedBy=multi-user.target
   ```

5. Start the service:

   ```bash theme={null}
   sudo systemctl daemon-reload
   sudo systemctl enable --now uplink
   ```

The state directory is then `/var/lib/uplink/.ag-uplink/prod`. Read the log with `journalctl -u uplink`.

## Use a restart policy

In some recovery cases, Uplink exits with a non-zero status, for example after a revoked Uplink key or a credential change. Its service manager must then start it again. Always run Uplink with a restart policy, such as `Restart=on-failure` in systemd or `--restart on-failure` in Docker. The Helm chart has one.

## Verified install

Use this procedure for CI and enterprise installs. It checks `install.sh` against the signed `SHA256SUMS` before it runs the script.

> [accordion] Verify the install script
>
> Install cosign first, in a directory on root's `PATH`, for example `/usr/local/bin`, because `sudo` can change `PATH`. Set `version` to the release that you install:
>
> ```bash theme={null}
> (
>   set -eu
>   version=<version>
>   script_tag=$(curl -fsSLI -o /dev/null -w '%{url_effective}' https://github.com/agentgolf/uplink/releases/latest)
>   base=https://github.com/agentgolf/uplink/releases/download/${script_tag##*/}
>
>   curl -fsSLO "$base/install.sh"
>   curl -fsSLO "$base/SHA256SUMS"
>   curl -fsSLO "$base/SHA256SUMS.sigstore.json"
>
>   cosign verify-blob SHA256SUMS \
>     --bundle SHA256SUMS.sigstore.json \
>     --certificate-identity https://github.com/agentgolf/monorepo/.github/workflows/uplink-chart-publish.yml@refs/heads/main \
>     --certificate-oidc-issuer https://token.actions.githubusercontent.com
>
>   sha256sum --check --ignore-missing SHA256SUMS
>   grep -q UPLINK_REQUIRE_SIGNATURE install.sh
>   sudo UPLINK_VERSION="$version" UPLINK_REQUIRE_SIGNATURE=1 sh install.sh
> )
> ```
>
> `set -eu` stops the subshell at the first command that fails, so `sudo` runs `install.sh` only after each check passes:
>
> * `cosign verify-blob` stops when the release workflow did not sign `SHA256SUMS`.
> * `sha256sum --check` stops when `install.sh` does not match `SHA256SUMS`. On macOS, use `shasum -a 256 --check --ignore-missing SHA256SUMS`.
> * `grep -q` stops when `install.sh` has no signature check.
> * `UPLINK_REQUIRE_SIGNATURE=1` makes the script stop when `UPLINK_SKIP_SIGNATURE=1` is also set in the environment. The script then checks the signature for `version` before it checks the archive.
>
> `script_tag` is the latest release tag, so the procedure checks the latest `install.sh`. To pin the script too, set `script_tag` to a known release tag, for example `v<version>`.

> [accordion] Verify the download yourself
>
> To install without the script, download the archive for your system from the release page, then check it. The archive name carries the version: `uplink-v<version>-linux-amd64.tar.gz`, `uplink-v<version>-linux-arm64.tar.gz`, or `uplink-v<version>-darwin-arm64.tar.gz`. Set `version` to the release that you install:
>
> ```bash theme={null}
> (
>   set -eu
>   version=<version>
>   base=https://github.com/agentgolf/uplink/releases/download/v$version
>   archive=uplink-v$version-linux-amd64.tar.gz
>
>   curl -fsSLO "$base/$archive"
>   curl -fsSLO "$base/SHA256SUMS"
>   curl -fsSLO "$base/SHA256SUMS.sigstore.json"
>
>   cosign verify-blob SHA256SUMS \
>     --bundle SHA256SUMS.sigstore.json \
>     --certificate-identity https://github.com/agentgolf/monorepo/.github/workflows/uplink-chart-publish.yml@refs/heads/main \
>     --certificate-oidc-issuer https://token.actions.githubusercontent.com
>
>   sha256sum --check --ignore-missing SHA256SUMS
>   tar -xzf "$archive"
>   sudo install -m 0755 uplink /usr/local/bin/uplink
> )
> ```
>
> On macOS, use `shasum -a 256 --check --ignore-missing SHA256SUMS`.

## Sizing

Resource use depends on how many developers run agents at the same time and on whether the harnesses send content. Start from these estimates for one active developer with content on, then size from your instance's dashboard data.

| Resource | Estimate for one active developer |
| - | - |
| CPU | About 10% of one core while agents run. |
| Memory | 0.4 to 0.9 GiB resident. |
| Disk | About 0.25 GiB for each day of history that you keep. See [Disk space](#disk-space). |

For a shared instance, start with 2 vCPU and 4 GiB of memory. The Helm chart requests less by default. Scale up when the instance shows memory or CPU pressure. If harnesses get HTTP 429, see [The harness gets HTTP 429 or 413](https://docs.agent.golf/uplink/troubleshooting.md#the-harness-gets-http-429-or-413).

## Disk space

Uplink keeps all session data that it stores. It sets no limit on the data that it stores, and it does not delete stored sessions on its own, so its disk use grows for the life of the instance. Raw telemetry uses disk only until Uplink processes it. For the backlog limits, see [Monitoring](https://docs.agent.golf/uplink/monitoring.md#alerts).

### Plan the disk

| Developers | 30 days | 90 days | 180 days | 1 year |
| - | - | - | - | - |
| 5 | 60 GiB | 160 GiB | 300 GiB | 590 GiB |
| 10 | 110 GiB | 300 GiB | 580 GiB | 1.2 TiB |
| 25 | 250 GiB | 720 GiB | 1.4 TiB | 2.8 TiB |
| 50 | 490 GiB | 1.4 TiB | 2.8 TiB | 5.6 TiB |
| 100 | 950 GiB | 2.8 TiB | 5.6 TiB | 11.2 TiB |

The table counts 0.25 GiB for each developer for each calendar day, adds 10 GiB of working space, and keeps 20% of the disk free. Agent Golf measured about 0.21 GiB for each developer for each day on its own Self-Hosted Uplink instances, with Uplink 0.1.43 to 0.1.46 and a developer who runs several agents at the same time for most of the day. Developers who run fewer agents use less disk. After the first week, find your own rate: divide the total under **Storage** on the instance page by the days and by the developers.

The working space holds the write-ahead log of the session database (about 1.2 GiB), the space that the database uses to merge its files (1.6 GiB for each thread of `UPLINK_RECORD_STORE_THREADS`), and the raw telemetry backlog when Uplink falls behind (at most 5 GiB by default).

If you write backups with `uplink backup` to the same disk, add space for them. A backup can grow to the size of the stored data. See [State directory](https://docs.agent.golf/uplink/overview.md#state-directory).

By default, Uplink limits its buffers to 75% of the free disk at start, and `UPLINK_NATS_MAX_FILE_STORE` sets a fixed limit. The stored sessions are in an embedded database that has no limit. See [Storage](https://docs.agent.golf/uplink/configuration.md#storage).

### Watch disk use

Uplink does not report the free space of its disk, and it does not warn before the disk is full. Monitor the free space yourself, and alert when less than 20% of the disk is free.

* **Dashboard:** **Storage** under **Capacity** on the instance page shows the disk use of Uplink and its split. It does not show the size of the disk or its free space.
* **Linux, macOS, or Docker host:** `df -h <state directory>` shows the free space of the disk, and `du -sh <state directory>` shows the use of Uplink. With Docker, `docker system df -v` shows the size of the `uplink-state` volume.
* **Kubernetes:** the Uplink image has no shell, so `kubectl exec` cannot run `df`. Use the kubelet volume metrics, when your storage driver reports them. For example, in Prometheus:

  ```promql theme={null}
  kubelet_volume_stats_available_bytes{namespace="uplink", persistentvolumeclaim="data-uplink-0"}
    / kubelet_volume_stats_capacity_bytes{namespace="uplink", persistentvolumeclaim="data-uplink-0"}
    < 0.2
  ```

### Grow the disk

Grow the disk before it is full. The stored sessions stay on the disk.

**Kubernetes.** The storage class of the volume must allow expansion. This command shows `true` when it does:

```bash theme={null}
kubectl get storageclass <storage-class> -o jsonpath='{.allowVolumeExpansion}'
```

Then set the new size on the claim:

```bash theme={null}
kubectl --namespace uplink patch pvc data-uplink-0 \
  --patch '{"spec":{"resources":{"requests":{"storage":"750Gi"}}}}'
```

When the storage driver supports online expansion, the file system grows while the pod runs. Otherwise, it grows at the next start of the pod. `kubectl --namespace uplink get pvc data-uplink-0` shows the new capacity when the expansion is complete.

The claim keeps its new size through upgrades. `helm upgrade` keeps the size of the claim template that you installed with, also when `persistence.size` has another value. Argo CD and `helm template` cannot read the cluster, so they use `persistence.size`. With them, keep `persistence.size` at the size that you installed with: Kubernetes does not let a StatefulSet change its claim template, so an update with a different size fails.

When the storage class cannot expand volumes, move the data to a new claim:

1. Stop Uplink: `kubectl --namespace uplink scale statefulset uplink --replicas=0`.
2. Create a larger claim in a storage class that allows expansion.
3. Copy all files from `data-uplink-0` to the new claim with their owner and permissions, for example with a pod that mounts both claims and runs `cp -a`.
4. Set `persistentVolumeReclaimPolicy: Retain` on both volumes. Delete both claims, and remove `spec.claimRef` from the new volume. Then create the claim `data-uplink-0` again, with the storage class and the size of the new volume and with `spec.volumeName` set to it.
5. Start Uplink: `kubectl --namespace uplink scale statefulset uplink --replicas=1`.

Uplink starts as the same instance, because the copy holds its instance ID and its keys. Keep the old volume until new sessions show in **Sessions**.

**Docker and hosts.** Grow the disk or the file system of the state directory with the tools of your platform, for example a larger cloud disk and then `resize2fs` or `xfs_growfs`. To move to a larger disk, stop Uplink, copy the state directory with `cp -a`, and start Uplink on the new disk. With Docker, mount the new directory or volume at `/data/.ag-uplink`. Keep the old copy until new sessions show in **Sessions**.

### When the disk is full

When the disk is full, Uplink stops storing data:

* The session database refuses its writes. Uplink logs `uplink exiting` with `engine agent-session-storage failed` and `No space left on device`, and exits. Uplink can also log a line that ends with `will be DISABLED`.
* The service manager starts Uplink again. While the disk stays full, Uplink can stop again at each start.
* Harnesses get HTTP 503 or cannot connect. Each harness retries for a limited time and then drops the telemetry, so Uplink never gets it.
* Uplink keeps the sessions that it stored before. At the next start with free space, the session database recovers from its write-ahead log.

To recover without loss of stored data:

1. Do not delete files in the state directory to free space. For example, the `.log` files in the `records` directory are the write-ahead log of the session database.
2. Grow the disk. See [Grow the disk](#grow-the-disk). On a host, you can also free space outside the state directory.
3. If Uplink does not start on its own, restart it.
4. Make sure that **Health** on the instance page shows no engine down, and that new sessions show in **Sessions**.

After the restart, Uplink processes the raw telemetry that it accepted before the disk was full. By default, it deletes raw telemetry that it did not process in 48 hours (`MAX_OTLP_RAW_AGE_SECS`), so recover within that time.

## Metrics that Uplink does not store

Uplink accepts some omp and Codex metrics with success but does not store them, because Agent Golf makes no data from them. Uplink stores the other metrics, for example the Claude Code metrics, and all logs and traces. The GitHub Copilot metrics carry no session ID, so Agent Golf makes no session data from them. Agent Golf uses no Codex metrics, so turn them off in Codex. See [Codex](https://docs.agent.golf/harnesses/codex.md).

> [accordion] Dropped metrics and how to count them
>
> Uplink drops a metric when its name is in this list:
>
> | Harness | Metric names |
> | - | - |
> | omp | `gen_ai.client.token.usage`, `omp.agent.chat.calls`, `omp.agent.chat.cost.estimated_usd`, `omp.agent.chat.duration`, `omp.agent.errors`, `omp.agent.runs`, `omp.agent.steps`, `omp.agent.tool.calls`, `omp.agent.tool.duration` |
> | Codex | `codex.app_server.codex_home.size_bytes`, `codex.auth_storage.duration`, `codex.auth_storage.operation`, `codex.process.start`, `codex.remote_models.fetch_update.duration_ms`, `codex.sqlite.init.count`, `codex.sqlite.init.duration_ms`, `codex.sqlite.logs.write.bytes`, `codex.sqlite.logs.write.count`, `codex.sqlite.logs.write.duration_ms`, `codex.sqlite.logs.write.entries`, `codex.sqlite.logs.write.max_entry_bytes` |
>
> Uplink keeps a listed gauge or sum metric when one of its data points has a `gen_ai.conversation.id` or `conversation.id` attribute or an exemplar, because Agent Golf can make session data from that point.
>
> The counter `uplink_ingestion_dropped_metric_points_total` on `/metrics` counts the dropped data points, with the metric name in its `name` label. Uplink also sends this counter to Agent Golf with its health reports, unless you set `UPLINK_METRICS_PUSH=false`. The counter holds only listed metric names and point counts. The dropped metric data does not leave the instance.
>
> ```bash theme={null}
> curl -s http://127.0.0.1:4319/metrics | grep uplink_ingestion_dropped_metric_points_total
> ```

## Require a publishing key

Uplink refuses an export without a well-formed user publishing key (`agk_...`) with HTTP 401, and no setting turns this off. It also refuses a revoked key. At start and every minute, it reads the revoked keys of its workspace from Agent Golf. It keeps the last list in its state directory. Each user needs a key in each harness. See [Publishing keys](https://docs.agent.golf/harnesses/overview.md#publishing-keys) and [The harness gets HTTP 401](https://docs.agent.golf/uplink/troubleshooting.md#the-harness-gets-http-401).

## Next steps

1. [Verify the installation](https://docs.agent.golf/uplink/verify.md) to confirm that the uplink instance connects.
2. Create a publishing key and connect each harness. Open **Settings > Uplink > Publishing Keys**, or run `agentgolf harness setup <harness> --endpoint <uplink-listener>`. See [Connect a Harness](https://docs.agent.golf/harnesses/overview.md).
3. Run a task in the harness, and find the session in **Sessions**.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.