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 | 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 |
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
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.
It connects to the server (port 8444) and checks the server's certificate against the fingerprint from the token.
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.The answer contains the agent ID, the certificate, the CA certificate, the server's key pins, and the public key for signed agent packages.
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.
βββ 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 VMagent.toml is small and holds only two keys:
server_url = "https://backup-server:8444"
agent_id = "3f0c5c3e-7d8e-4d6a-9a4b-2f1d8c6b7a10"
Key | Meaning |
|---|---|
| Agent endpoint of the server, always |
| 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.
Create a new token under Agents β Add agent.
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: |
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).