Skip to content

Commit 9dba116

Browse files
tashianclaude
andcommitted
Add Linux agent package distribution to Fleet DM integration docs
Linux hosts don't support MDM profiles, so instead of SCEP enrollment the agent registers directly via TPM attestation. Adds .deb and .rpm package links, a post-install script for agent configuration, GitOps YAML examples with label-based targeting, and Linux confirmation steps. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8a27dd9 commit 9dba116

1 file changed

Lines changed: 73 additions & 2 deletions

File tree

tutorials/connect-fleet-dm-to-smallstep.mdx

Lines changed: 73 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Supported platforms:
3434

3535
- macOS, iOS, iPadOS (via `.mobileconfig` profiles)
3636
- Windows (via `.xml` SyncML profiles)
37+
- Linux (via agent software deployment)
3738

3839
## Step 1. Get a Fleet API token
3940

@@ -432,10 +433,45 @@ You can deploy the agent using Fleet's [software deployment](https://fleetdm.com
432433
- macOS: [step-agent-plugin_latest.pkg](https://packages.smallstep.com/stable/darwin/step-agent-plugin_latest.pkg)
433434
- Windows (x64): [step-agent-plugin_latest_amd64.msi](https://packages.smallstep.com/stable/windows/step-agent-plugin_latest_amd64.msi)
434435
- Windows (ARM64): [step-agent-plugin_latest_arm64.msi](https://packages.smallstep.com/stable/windows/step-agent-plugin_latest_arm64.msi)
436+
- Linux (Debian/Ubuntu x64): [step-agent-plugin_amd64_latest.deb](https://packages.smallstep.com/stable/linux/step-agent-plugin_amd64_latest.deb)
437+
- Linux (Debian/Ubuntu ARM64): [step-agent-plugin_arm64_latest.deb](https://packages.smallstep.com/stable/linux/step-agent-plugin_arm64_latest.deb)
438+
- Linux (RHEL/Fedora x64): [step-agent-plugin_x86_64_latest.rpm](https://packages.smallstep.com/stable/linux/step-agent-plugin_x86_64_latest.rpm)
439+
- Linux (RHEL/Fedora ARM64): [step-agent-plugin_aarch64_latest.rpm](https://packages.smallstep.com/stable/linux/step-agent-plugin_aarch64_latest.rpm)
435440
2. In Fleet, go to **Software**, choose **Custom Package**, and add the package for distribution
436441

437442
Alternatively, you can use a separate software management system such as [Munki](https://github.com/munki/munki) to deploy the agent. See the [Smallstep Agent manual installation guide](../platform/smallstep-agent.mdx#macos-installation) for detailed instructions.
438443

444+
### Linux agent configuration
445+
446+
Linux does not support MDM configuration profiles, so the SCEP enrollment flow used for macOS and Windows does not apply. Instead, the Smallstep agent on Linux registers directly using TPM attestation. After installing the agent package, you must configure it with your Smallstep team slug and CA fingerprint.
447+
448+
When adding a Linux agent package in Fleet, add the following **post-install script** to configure and start the agent:
449+
450+
```bash
451+
#!/bin/bash
452+
453+
# Configure the Smallstep agent
454+
mkdir -p /etc/step-agent
455+
cat > /etc/step-agent/agent.yaml << EOF
456+
team: "<your-team-slug>"
457+
fingerprint: "<your-agents-ca-fingerprint>"
458+
EOF
459+
460+
# Enable and start the agent service
461+
systemctl daemon-reload
462+
systemctl enable --now step-agent
463+
```
464+
465+
Replace `<your-team-slug>` with your Smallstep team slug (found in [**Settings → Team**](https://smallstep.com/app/?next=/settings/team)), and `<your-agents-ca-fingerprint>` with the SHA-256 root fingerprint of your Smallstep Agents authority (found in [**Certificate Manager → Authorities**](https://smallstep.com/app/?next=/cm/authorities) under the Agents authority).
466+
467+
<Alert severity="info">
468+
<div>
469+
If your fleet includes multiple Linux distributions or architectures, create separate software entries for each package variant. Use [Fleet labels](https://fleetdm.com/docs/using-fleet/hosts#labels) to target `.deb` packages to Debian/Ubuntu hosts and `.rpm` packages to RHEL/Fedora hosts. See the [GitOps section](#gitops-configure-fleet-with-fleetctl) for a complete example with label targeting.
470+
</div>
471+
</Alert>
472+
473+
After deployment, Linux devices will self-register with your Smallstep team via TPM attestation. By default, new devices require admin approval in the [Smallstep console](https://smallstep.com/app/?next=/devices). To automate approval, you can [pre-register devices via API](../platform/smallstep-agent.mdx#pre-registration-via-api).
474+
439475
## GitOps: Configure Fleet with `fleetctl`
440476

441477
As an alternative to Steps 3 through 5, you can manage your entire Fleet configuration with YAML files and the `fleetctl gitops` command. This approach is ideal for version-controlled, repeatable deployments.
@@ -452,12 +488,13 @@ fleet-gitops/
452488
└── lib/
453489
├── smallstep-agent.mobileconfig
454490
├── smallstep-scep.xml
455-
└── smallstep-root-ca.xml
491+
├── smallstep-root-ca.xml
492+
└── smallstep-agent-setup.sh
456493
```
457494

458495
- `default.yml` — Organization-wide settings, including certificate authorities
459496
- `teams/team.yml` — Per-team configuration for profiles and software
460-
- `lib/` — Configuration profile files created in [Step 4](#step-4-create-scep-configuration-profiles)
497+
- `lib/` — Configuration profile files created in [Step 4](#step-4-create-scep-configuration-profiles) and Linux agent setup script
461498

462499
### Add the Smallstep CA
463500

@@ -505,8 +542,41 @@ software:
505542
packages:
506543
- url: https://packages.smallstep.com/stable/darwin/step-agent-plugin_latest.pkg
507544
- url: https://packages.smallstep.com/stable/windows/step-agent-plugin_latest_amd64.msi
545+
- url: https://packages.smallstep.com/stable/linux/step-agent-plugin_amd64_latest.deb
546+
post_install_script:
547+
path: ../lib/smallstep-agent-setup.sh
548+
- url: https://packages.smallstep.com/stable/linux/step-agent-plugin_x86_64_latest.rpm
549+
post_install_script:
550+
path: ../lib/smallstep-agent-setup.sh
508551
```
509552

553+
If your Linux fleet includes multiple architectures, add entries for each variant and use `labels_include_any` to target the correct package to each host:
554+
555+
```yaml
556+
- url: https://packages.smallstep.com/stable/linux/step-agent-plugin_amd64_latest.deb
557+
post_install_script:
558+
path: ../lib/smallstep-agent-setup.sh
559+
labels_include_any:
560+
- Ubuntu Linux
561+
- url: https://packages.smallstep.com/stable/linux/step-agent-plugin_arm64_latest.deb
562+
post_install_script:
563+
path: ../lib/smallstep-agent-setup.sh
564+
labels_include_any:
565+
- Ubuntu Linux
566+
- url: https://packages.smallstep.com/stable/linux/step-agent-plugin_x86_64_latest.rpm
567+
post_install_script:
568+
path: ../lib/smallstep-agent-setup.sh
569+
labels_include_any:
570+
- Red Hat Linux
571+
- url: https://packages.smallstep.com/stable/linux/step-agent-plugin_aarch64_latest.rpm
572+
post_install_script:
573+
path: ../lib/smallstep-agent-setup.sh
574+
labels_include_any:
575+
- Red Hat Linux
576+
```
577+
578+
Adapt the label names to match your Fleet label configuration. Fleet includes built-in labels for common Linux distributions. For architecture-specific targeting, you can create [custom labels](https://fleetdm.com/docs/using-fleet/hosts#custom-labels) using osquery queries (for example, `SELECT 1 FROM system_info WHERE cpu_type = 'x86_64'`).
579+
510580
### Apply the configuration
511581

512582
Run `fleetctl gitops` to apply the configuration:
@@ -540,3 +610,4 @@ On the device itself:
540610
- **macOS**: Open **Keychain Access** and look for a certificate issued by your Smallstep authority
541611
- **iOS/iPadOS**: Go to **Settings → General → VPN & Device Management** to view installed profiles
542612
- **Windows**: Open **certmgr.msc** and check the Personal certificates store
613+
- **Linux**: Run `sudo systemctl status step-agent` to verify the agent is running, and check `/var/lib/step-agent` for certificate files

0 commit comments

Comments
 (0)