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

# Agent sources

> Point an Agent at your own artifact mirror, snapshot archives, and Ethereum checkpoint endpoint instead of public origins

On an open network an Agent downloads client binaries from each project's public releases, bootstraps Tron from public snapshots, and checkpoint-syncs Lighthouse from public endpoints. On a closed network none of these are reachable. The `[sources]` section of `agent.toml` replaces each with a source you run: an **artifact mirror**, **snapshot** archives, and **checkpoint** endpoints.

These settings work on any Agent — a Cloud Agent included — but they're designed for closed networks, where the [Self-hosted install](https://docs.novacula.io/recipes/self-hosted/install.md) sets them up. `agent.toml` is read once at startup: after editing it, run `systemctl restart nvcl-agent`.

```toml theme={null}
[sources]
mirror = "file:///srv/nvcl-mirror"

[[sources.checkpoint]]
chain = "ethereum"
network = "mainnet"
url = "http://beacon.example.local:5052"

[[sources.snapshot]]
chain = "tron"
network = "mainnet"
variant = "lite"
url = "file:///srv/snapshots/tron/LiteFullNode_output-directory.tgz"
sha256 = "<64 hex digits>"
```

## Artifact mirror

With `mirror` set, the Agent downloads node binaries, their bundled Java runtime, detached signatures, apt repository keys, and its own self-update tarball **from the mirror only — never from the public origin**:

```toml theme={null}
[sources]
mirror = "file:///srv/nvcl-mirror"   # or https://files.example.local/nvcl-mirror, or http://...
```

* **Layout.** The mirror holds each file at `<mirror>/<origin-host>/<origin-path>`, with the path percent-decoded on disk (a `jdk-25.0.3%2B9` directory in a URL is `jdk-25.0.3+9` on disk). The chain packs and the platform archive in the delivery kit already carry their `mirror/` trees in this layout — you only copy them in.
* **A missing file fails the install**, naming the mirror path; the origin is never tried.
* **Pinned digests only.** A client version without a digest pinned in the Agent's catalog is refused under a mirror, since a checksum file from the same mirror would vouch for nothing. Self-update is checked against the sha256 registered with the release.
* **What's offered.** Under a mirror the Agent advertises as installable only what a chain pack carries: per client, the newest pinned version each network installs. Older versions keep running on the nodes already on them, but an update that keeps one of them isn't offered.
* **No symlinks.** Keep the tree free of them — `curl` follows one out of a `file://` mirror.
* **No credentials in the URL.** It appears in the Agent log and in the download errors the console shows; a URL with userinfo or a query is refused at startup.

The Tron event plugin and its tools also come from the mirror, in the same layout.

### Serve the mirror

* **`file://`** — the same tree at `/srv/nvcl-mirror` on every Agent host, mounted read-only over NFS or copied, for example from the Hub host with `tar -C /srv -cf - nvcl-mirror | ssh root@<agent host> tar -C /srv -xf -`. The Agents use `mirror = "file:///srv/nvcl-mirror"`.
* **http(s)** — a static site, for example nginx on the mirror host. Serve only the mirror; keep snapshots and anything else off this site:

  ```nginx theme={null}
  server {
      listen 443 ssl;
      server_name files.example.local;

      ssl_certificate     /etc/nginx/tls/files.crt;
      ssl_certificate_key /etc/nginx/tls/files.key;   # 0600, owned by root

      autoindex off;
      disable_symlinks on;

      location /nvcl-mirror/ {
          alias /srv/nvcl-mirror/;
      }
      location / {
          return 404;
      }
  }
  ```

  The Agents then use `mirror = "https://files.example.local/nvcl-mirror"`. For a certificate from your internal CA, the Agents need that CA in [`[tls] ca_file`](#ca-file) too.

### Check the mirror

`agent mirror-check` lists every file the Agent's catalog needs for the chains you name that the mirror lacks, and exits non-zero — before a node needs one. It needs no config file:

```bash theme={null}
/opt/nvcl/agent/bin/agent mirror-check --mirror file:///srv/nvcl-mirror --chains bitcoin,ethereum,tron
```

| Flag | Meaning |
| - | - |
| `--mirror` | The mirror exactly as the Agents reach it: `file:///`, `http://`, `https://`, or a path |
| `--chains` | The chains whose packs you loaded; a chain the mirror can carry nothing for fails too |
| `--ca-file` | For an https mirror under your CA: the same PEM as `[tls] ca_file` |
| `--agent-url` | Also check the Agent's own tarball, by its original release URL |

On an http(s) mirror it checks with `HEAD`: a `404` or `410` is a missing file; any other refusal (a `403`, or a `405` where `HEAD` isn't allowed) is an error, and so is a redirect out of the mirror, since the Agents couldn't follow it. The Agent still verifies each file's digest when it installs it.

`agent artifacts --chains <list>` prints the whole inventory as JSON, including the client versions a mirror can't serve and why.

### Not covered by the mirror

These still go to their public origins and fail on a closed network unless you provide them another way:

* **apt packages** — point the host's apt sources at your own apt mirror.
* **Container images** — used by nodes on the **Docker** [runtime](https://docs.novacula.io/docs/nodes/deploy-a-node.md#runtime-agent-only).
* **Snapshots and checkpoint endpoints** without a `[sources]` entry — see below.

## Snapshots

`[[sources.snapshot]]` names the archive a chain's node bootstraps from instead of its public snapshot source — one entry per chain, network, and optional variant. Today it's used by **Tron**, and by **Ethereum** for `reth` on `mainnet`.

| Key | Meaning |
| - | - |
| `chain` | `tron` or `ethereum` |
| `network` | e.g. `mainnet` |
| `variant` | Optional. Tron: none for a Full node, `"lite"` for a Lite node. Ethereum: `"reth"` |
| `url` | `file:///...`, `https://...`, or `http://...` |
| `sha256` | The archive's digest. Required for Tron; must be absent for the `reth` entry |

Keep snapshot files in a root-owned directory **outside every node's data directory**, for example `/srv/snapshots`. A `file:` archive is read where it is and never deleted: the Agent hashes it, then `tar` reads it again by path. A file replaced in between is detected and the attempt retried — but whoever can write that directory can keep a bootstrap from finishing.

> [!NOTE]
>
> The config is read once at startup. A refreshed archive needs its new `sha256` **and** an Agent restart.

### Tron snapshots

Obtain the archive from the Tron snapshot providers on a connected machine, check it against the provider's published checksum, and move it into the closed network. Add one entry for a Full node and one with `variant = "lite"` for a Lite node:

```toml theme={null}
[[sources.snapshot]]
chain = "tron"
network = "mainnet"
url = "file:///srv/snapshots/tron/<full node archive>.tgz"
sha256 = "<64 hex digits>"

[[sources.snapshot]]
chain = "tron"
network = "mainnet"
variant = "lite"
url = "file:///srv/snapshots/tron/LiteFullNode_output-directory.tgz"
sha256 = "<64 hex digits>"
```

Tron needs a `sha256` for an `https` archive too. A node whose entry has none is refused at planning, and a node of that kind doesn't start again — after a restart or an update — until the entry is fixed. Https snapshots are downloaded with `aria2`, so install it on Tron hosts.

### reth snapshot

A `reth` node on `mainnet` downloads its database with `reth download`. The `reth` variant names the snapshot manifest (`manifest.json`) that `reth` reads instead of discovering one at `snapshots.reth.rs`. Only the `mainnet` entry is used.

```toml theme={null}
[[sources.snapshot]]
chain = "ethereum"
network = "mainnet"
variant = "reth"
url = "file:///srv/snapshots/reth/mainnet/manifest.json"   # or https://...
```

This entry takes **no `sha256`**: `reth` checks the files it extracts against the BLAKE3 sums the manifest lists. An entry with one is refused at planning, and a `mainnet` `reth` node doesn't start until it's fixed. `reth`, not the Agent, reads the manifest and fetches every archive it names, `file://` paths included — trust the manifest's host as you trust the mirror. A manifest copied from `snapshots.reth.rs` carries a public `base_url`: point it at your copy, or remove it so `reth` looks for the archives next to the manifest.

`reth` on `sepolia` and `hoodi` starts from a public snapshot no `[sources]` entry replaces, so it can't sync on a closed network — run `geth` or `besu` there.

## Ethereum checkpoint

Lighthouse starts from a checkpoint it fetches from a beacon node. `[[sources.checkpoint]]` names the **one** endpoint the Agent uses for a chain and network; the public checkpoint endpoints are then never contacted. Add one per network the host runs:

```toml theme={null}
[[sources.checkpoint]]
chain = "ethereum"
network = "mainnet"
url = "http://beacon.example.local:5052"   # or https://...
```

* Use a beacon node of your own, or — without one — a single public provider that needs no key, and allow only it through your firewall.
* Before it starts an Ethereum node on that network, the Agent checks the endpoint with the block and state requests Lighthouse makes, reusing a result for up to five minutes.
* An endpoint that **hasn't answered since the Agent started fails the node**, naming the URL, until it does. One that answered keeps being used if it dies later. The last working endpoint isn't remembered across restarts: after a reboot with the endpoint down, every Ethereum node on that network waits until it answers.
* The URL is `http` or `https`; a trailing `/` is dropped. It appears in the Agent log and in the reasons the console shows, so userinfo or a query is refused at startup — and keep tokens out of the path too.

## CA file

The Agent ships its own Java runtime, which doesn't read the OS trust store. To reach a Hub, an https mirror, a snapshot host, or a checkpoint endpoint behind your internal CA, name the CA in `[tls] ca_file`:

```toml theme={null}
[tls]
ca_file = "/etc/nvcl/hub-ca.pem"
```

It's added to the runtime's default roots, so public hosts still verify. The Agent refuses to start when the path isn't absolute or isn't a readable PEM certificate. `install.sh` writes it for you from `NVCL_CA_FILE`. See [CA trust](https://docs.novacula.io/recipes/self-hosted/proxy-and-tls.md#ca-trust).

## Related

* [Install](https://docs.novacula.io/recipes/self-hosted/install.md) · [Upgrade](https://docs.novacula.io/recipes/self-hosted/upgrade.md)
* [Provision on bare metal](https://docs.novacula.io/recipes/provision-on-bare-metal.md) — the rest of `agent.toml`.
* [Tron](https://docs.novacula.io/docs/chains/tron.md) · [Ethereum](https://docs.novacula.io/docs/chains/ethereum.md)


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