On this page

5.2 Enrollment and identity

Before an agent accepts orders, it has to register with the server ("enrollment"). It receives its identity: an agent ID and a certificate from the server's own CA. This page shows how the token works, what is stored on the machine, and how to re-enroll or remove an agent. Installation itself is covered in chapter 03 Installation.

The enrollment token

Create a token in the web interface under Agents β†’ Add agent (key N). This needs at least the Operator role.

Field

Effect

Default

New machine runs

Windows or Linux; only decides which install command the dialog shows.

Windows

Address of this backup server

Name or IP address the new machine uses to reach the server (not the name of the new machine). The choices are the names in the server certificate; "(only this PC)" marks names such as localhost that do not work from other machines. If a name is missing, add it under Settings β†’ Certificate; then create a new command.

first non-local name

Note (optional)

Free text up to 120 characters, for example "Laptop Anna"; shown in the token list.

empty

Valid for

15 minutes, 1 hour, or 24 hours.

15 minutes

Add agent: command for a new PC
Add agent: command for a new PC

After Create command, the dialog shows the finished command for Windows (PowerShell as administrator) or Linux (a shell with curl, openssl, sudo, and systemd). The token is single use and expires after the chosen time. Below, Enrollment tokens lists all tokens with Created, By, Note, and State (valid until, used, expired). Right-click an unused token to delete it. Tokens of the recovery console are marked recovery; only administrators can create them (chapter 09 Restore).

Token format

A token looks like this: pdc1.<secret>.<CA fingerprint>.

  • The secret consists of 32 random bytes. The server stores only a hash of it.

  • The CA fingerprint is the SHA-256 value of the server's CA certificate. It secures even the first connection: for enrollment the agent trusts only a CA with exactly this fingerprint and cannot be redirected to a rogue server.

How enrollment works

  1. The agent generates a key pair locally and a certificate signing request (CSR) with the machine name. The private key never leaves the machine; only the request goes to the server.

  2. It connects to the server (port 8444) and checks the server's certificate against the fingerprint from the token.

  3. The server checks token and fingerprint, consumes the token, assigns a new agent ID (a UUID), signs the certificate (valid 30 days, server setting agent_cert_days), and records the agent with machine name, operating system, architecture, version, and IP address. The action is written to the audit log.

  4. The answer contains the agent ID, the certificate, the CA certificate, the server's key pins, and the public key for signed agent packages.

  5. The agent verifies that the delivered CA certificate matches the fingerprint in the token exactly and stores everything in the state folder. It remembers the package key and accepts later updates only if they are signed with it.

From then on the agent uses its certificate for every connection. It is renewed automatically before it expires (section 5.1 How an agent works), without a new token.

Files in the state folder

The folder is C:\ProgramData\PDC-Backup\agent (Windows) or /var/lib/pdc-agent (Linux), changeable with --state-dir or PDC_AGENT_DIR. On Windows the service installation restricts the folder to SYSTEM and Administrators; on Linux the key files have mode 0600.

State folder of the agent
β”œβ”€β”€ agent.toml  # server address and agent ID
β”œβ”€β”€ agent.key  # private key of the agent
β”œβ”€β”€ agent.crt  # certificate of the agent (from the server CA)
β”œβ”€β”€ ca.crt  # CA certificate of the server
β”œβ”€β”€ server.pins  # pinned server keys (SHA-256, one value per line)
β”œβ”€β”€ package.key  # public key for agent packages (Ed25519, hex)
β”œβ”€β”€ local-status.json  # last saved status for the status command
β”œβ”€β”€ logs/  # agent logs
β”œβ”€β”€ cache/  # cache of the repository indexes
β”œβ”€β”€ tmp/  # pre and post scripts
β”œβ”€β”€ update/  # working files of a self-update
β”œβ”€β”€ verify/  # test area for restore tests
β”œβ”€β”€ instant/  # overlay of an instant recovery
└── hyperv/  # change state per Hyper-V VM

agent.toml is small and holds only two keys:

server_url = "https://backup-server:8444"
agent_id = "3f0c5c3e-7d8e-4d6a-9a4b-2f1d8c6b7a10"

Key

Meaning

server_url

Agent endpoint of the server, always https:// with a port (default 8444). An address that is not in the server certificate fails with "no alternative certificate subject name matches".

agent_id

ID assigned by the server. The agent rejects unknown keys in the file.

The agent creates folders such as cache, verify, and instant only when needed. Deleting hyperv/ only means that the next Hyper-V backup reads everything again.

Server key pinning

The agent accepts the server only if its certificate comes from the remembered CA and its public key matches an entry in server.pins. In every session the list the server announces replaces the stored one; this is how a planned key rotation reaches the agent without re-enrollment. Agents enrolled before pinning existed remember the key at first contact (over a connection verified against the CA). An agent that missed a rotation refuses the server. Then re-enroll the agent or delete server.pins; the agent pins the key again on the next connection.

Re-enrolling

Re-enrollment is needed when the agent is stuck in the "rejected" state (revoked, certificate replaced), the state files are lost, or the machine was set up again.

  1. Create a new token under Agents β†’ Add agent.

  2. Replace the enrollment on the machine:

# Windows (administrator PowerShell)
$env:PDC_ENROLL_TOKEN = "pdc1...."
& "C:\Program Files\PDC-Backup Agent\pdc-agent.exe" enroll --server https://backup-server:8444 --force
Restart-Service PDCBackupAgent
# Linux
sudo PDC_ENROLL_TOKEN='pdc1....' /opt/pdc-agent/pdc-agent enroll --server https://backup-server:8444 --force
sudo systemctl restart pdc-agent

Without --force, enroll refuses if the machine is already enrolled. When you reinstall with the setup or the command from the web interface, this happens automatically.

Removing an agent

Way

Effect

Revoke (agent details or right-click, Administrator role)

The server blocks the certificate and disconnects the agent at once. It cannot connect again until it is enrolled with a new token. The program stays installed on the machine and keeps trying every 5 minutes. Backups stay untouched.

Uninstall… (agent details or right-click, Operator role)

The server orders the agent to remove itself: service, program, and optionally the state folder. Afterwards the server revokes the agent. If the agent is offline, this happens on its next connection.

Locally

Windows: Installed apps (entry "PDC-Backup Agent"). Linux: sudo apt remove pdc-backup-agent. The agent entry then stays in the list and should be revoked.

Revoked agents appear under the Revoked filter (section 5.3 Agent list and details). Backups of a revoked or uninstalled agent stay in the repositories until retention removes them (chapter 08 Repositories and Storage).

Last updated Nov 15, 2026