10. Agents: what they are and how they are managed
This guide describes Lawliet 1.6.3.b (the current release, a beta: earlier releases are beta. The first stable release will be 2.0.0). Screens, commands and procedures may change in later versions; the usage guide is updated with each release. Check the version your server runs under Settings > Platform or with ./lawliet version, and see the Releases page for what changed.
This chapter explains the Lawliet agent: what it does on each operating system, how it talks to the server, how you see it in the console, and how it is upgraded. The chapters that follow give the install procedures:
| Chapter | Covers |
|---|---|
| 11. Install agents on Linux (and macOS) | Copy-paste command, offline package, uninstall |
| 12. Install agents on Windows | Copy-paste command, offline package, Group Policy (MSI), WinRM, Kerberos |
| 13. Remote deployment from the console | Credentials, Test connection, deployments, approvals |
| 16. Agent security | Self-protection, uninstall codes, tokens, certificate changes |
10.1 What the agent is#
The agent is a small compiled program that runs on each monitored host. One agent per host. It enrols once with the server, then sends a heartbeat every 15 seconds. The heartbeat carries the host's health and collects any work the server has for it.
The agent version in this release is 2.1.10.s. A 1.5.14.s server also works with 2.1.9.s agents (they ignore the new settings) and offers them 2.1.10.s through the signed upgrade (10.8).
| Platform | Runs as | Installed to | Supported CPUs |
|---|---|---|---|
| Linux | two systemd services, lawliet-agent and lawliet-watchdog, as root | /opt/lawliet-agent/ | amd64 (x86_64), arm64 (aarch64) |
| Windows | two scheduled tasks, LawlietAgent and LawlietWatchdog, as SYSTEM at startup | C:\Program Files\Lawliet Agent\ | x64 (the same binary also runs on Windows on ARM) |
| macOS | two LaunchDaemons, com.lawliet.agent and com.lawliet.watchdog | /usr/local/lawliet-agent/ | Apple silicon (arm64), Intel (amd64) |
The watchdog checks that the agent is running and starts it again when it is not. It also restores the agent program from a known-good local copy if the program file is deleted or changed.
The compiled agent needs no Python, no package manager and no internet access. The only thing a host must reach is the Lawliet server. This is what makes the agent suitable for an air-gapped site. A Python version of the agent exists as a fallback, used only when the server has no compiled agent for the host's CPU, or when you ask for it (--python). The Python fallback needs python3 and access to a Python package mirror.
10.2 What the agent does#
| Function | What it means for you |
|---|---|
| Heartbeat and telemetry | CPU, memory and disk use, shown on Environment > Hosts |
| Compliance checks | Runs the checks a compliance scan sends and returns the results |
| File integrity monitoring (FIM) | Watches the paths in your FIM policies and reports changes |
| Data loss prevention (DLP) | Scans local files for the patterns in your DLP policies; matches are stored redacted |
| Hardening and response actions | Runs approved remediation and containment actions sent by the server |
| Domain awareness | Reports whether the host is in an Active Directory domain and its role (member, domain controller) |
| Self-protection (optional) | Resists being stopped or removed; see chapter 16 |
| Hardening telemetry (2.1.10.s, Linux and Windows) | Counts who still uses what hardening would remove (NTLM, SMB1, old TLS, ...), for the planner's breakage prediction and guards; sets up audit coverage of enforced settings for drift attribution (chapter 45) |
| Host inventory (2.1.10.s, Linux and Windows) | Processes, services, packages, ports, flows and tasks, for the do-not-disrupt baseline (chapter 42) |
| Cloud and VM identity (2.1.10.s) | Which AWS, Azure or GCP instance or VMware, Hyper-V or KVM VM the host is (45.1) |
The agent reports which modules it supports on that host as Capabilities (FIM, FIM real-time, FIM attribution, DLP). The server sends DLP or FIM work only to hosts that report the capability.
10.3 How the agent talks to the server#
- Direction. Always from the host to the server. The server never opens a connection to an agent. Open one port from the hosts to the server: 443/tcp in HTTPS mode (or the port the server was installed on), 8000/tcp in plain-HTTP lab mode.
- Encryption. HTTPS. The agent checks the server certificate. For a server with a self-signed certificate, the installer is given the certificate file (
--ca-certor-CaCert) and the agent trusts exactly that certificate; for a certificate from an internal CA, give the CA certificate (or a PEM bundle) instead. - Identity. At enrolment the server gives the agent its own token. The token is stored on the host (
/etc/lawliet/agent.confon Linux,C:\ProgramData\Lawliet\agent.confon Windows) and is not the enrolment secret. - Commands. Every command the server sends is signed. The agent refuses a command that is unsigned, altered, more than 10 minutes old or more than 60 seconds in the future. This is why host clocks matter (see 10.6).
How a host gets enrolled#
A host can enrol in one of three ways. The console shows all three under Environment > Hosts > Install agent.
| Method | Use it when | What authorises the enrolment |
|---|---|---|
| Install command | The host can reach the server. You run one command on it. | The server's enrolment secret, carried in the command |
| Remote deployment | The server can log in to the hosts over SSH or WinRM | A one-time token, valid 2 hours, for one enrolment |
| Offline package | The host cannot download anything. You carry a package to it. | An enrolment code with an expiry and a host limit |
Windows domains have a fourth way, the Windows MSI for Group Policy. It is an offline package made for Group Policy; see chapter 12.
The enrolment secret is shown by ./lawliet token on the server. After an agent enrols and saves its own token, the secret is removed from its configuration file - by the installer, by the agent after enrolling, and by the agent after its first heartbeat the server accepts (so a reinstall over an enrolled host does not leave it there either). See 16.6.
10.4 The Environment page#
Environment > Hosts is the fleet list.
Required permission: View agents.
What you see:
- Tiles: Total agents, Online, Offline, Error, Updating. Online counts only hosts that sent a heartbeat recently.
- Host clocks strip: the fleet's clock status and the host furthest from the server's time.
- Filter box (name, host, IP, platform) and status buttons: All, Online, Offline, Error, Updating.
- Table columns: Host, Platform / OS, IP address, Status, CPU, Memory, Disk, Capabilities, Last heartbeat, Clock, Version.
- Under the host name, a chip shows the domain membership:
standalone,member <domain>orDC <domain>. - A red banner at the top when some agents still talk to the server over plain HTTP while HTTPS is on. It lists the hosts and offers Show the HTTPS install command. Reinstall those hosts over HTTPS.
The page refreshes every 15 seconds.
The agent drawer#
Click a row to open the agent's drawer. It shows:
| Section | Content |
|---|---|
| Details | Agent ID, Platform, OS Type, IP Address, MAC Address, CPU, Memory, Disk, Telemetry sampled, Version, Clock, Domain, Domain role, Realm, Domain site, Tamper state |
| Capabilities | FIM, FIM real-time, FIM attribution, DLP (yes / no). From agent 2.1.14.s also: DLP findings waiting to reach the server; DLP findings dropped (the host's queue was full, or the server refused them as invalid); and command results dropped (results the server never acknowledged, which the host gave up). A dropped count above 0 shows a warning here and a DLP dropped N or results dropped N badge in the table. Dropped findings were not reported: check the host's connection to the server and scan it again. Dropped results leave their checks or tasks without a result: run them again |
| Proof of protection | Results of the periodic detection drills on this host, and Run drills now |
| Self-protection | State and the protection controls (chapter 16) |
| Remove agent | Removes the host from the console (see 10.7) |
| Compliance scan | A pointer to Compliance, where you run a scan of this host (choose Single agent) |
Agent status values#
| Status | Meaning | What to do |
|---|---|---|
| online | Recent heartbeat | Nothing |
| offline | No heartbeat within the timeout | See If a host does not appear or goes offline |
| error | The agent reported an error | Read the agent log on the host |
| updating | An upgrade is in progress | Wait; see 10.8 |
stale chip | No heartbeat within the timeout, status not yet switched to offline | Same as offline |
CPU, Memory and Disk come from the last heartbeat. When that sample is old, the meter is grey and marked old.
10.5 Agent configuration on the host#
The installer writes the configuration. Change it only when support asks you to.
| Item | Linux | Windows | macOS |
|---|---|---|---|
| Settings file | /opt/lawliet-agent/config.env | C:\Program Files\Lawliet Agent\config.env | /usr/local/lawliet-agent/config.env |
| Identity (agent id and token) | /etc/lawliet/agent.conf | C:\ProgramData\Lawliet\agent.conf | /var/root/Library/Application Support/Lawliet/agent.conf |
| Trusted server certificate | /etc/lawliet/server-ca.pem | C:\Program Files\Lawliet Agent\server-ca.pem | /etc/lawliet/server-ca.pem |
| Log | journalctl -u lawliet-agent, /var/log/lawliet-agent.log | C:\ProgramData\Lawliet\lawliet-agent.log | /var/log/lawliet-agent.log |
Settings in config.env:
| Variable | Meaning |
|---|---|
LAWLIET_API_URL | The server address |
LAWLIET_AGENT_NAME | The host name shown in the console |
LAWLIET_HEARTBEAT_INTERVAL | Seconds between heartbeats. Default 15. Keep it at 15 or lower: compliance scans wait about 40 seconds for results |
LAWLIET_REGISTRATION_SECRET | The enrolment secret or code. Emptied automatically after the agent enrols |
REQUESTS_CA_BUNDLE, SSL_CERT_FILE | The trusted server certificate, when one was given at install |
Reinstalling the agent on the same host keeps agent.conf, so the host keeps its identity and history.
Procedure: change a setting in config.env#
Risk: a wrong server address or certificate path cuts the host off from the server. Rollback: put the previous value back and restart the agent.
- If self-protection is on, turn it off first (16.2); otherwise the watchdog may restore the files.
- As root (Administrator on Windows), edit the settings file for the platform (table above). Keep a copy of the original.
- Restart the agent:
sudo systemctl restart lawliet-agent(Linux),sudo launchctl kickstart -k system/com.lawliet.agent(macOS),Stop-ScheduledTask -TaskName LawlietAgent; Start-ScheduledTask -TaskName LawlietAgent(Windows). - What you see: the host shows online under Environment > Hosts within a minute, with a fresh Last heartbeat. If it goes offline, read the agent log (table above) and undo the change.
- Turn self-protection on again.
10.6 Host clocks#
Each heartbeat carries the host's time, so the server knows how far each host's clock is from its own. The Clock column shows a chip such as clock +7m 12s.
| Offset | Shown as | Effect |
|---|---|---|
| under 1 minute | ok | none |
| 1 to 5 minutes | warning | A host more than 60 seconds behind refuses the server's commands and policies |
| 5 minutes or more | critical | As above, and domain (Kerberos) logons fail. One notification is raised for the host |
Fix the clock with NTP on the host, then check the Clock chip:
- Run the command for the platform below (as root or Administrator).
- What you see: within a heartbeat or two the chip returns to
ok. If it does not, point the host at your organisation's time source and run the command again.
sudo timedatectl set-ntp true # Linux (or point chrony at your time server)w32tm /resync # Windows10.7 Removing a host from the console#
Removing the record in the console does not uninstall the agent. Uninstall it on the host first (chapters 11 and 12), otherwise the host may enrol again (about 30 minutes later, while its agent still holds the enrolment secret in memory; see 16.5 - agents from 1.5.15.s drop the secret from memory at their first accepted heartbeat, so only a host that never completed one enrols again).
Required permissions: Manage agents and Delete agents to remove or delete; Manage agents alone to revoke the token. Four-eyes: yes (critical action "Delete an agent") for Remove and Delete it and its records; no for Keep the records: revoke its token, which runs at once.
- Open Environment > Hosts and click the host.
- In the drawer, under Remove agent, click Remove agent.
- The console shows what records the agent still has.
- "It has no records. Remove it?" -> click Remove.
- "It still has N records: ..." -> choose:
- Delete it and its records - removes the agent and its FIM events, DLP incidents, scans and forensic records. This cannot be undone. It is written to the audit trail with the row counts.
- Keep the records: revoke its token - the agent can no longer report, the records stay. You see "Token revoked. The records are kept; a reinstall on this host enrols as this agent again."
- For a removal or deletion with dual control on, the console says "Sent for approval. Removing an agent needs a second signature; run it from Approvals once signed." A second administrator approves it under Approvals > Waiting for me. You then run it from Approvals > My requests > Execute now (see chapter 15).
What you see: "Agent removed." and the host leaves the list.
If it fails: a 409 message lists the tables that still hold records. Choose one of the two options above.
When to use what:
| Situation | Action |
|---|---|
| A host is retired and its history must stay | Do nothing. It goes offline and keeps its history |
| An agent token may be leaked | Revoke the token (above), or rotate it (chapter 16) |
| A host was enrolled by mistake, or its data must be erased | Delete it and its records |
10.8 Agent versions and upgrades#
Environment > Agent versions shows what the fleet runs, the signed releases it can move to, and the rollout plans that move it.
Required permissions: Manage agents to view; Publish agent releases to import, register, publish, roll out and upgrade. Four-eyes: yes for Publish (one approval also covers Auto-deploy after publishing), a rollout plan, single-host upgrade, Roll out 10, and resuming a plan a stop rule halted (critical action "Publish an agent release"); no to pause or cancel a plan.
The upgrade channel is on in every server installed or updated from 1.5.14.s. A release still reaches no host until it is published, and publishing is four-eyes. The page says whether the channel is on and gives the command that switches it, run on the server:
| Setting | Default | Meaning |
|---|---|---|
AGENT_AUTO_UPGRADE_ENABLED | true in the bundle's .env | Agents accept upgrade instructions. Switch with sudo ./lawliet agent-upgrades on or off (3.25) |
AGENT_RELEASE_PUBLIC_KEY / AGENT_RELEASE_PUBLIC_KEY_FILE | set in customer bundles | The vendor's public release key. Without it nothing can be published |
- The update from a version below 1.5.14.s turns agent upgrades on once:
AGENT_AUTO_UPGRADE_ENABLEDbecomestrueeven where the earlier template had writtenfalse(that value cannot be told apart from a deliberate choice), the update prints "Agent upgrades turned on (was false); once only. Off: sudo ./lawliet agent-upgrades off", and.envgets the line# lawliet: agent upgrades enabled by the 1.5.14.s update; run ./lawliet agent-upgrades off to disable. With that line present, no later update touches the setting. To keep upgrades off, add--keep-agent-upgrades-off; from a 1.5.13.s or earlier installation, whose./lawlietrefuses options it does not know, runsudo LAWLIET_KEEP_AGENT_UPGRADES_OFF=1 ./lawliet update <bundle>instead. Turn them off any time later withsudo ./lawliet agent-upgrades off. - Later updates, and every update from 1.5.14.s on, leave the setting as it is. A rollback returns to the previous directory's own
.env, which has no marker: updating again from there turns upgrades on once more (also if you had turned them off on 1.5.14.s). Add--keep-agent-upgrades-offto that update to keep them off.
The page shows "The agent upgrade channel is off" with sudo ./lawliet agent-upgrades on, or "No release public key is configured".
Procedure: upgrade agents on an air-gapped site#
Risk: an agent upgrade replaces the program on each host. Rollback: each agent keeps its previous program and restores it if the new one does not report in; to go back across the fleet, roll out the older release (the API's force option allows a downgrade).
- Update the server to the new bundle (chapter 4). The bundle carries the signed compiled agents. When the server starts, it imports them as draft releases by itself: each binary's signature is checked against the release key, and a draft reaches no host. Import bundled agents does the same by hand (for example after the release key was configured) and shows a "Bundled agents" result listing what was imported and what was skipped, with the reason.
- In the release catalogue, click Publish on one of the new releases. The publish dialog publishes every build of that version together and, with Auto-deploy after publishing, rolls it out to all hosts on the same approval: Procedure: publish a new version and auto-deploy it.
- Without auto-deploy, roll it out later with one approval: Procedure: roll a release out to the whole fleet.
If it fails:
| You see | Meaning | Do |
|---|---|---|
rejected | The agent refused the file (signature or digest did not verify) | A rollout plan stops by itself. Every other agent would refuse it too. Contact [email protected] |
failed | Something went wrong on that host | Read the agent log on the host |
rolled_back | The new agent did not report in, so the old one was restored | Read the agent log; retry once the cause is fixed |
Procedure: publish a new version and auto-deploy it#
After a platform update the new agent version is in the catalogue as drafts, one per platform and CPU. One four-eyes approval can publish all of them and start one rollout plan that upgrades every host. Nothing reaches a host before the second administrator signs.
Permission: Publish agent releases. Four-eyes: yes, once for the publish and the plan together (critical action "Publish an agent release").
Risk: every host gets the new agent. The canary, the batches and the stop rules below limit how far a bad build gets. Rollback: each agent restores its previous program if the new one does not report in; Pause or Cancel the plan to stop it; roll out the older release to go back.
Open Environment > Agent versions. On a draft of the new version, press Publish.
The dialog lists every draft of that version (for example
windows binary amd64andlinux binary amd64), all ticked. A build whose artefact is not uploaded cannot be ticked.Auto-deploy after publishing:
- On by default when the version is newer than what most hosts run and no host runs a newer one. Off by default otherwise (publishing an older or side build, or an empty fleet). You can always change it.
- Not available (the box is greyed, with the reason) while another rollout plan is running, paused or stopped - one plan runs at a time; publish now and start the rollout when it has finished - or when no host can take the version.
- When agent upgrades are off on the server, the dialog says "Agent upgrades are off on this server" with the command to run on the server,
sudo ./lawliet agent-upgrades on, and nothing can be published until then.
Check the plan settings (all editable):
Field Default Meaning Hosts All hosts Every enrolled host. Hosts that cannot take the version are skipped with the reason Canary hosts 2 The first batch, a test on real hosts. Each must report success before anything else is sent; one failure pauses the plan Batch size (1-100) 10 Hosts upgraded together after the canary. A batch starts only when every host of the previous one has finished Pause above (% failed) 20 The failure threshold. A batch in which more than this share of hosts failed pauses the plan Runs for (days) 7 The expiry. Hosts that are offline wait and are upgraded when they report in, until then; afterwards they are skipped Read the preview: the hosts covered per operating system, the hosts skipped with the reason (no build for the OS or CPU, already on the version, below the minimum version, no token), how many covered hosts are offline now, and the exact text the approver reads. It names both acts and both counts, for example "Publish agent 2.1.15.s (stable): 2 build(s) [linux, windows] AND auto-deploy to exactly 28 host(s) (linux 4, windows 24), 1 skipped ...".
Press Publish and auto-deploy (or Publish with the box off). With dual control on, the request goes to the approvers; a second administrator approves it and you run it from Approvals. Running it publishes the builds and creates the plan. The result reads "published; auto-deploy started: plan 7 rolls 2.1.15.s out to 28 host(s), the canary (2) starts within 30 seconds".
Watch the plan under Rollout plans as in Procedure: roll a release out to the whole fleet. Pause, resume and cancel work the same way.
Worked example: 24 Windows hosts and 5 Linux hosts run 2.1.14.s. The update brings 2.1.15.s for windows binary amd64 and linux binary amd64. One of the Linux hosts is an arm64 device, and two Windows laptops are offline.
- The preview covers 28 hosts (windows 24, linux 4) and skips 1: "no published 2.1.15.s build for this host (linux binary arm64)". 2 of the 28 are offline now.
- After the approval the canary batch is 2 hosts. Both report success, so batch 2 (10 hosts) starts, then batch 3 (10 hosts), then batch 4 (the remaining 4 online hosts). The two laptops are upgraded in a later batch when they come back online; if they stay offline for 7 days the plan expires and they are skipped with that reason.
- If one canary host fails, the plan pauses before any other host is touched. In a batch of 10, 2 failures (20%) do not pause it; 3 failures (30%, more than 20%) do. Any
rejectedstops the plan. Resuming after a rule needs a second signature.
If it fails:
| You see | Meaning | Do |
|---|---|---|
| "published; auto-deploy not started: rollout plan 4 (2.1.14.s) is running ..." | Another plan became active between the approval and the run. The version is published; no plan was created | When that plan has finished (or after cancelling it), use Start the rollout in the yellow note on the page, or Roll out to all eligible on the release |
| "published; auto-deploy not started: the host set changed since the preview ..." | A host was enrolled or became eligible after the approval. The approval covers only the hosts it listed | As above: start the rollout from the page; it needs its own approval |
| "the host set changed since the preview" or "the counts changed since the preview" when sending | The fleet changed while the dialog was open | Close and open the dialog again |
| "already published: ..." | A build of that version was published already | Untick it, or use Roll out to all eligible on the published release |
The note "<version> is published; auto-deploy not started: <reason>" stays on the page until a rollout plan for that version or a newer one is created, or every host already runs that version or a newer one. It is read from the audit trail, so it lasts only as long as the audit trail keeps that entry (audit retention); the publish itself, the plans and the audit entry of the approved publish are not affected. A sandbox (demo) account cannot publish or deploy, and sandbox hosts are never part of a plan.
Procedure: roll a release out to the whole fleet#
A rollout plan upgrades every eligible host in paced batches, on one four-eyes approval. The server runs it in the background, also across restarts.
Permission: Publish agent releases. Four-eyes: yes, once for the whole plan.
Open Environment > Agent versions. On a published release, press Roll out to all eligible. Each host gets the build of that version for its platform and CPU.
Fill the form:
Field What to enter Hosts All hosts, A host group (the hosts the group lists; hosts that only match its tags are not included), or Selected hosts Batch size (1-100) Hosts per batch. Default 10 Canary hosts The first batch. Default 1. Every canary host must succeed before the next batch Pause above (% failed) A batch in which more hosts failed than this pauses the plan. Default 20 Runs for (days) Offline hosts of the approved set are upgraded when they report in, until then. Default 7 Press Preview. What you see: the text the approver will read - the release, the hosts, the number of hosts, the canary and batch sizes and the stop rules - how many hosts are offline now, and every host that is skipped with the reason (already on the version, no build for its platform or CPU, below the minimum version, no token).
Press Send for approval. A second administrator approves it, and you run it from Approvals. The hosts are fixed when the plan is created: a host enrolled later is not added.
Watch Rollout plans. Within 30 seconds the canary batch is sent. Each next batch starts when every host of the previous one has finished. The line under each plan counts done, in progress, failed, skipped and waiting hosts; Hosts lists each host with its batch, state and reason. The plan ends
completedwhen no host is left, orexpiredwhen hosts were still offline at its end (they are then skipped with that reason).
Stop rules:
| Rule | What happens |
|---|---|
Any host reports rejected | The plan is stopped. Nothing more is sent |
| A canary host fails | The plan is paused |
| More hosts in a batch failed than the threshold | The plan is paused |
| No release of the version is published any more | The plan is paused |
| A host does not report within 60 minutes of being sent its upgrade | That host counts as failed |
Agent upgrades are turned off (sudo ./lawliet agent-upgrades off) | The plan is paused (not by a rule): nothing new is sent, upgrades not yet picked up are withdrawn and their hosts wait again. Turn upgrades on, then Resume (one signature) |
The canary is done only when every canary host reports success. After a failed canary (once resumed), or a canary whose upgrades were withdrawn because agent upgrades were turned off, the next batch is a canary batch again: canary-sized, and any failure halts the plan.
A rule is judged even while you have paused the plan: a canary that fails during your pause still halts it by rule, and resuming then needs a second signature.
The approval covers exactly the hosts the preview listed. If a host is enrolled, added to the group or becomes eligible before the approved request runs, it is refused with "the host set changed since the preview ...": preview again and send the new plan. The plan follows the version, not one file: a build of the same version published later (with its own four-eyes publish) is used for the hosts it fits.
A plan a stop rule halted shows the reason in red. Resuming it needs a second signature.
One plan runs at a time. Roll out 10 (at most ten eligible hosts, four-eyes per click) and Upgrade to <version> on one host keep working beside it. The database enforces the one plan (since 1.5.14.s): if two approved plans are carried out at the same moment, the second is refused with the same message and nothing of it is created.
If it fails: the form or the notice names the problem, for example "rollout plan 4 (2.1.10.s) is running. One plan runs at a time: let it finish, or cancel it first."
Procedure: pause, resume or cancel a rollout plan#
- Pause (running plan): no new batch starts; upgrades already sent finish. Four-eyes: no. If the server is in the middle of a step, the button waits a few seconds; "the plan is being advanced right now; try again in a few seconds" means it waited longer. Once Pause or Cancel returns, nothing more is sent.
- Resume (paused or stopped plan): batches start again. Four-eyes: no after a person paused it; yes after a stop rule halted it (the button reads Resume (needs approval)).
- Cancel: confirm "Cancel the rollout of <version>? Hosts not yet upgraded are skipped; upgrades already sent finish." Four-eyes: no. The plan cannot be restarted; create a new one.
Procedure: register a release by hand#
Use this only for a build that did not come inside a server bundle (for example a release the vendor sent separately). Bundled builds are imported with Import bundled agents instead.
Permission: Publish agent releases. Four-eyes: no to register a draft (a draft reaches no host); yes to publish it.
Open Environment > Agent versions and press Register a release (disabled with "The upgrade channel is disabled on this deployment" until
AGENT_AUTO_UPGRADE_ENABLEDis on).Fill the form:
Field What to enter Version For example 2.1.0Platform The operating system the build is for Build Python script (every architecture) or Compiled binary (then Architecture) Host it on this server Tick for air-gapped sites; you upload the file after registering. Untick to give a Download URL (HTTPS) instead SHA-256 The file's digest, 64 hexadecimal characters Release signature The base64 Ed25519 signature over the digest, made offline with the release private key Minimum version to upgrade from Optional. Hosts below it step through an intermediate version Channel stable, or canary to keep it out of the stable selection while you try it on a few hosts Release notes What changed Press Register as draft.
With Host it on this server, press Upload artefact on the new row and choose the file. The server checks it against the SHA-256.
Continue with Publish and the rollout (steps 2-3 above).
If it fails: the form or the notice names the problem, for example a digest or signature that does not verify against the release public key.
Procedure: upgrade one host, stop a rollout, retire a release#
- One host: in Upgrade candidates, press Upgrade to <version> on a row marked
ready. Four-eyes: yes. - Stop a rollout: pause or cancel its plan (above), or press Unpublish on the release. No new host is sent it; upgrades already running finish, and a rollout plan of that version pauses. Publish makes it available again (four-eyes).
- Retire a release: press Delete on an unpublished release and confirm "Delete release <version>? Upgrade history is kept." This cannot be undone; register or import it again if needed.
Upgrade agents to the new version before you replace the server certificate: an agent 2.1.9.s learns the server's trust key with its first heartbeat and only then can follow a certificate change by itself (chapter 16).
Re-running an installer on a host is also an upgrade: it replaces the program in place and keeps the host's identity. If anything fails, the installer puts the previous program back.
10.9 If a host does not appear or goes offline#
Work through the checks in this order; stop at the first one that fails and apply its fix. What you see when it is fixed: the host is online in Environment > Hosts.
| Check | How | Fix |
|---|---|---|
| 1. Registration refused | The installer prints the server's reason. 401 = wrong or missing enrolment secret | sudo ./lawliet token shows the current secret. If none is set, sudo ./lawliet token --rotate |
| 2. Server not reachable | On the host: curl -k https://<server>/health must return "status": "healthy" | Firewall or routing between the host and the server |
| 3. Certificate not trusted | The agent log shows an SSL error on every call | Export the certificate (sudo ./lawliet tls --export) and reinstall with --ca-cert / -CaCert |
| 4. Clock wrong | The Clock column, or the host's time | Fix NTP (10.6) |
| 5. 409 "already registered" | An earlier record of this host still exists | Remove the old record (10.7); the waiting agent enrols by itself within a minute |
| 5b. 409 "A sandbox host already has this hostname and address" | The licence hides the sandbox (demo) data, and a sandbox host with the same name and address is still in the database | Clear the sandbox data (DELETE /api/v1/demo/clear, permission Manage demo data; the Settings > Sandbox page exists only on a licence that includes the sandbox), or give the host a different name, then enrol again |
| 6. Service not running | systemctl status lawliet-agent, or Get-ScheduledTaskInfo -TaskName LawlietAgent | Read the log; reinstall |
The installers check the server before installing anything and print one plain verdict:
| What happened | What the installer says to do |
|---|---|
The certificate does not name the address in --server | Run sudo ./lawliet tls repair on the server, export the certificate again, re-run with --ca-cert |
| Self-signed certificate and none given, or a different one given | Export it with ./lawliet tls --export, re-run with --ca-cert (-CaCert) |
| Certificate not yet valid or expired | Set this host's clock, or renew the certificate on the server |
| Connection refused | Check --server, that the server runs, and its firewall |
| Timeout | A firewall drops the connection: allow the port from this host to the server |
| HTTP 403 "Invalid host header" | Add the address to TRUSTED_HOSTS in the server's .env, then sudo ./lawliet start (8.9) |
| HTTP 403 on the agent download | The enrolment secret was refused: check --token |
More detail: Agents reference.