# Deploy thoth and thothctl Across Your Fleet

> One guide for deploying thoth and thothctl to macOS (Jamf Pro, Intune, Santa), Windows (Intune, publisher allow rules) and Linux (verified binaries, Ansible, Puppet), with verification, upgrade and rollback.

Source: https://docs.atensecurity.com/docs/deployments/fleet-install

Use this guide to choose the right package for each platform, verify it, deploy it with your endpoint tooling, and upgrade or roll it back. It replaces the need to read several runbooks to get a first install out; the per-tool runbooks linked at the end go deeper.

**Install the Thoth skills first:**
  The Thoth skills teach Claude Code and Codex to do this setup with you in plain language: register an agent, wrap its tool calls, choose and test policy, configure Thoth as code through MCP, Terraform and `thothctl`, roll it out to managed endpoints and debug it. In Claude Code, run `claude plugin marketplace add atensecurity/thoth-skills` and then `claude plugin install thoth@atensecurity`. For Codex, run `curl -fsSL https://raw.githubusercontent.com/atensecurity/thoth-skills/main/install.sh | sh`. Details and other agents: [Skills for Claude Code and Codex](https://docs.atensecurity.com/docs/agent-skills). The skills guide your agent and do not replace these docs; configuration changes stay behind a plan or preview that you approve, and keys stay in environment variables or your secret manager.

**What has and has not been validated:**
  The artifacts and commands below were checked against the published `v0.4.1` release: checksums, the
  notarized macOS package, the Windows MSI signature, the Sigstore bundles, and the contents of the packages. The
  Jamf Pro, Intune, Santa, Ansible and Puppet steps are written from those artifacts and the tools' own
  documentation. They have **not** been run in a customer tenant. Test each one on a few devices first.

## What you deploy

`thoth` and `thothctl` are two binaries built from one release. Pick one approved version for a deployment ring and use the same version on every platform.

| Platform | Deploy this | Installs to |
|---|---|---|
| macOS | `thoth-macos-universal.pkg` (notarized, signed by Aten Security) | `/usr/local/bin/thoth` and `/usr/local/bin/thothctl` |
| Windows | `Thoth-x64.msi` (Authenticode signed), with `Intune-Deployment-Kit.zip` for Intune | `C:\Program Files\Aten Security\Thoth\` |
| Linux | The `thoth` package from the apt or yum repository (one package carries `thoth` and `thothctl`), or the raw `thoth-linux-*` and `thothctl-linux-*` binaries | `/usr/bin` for the package; wherever you put the raw binaries (the examples below use `/usr/local/bin`) |

Every file comes from [atensecurity/thoth releases](https://github.com/atensecurity/thoth/releases), tag `v<version>`. Linux also has signed `.deb` and `.rpm` packages, published in Aten's apt and yum repository at `packages.atensecurity.com` and attached to each release.

**winget:**
  A winget manifest for `AtenSecurity.Thoth` is being prepared for the community repository and is **not available
  yet**. Winget is a convenience channel for developer machines. For managed Windows fleets, deploy the MSI.

## Verify before you deploy

Do this once per release, on an admin machine, before uploading anything to your tooling.

### macOS and Linux files

The checksums for the macOS and Linux files are in `checksums.sha256`:

```bash
sha256sum -c --ignore-missing checksums.sha256
```

On macOS, `shasum -a 256 -c --ignore-missing checksums.sha256` does the same. Each file also has a Sigstore bundle named `<file>.sigstore.json`. There are no `.sig` files. Verify one with cosign, naming the workflow identity that signed it:

```bash
cosign verify-blob \
  --bundle thoth-linux-x86_64.sigstore.json \
  --certificate-identity https://github.com/atensec/maat/.github/workflows/thoth-release.yml@refs/heads/main \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  thoth-linux-x86_64
```

The identity for a release is printed in that release's `sigstore-metadata.json` (`signer.certificateIdentity`). cosign refuses to verify without it.

### The macOS package

```bash
pkgutil --check-signature thoth-macos-universal.pkg
spctl --assess --type install --verbose=4 thoth-macos-universal.pkg
```

For `v0.4.1` the first reports "Notarization: trusted by the Apple notary service" with the certificate `Developer ID Installer: Aten Security, Inc (VSMG4328CK)`, and the second reports `accepted` with `source=Notarized Developer ID`.

### Windows files

The Windows checksums are in `SHA256SUMS`, not in `checksums.sha256`:

```powershell
(Get-FileHash .\Thoth-x64.msi -Algorithm SHA256).Hash
# compare with the Thoth-x64.msi line in SHA256SUMS
```

Check the Authenticode signature and the publisher name:

```powershell
Get-AuthenticodeSignature .\Thoth-x64.msi | Format-List Status, SignerCertificate, TimeStamperCertificate
```

`Status` is `Valid` and the signer subject names `Aten Security Inc`. The Windows files are signed in a separate workflow from the macOS and Linux files, so their Sigstore identity differs:

```bash
cosign verify-blob \
  --bundle Thoth-x64.msi.sigstore.json \
  --certificate-identity https://github.com/atensec/maat/.github/workflows/release-windows.yml@refs/heads/main \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  Thoth-x64.msi
```

That identity is the one on `v0.4.1`. For other releases, read the signer identity from the certificate in the bundle rather than assuming it.

**Provenance and SBOMs:**
  Each release also publishes `provenance.json`, `release-manifest.json`, `sbom.cdx.json` (CycloneDX) and
  `sbom.spdx.json` (SPDX), each with a Sigstore bundle. The Windows files have `windows-provenance.json`,
  `windows-signing-metadata.json` and `windows-installer-metadata.json`. `gh attestation verify` needs read access to
  the private repository that builds the release, so it is not a customer verification path.

## macOS

### What the package does

`thoth-macos-universal.pkg` has the package identifier `com.atensecurity.thoth.cli`. It:

- installs `/usr/local/bin/thoth` and `/usr/local/bin/thothctl` (mode 755);
- creates `/Library/Application Support/AtenSecurity/Thoth/` with `config`, `logs` and `backup` folders and an `uninstall-thoth.sh` script;
- before an upgrade, copies any existing `thoth` and `thothctl` into the `backup` folder with a timestamp, and logs to `logs/installer.log`.

It does not write tenant settings. See [Configure the endpoints](#configure-the-endpoints) for how those arrive.

Check a Mac after install:

```bash
pkgutil --pkg-info com.atensecurity.thoth.cli
/usr/local/bin/thoth --version
/usr/local/bin/thothctl --version
thoth health --json
```

### A Mac reports `untrusted`

The enterprise deployment kit's verification script and its Jamf extension attribute refuse a `thoth` that a non-root user could replace. They check that the binary and every folder above it are owned by root and not writable by group or others. A Mac that fails reports `untrusted` and the script exits 15.

The common cause is an Intel Mac with Homebrew, where Homebrew leaves `/usr/local/bin` owned by the user and group-writable (mode 775). The package installs `thoth` into that folder, so the check fails even though the binary is correct. This is intended: a security hook should not run from a folder a standard user can alter.

Check it:

```bash
ls -ld /usr/local/bin
```

If it shows a user owner or `drwxrwxr-x`, either install on a root-owned path or correct the folder's ownership and mode through your own change process. Do not loosen or tighten permissions on a shared machine as a quick fix without your team's review. Homebrew on Apple silicon lives in `/opt/homebrew` and does not change `/usr/local/bin`.

### Jamf Pro

1. Upload `thoth-macos-universal.pkg` as a package.
2. Create a policy that installs the package, scoped to a test group first.
3. Run the `--version` check above as a Jamf script or extension attribute to report the installed version.
4. Move to a pilot group, then the fleet, when health checks are steady.

The step-by-step runbooks are [Jamf macOS Runbook](https://docs.atensecurity.com/docs/deployments/jamf-macos) and [Jamf Onboarding Overview](https://docs.atensecurity.com/docs/deployments/jamf-overview).

Aten also supplies an enterprise deployment kit for Jamf Pro: an extension attribute that reports the install, configuration and verification scripts, a way to deliver a team key and each person's identity for a small pilot, and a pilot runbook. The kit has not been run in a customer Jamf tenant.

### Intune

Upload the package as a macOS app (PKG). The package is signed with Aten Security's Developer ID Installer certificate and is notarized. The package identifier is `com.atensecurity.thoth.cli` and its version matches the release. See [Intune macOS Runbook](https://docs.atensecurity.com/docs/deployments/intune-macos).

### Santa

Santa applies to macOS only.

Each release publishes `santa-metadata.json`. For `v0.4.1` it contains:

- `teamId`: `VSMG4328CK`
- `applicationIdentity`: `Developer ID Application: Aten Security, Inc (VSMG4328CK)`
- `installerIdentity`: `Developer ID Installer: Aten Security, Inc (VSMG4328CK)`

Read the Team ID from the release you deploy rather than copying it from this page:

```bash
jq -r '.teamId' santa-metadata.json
```

Allow by Team ID so upgrades do not need a new rule. Hash rules are optional pinning: the installed `thoth` and `thothctl` files are byte-identical to the `thoth-macos-universal` and `thothctl-macos-universal` entries in `checksums.sha256`, so those hashes match what is on disk. The code-signing identifier inside the binaries is `thoth-macos-universal` and `thothctl-macos-universal`, not `thoth`.

Create the rule in the way you already distribute Santa policy (your sync server, or the static rules in the Santa configuration profile), with rule type `TEAMID` and policy `ALLOWLIST`. For a local test you can use Santa's own `santactl rule` command; check its flags against your Santa version, because they differ between Santa builds. See [Santa macOS Trust Policy](https://docs.atensecurity.com/docs/deployments/santa-macos).

## Windows

### Intune

Package `Thoth-x64.msi` as a Win32 app, or use the line-of-business MSI flow if your policy prefers it. `Intune-Deployment-Kit.zip` contains `install-thoth.ps1`, `detect-thoth.ps1`, `uninstall-thoth.ps1` and a short README.

| Setting | Value |
|---|---|
| Install command | `msiexec /i Thoth-x64.msi /qn /norestart ALLUSERS=1` |
| Uninstall command | `msiexec /x {PRODUCT-CODE} /qn /norestart`, with the product code of the version you deployed |
| Install context | device |
| Detection | `detect-thoth.ps1` from the kit, or the file `C:\Program Files\Aten Security\Thoth\thoth.exe` |

The product code changes with each release. Read it from `windows-installer-metadata.json` on the release (`productCode`); for `v0.4.1` it is `{0662E44B-0CCE-44CD-A20D-BDBA6E10F361}`. The upgrade code, `{D4A8E9D8-87C5-4B1D-9A45-1C6A43F6E5A1}`, stays the same across versions.

What the installer does:

- installs `thoth.exe` and `thothctl.exe` to `C:\Program Files\Aten Security\Thoth\`;
- appends that folder to the system `PATH`, so open a new shell after install;
- creates `C:\ProgramData\Aten Security\Thoth\`, which is kept when you uninstall;
- records the install path under `HKLM\Software\Aten Security\Thoth`.

Check a pilot device:

```powershell
thoth --version
thothctl --version
thoth health --json
```

See the [Intune Windows Runbook](https://docs.atensecurity.com/docs/deployments/intune-windows).

### Allow rules for WDAC, AppLocker and Intune

If you restrict what can run, allow Thoth by **publisher**, not by file hash or certificate thumbprint.

Windows signatures on Thoth come from Azure Artifact Signing. Its certificates are short-lived, measured in days, so the certificate changes with every signing run. Each signature carries a Microsoft timestamp, so files stay valid after their certificate expires. A rule built on a thumbprint would break on the next release.

For `v0.4.1` the signature chain is:

1. Microsoft Identity Verification Root Certificate Authority 2020
2. Microsoft ID Verified Code Signing PCA 2021
3. Microsoft ID Verified CS EOC CA 04
4. **Aten Security Inc** (the signing certificate)

Allow the publisher `Aten Security Inc` under that chain. The simplest way to get an exact rule is to build it from a signed file, with the Windows Defender Application Control wizard or AppLocker's publisher rule from a file, using `thoth.exe` as the example. Do not copy values from this page into a policy without checking them against the file. You can inspect a signature with:

```powershell
Get-AuthenticodeSignature "C:\Program Files\Aten Security\Thoth\thoth.exe" |
  Format-List Status, SignerCertificate
```

## Linux

Aten publishes signed `.deb` and `.rpm` packages in an apt and yum repository at `packages.atensecurity.com`. One package, `thoth`, installs both `thoth` and `thothctl` to `/usr/bin`, owned by root. The same packages are attached to each release. The repository metadata and the packages are signed with a dedicated package-signing key, fingerprint `8A68 EFF5 9F02 7416 93C3 E6A7 D855 5D49 9105 BD3E`; check it against this page before you trust the key.

### Supported hosts

| Host | Status |
|---|---|
| Amazon Linux 2023, x86_64 | The Linux host Aten tests first. Tested: Aten ran the installer from the enterprise deployment kit on it and it installed `thoth` and `thothctl`. It is **not yet** part of Aten's automated repository checks. |
| Amazon Linux 2023, arm64 | The arm64 packages are published. They have **not** been tested on Amazon Linux. |
| Debian 12, Ubuntu 22.04 and 24.04, Rocky Linux 9 | Supported. Aten's automated check installs from the repository on each of them, and the installer was also run by hand on Debian 12, Ubuntu 22.04 and Rocky 9. |
| Amazon Linux 2, and RHEL, Rocky and Alma 8 | **Not supported.** The x86_64 binary needs glibc 2.34 or newer and these systems ship older versions (Amazon Linux 2 has 2.26), so the install is refused. |

The `thoth` binary is dynamically linked on x86_64 and statically linked on arm64. No other distributions are covered.

### Install from the repository

Check the key before you trust it. This downloads only the public key and prints its fingerprint, which must equal the one above:

```bash
cd "$(mktemp -d)"
curl -fsSLO https://packages.atensecurity.com/aten-security-packages.asc
gpg --show-keys --with-fingerprint aten-security-packages.asc
```

Debian and Ubuntu:

```bash
curl -fsSLO https://packages.atensecurity.com/aten-security-packages.gpg
gpg --show-keys --with-fingerprint aten-security-packages.gpg   # same fingerprint
sudo install -m 0644 aten-security-packages.gpg /usr/share/keyrings/aten-security-packages.gpg
sudo curl -fsSL -o /etc/apt/sources.list.d/atensec-thoth.sources https://packages.atensecurity.com/atensec-thoth.sources
sudo apt-get update && sudo apt-get install thoth
```

Amazon Linux 2023, Rocky Linux 9 and other dnf systems:

```bash
sudo curl -fsSL -o /etc/yum.repos.d/atensec-thoth.repo https://packages.atensecurity.com/atensec-thoth.repo
sudo dnf install thoth    # on the first install dnf asks you to confirm the key and shows its fingerprint: it must match (do not pass -y)
```

Then check:

```bash
thoth --version
thothctl --version
```

To pin a version, install `thoth=<version>-1` with apt or `thoth-<version>` with dnf.

For configuration management (Ansible, Puppet, Chef, cloud-init), Aten supplies an installer in the enterprise deployment kit that downloads only the public key, refuses it unless its fingerprint is exactly the one above, and writes the repository files itself. It is the path that was run on the hosts in the table. The manual `dnf` steps above use the same repository, and Aten's automated check ran them on Rocky Linux 9 only. The kit has not been run in a customer tenant.

### Raw binaries, for hosts without the repository

Use `thoth-linux-x86_64` and `thothctl-linux-x86_64` on x86-64 machines, or the `-arm64` files on ARM, and verify them as shown above. This route suits an air-gapped network or a pinned mirror.

Install by hand on one machine:

```bash
sha256sum -c --ignore-missing checksums.sha256
sudo install -o root -g root -m 0755 thoth-linux-x86_64 /usr/local/bin/thoth
sudo install -o root -g root -m 0755 thothctl-linux-x86_64 /usr/local/bin/thothctl
thoth --version
```

Install root-owned and not writable by users. `thoth update` replaces the binary in place when it can write it, so a root-owned install means upgrades go through your tooling.

### Ansible

This play downloads each binary, checks it against the release's `checksums.sha256` (the download fails on a mismatch), installs it root-owned, and sets tenant values. Set `thoth_version`, `thoth_tenant_id` and `thoth_apex_domain` in your inventory. Do not put an API key in it.

```yaml
- name: Install thoth and thothctl from a verified release
  hosts: linux_endpoints
  become: true
  vars:
    thoth_arch: "{{ 'arm64' if ansible_architecture in ['aarch64', 'arm64'] else 'x86_64' }}"
    thoth_release_url: "https://github.com/atensecurity/thoth/releases/download/v{{ thoth_version }}"
    thoth_stage: /var/lib/thoth-install
  tasks:
    - name: Create the staging directory
      ansible.builtin.file:
        path: "{{ thoth_stage }}"
        state: directory
        owner: root
        group: root
        mode: "0700"

    - name: Download each binary and verify it against the release checksums
      ansible.builtin.get_url:
        url: "{{ thoth_release_url }}/{{ item }}-linux-{{ thoth_arch }}"
        dest: "{{ thoth_stage }}/{{ item }}-linux-{{ thoth_arch }}"
        checksum: "sha256:{{ thoth_release_url }}/checksums.sha256"
        owner: root
        group: root
        mode: "0600"
      loop:
        - thoth
        - thothctl

    - name: Install the verified binaries
      ansible.builtin.copy:
        src: "{{ thoth_stage }}/{{ item }}-linux-{{ thoth_arch }}"
        dest: "/usr/local/bin/{{ item }}"
        remote_src: true
        owner: root
        group: root
        mode: "0755"
      loop:
        - thoth
        - thothctl

    - name: Set tenant values for login shells
      ansible.builtin.copy:
        dest: /etc/profile.d/thoth.sh
        owner: root
        group: root
        mode: "0644"
        content: |
          export THOTH_TENANT_ID="{{ thoth_tenant_id }}"
          export THOTH_APEX_DOMAIN="{{ thoth_apex_domain }}"
```

### Puppet

This class pins the SHA-256 of each file in Hiera, downloads only when the installed copy does not match, and refuses to install a file whose hash is wrong. Read the hashes for your version from `checksums.sha256`. The values below are for `v0.4.1`.

```puppet
class thoth (
  String $version,
  String $tenant_id,
  String $apex_domain,
  Hash[String, Hash[String, String]] $sha256,
) {
  $arch = $facts['os']['architecture'] ? {
    /^(aarch64|arm64)$/ => 'arm64',
    default             => 'x86_64',
  }
  $base = "https://github.com/atensecurity/thoth/releases/download/v${version}"

  file { '/opt/thoth':
    ensure => directory,
    owner  => 'root',
    group  => 'root',
    mode   => '0755',
  }

  ['thoth', 'thothctl'].each |String $bin| {
    $asset    = "${bin}-linux-${arch}"
    $expected = $sha256[$bin][$arch]

    exec { "fetch ${asset}":
      provider => shell,
      command  => "curl -fsSL -o /opt/thoth/${asset}.new ${base}/${asset} && echo '${expected}  /opt/thoth/${asset}.new' | sha256sum -c - && mv /opt/thoth/${asset}.new /opt/thoth/${asset}",
      unless   => "echo '${expected}  /opt/thoth/${asset}' | sha256sum -c -",
      path     => ['/usr/bin', '/bin'],
      require  => File['/opt/thoth'],
    }

    file { "/usr/local/bin/${bin}":
      ensure  => file,
      source  => "/opt/thoth/${asset}",
      owner   => 'root',
      group   => 'root',
      mode    => '0755',
      require => Exec["fetch ${asset}"],
    }
  }

  file { '/etc/profile.d/thoth.sh':
    ensure  => file,
    owner   => 'root',
    group   => 'root',
    mode    => '0644',
    content => "export THOTH_TENANT_ID=\"${tenant_id}\"\nexport THOTH_APEX_DOMAIN=\"${apex_domain}\"\n",
  }
}
```

```yaml
# Hiera data
thoth::version: "0.4.1"
thoth::tenant_id: "<tenant>"
thoth::apex_domain: "<apex-domain>"
thoth::sha256:
  thoth:
    x86_64: bcd266321880a7fe0df9d46880606a9af4c1984fa525df1c4bf9525128028bea
    arm64: 56e014efb46f8bcd3b89dd302f6a29ac0897cebf393339fea1d3e888f5f43d91
  thothctl:
    x86_64: aeeecbf206c696d33b861886e68bad8eb8df719382dde85ef8b2dc3ff5bb429b
    arm64: 3876afd982d5ed38ed6709af44a5bab8cd35148533ec64bb1a234c10c84f7c33
```

## Configure the endpoints

The packages install the binaries. They do not carry your tenant. `thoth` does not read a `thoth-config.json`, so do not deploy one. What the endpoint needs arrives in these ways:

- **Claude Desktop:** generate a governed `claude_desktop_config.json` with `thoth wrap-config` and deliver it with your MDM. See [Claude Desktop Fleet Configuration](https://docs.atensecurity.com/docs/mcp/fleet-deployment).
- **Claude Code:** install the hook with `thoth hook install claude-code`, and use Claude Code's managed settings so developers cannot change it. See [Claude Code hook](https://docs.atensecurity.com/docs/mcp/claude-code-hook). Run `thoth hook doctor` on each machine and collect the result.
- **Tenant values:** `THOTH_TENANT_ID` and `THOTH_APEX_DOMAIN`, set through your MDM or configuration management. Keep API keys out of repositories and out of world-readable files.

Check an endpoint with:

```bash
thoth health --json
thoth status --json
```

`thoth status` reads the Claude Desktop configuration to report which servers are governed.

## Upgrade and roll back

Roll out in rings: a few test devices, then a pilot group, then everyone. Move on when installs succeed and `thoth health --json` is steady.

| Platform | Upgrade | Roll back |
|---|---|---|
| macOS | Deploy the new `.pkg` over the old one. The installer saves the previous binaries to `/Library/Application Support/AtenSecurity/Thoth/backup/`. | Redeploy the previous `.pkg`, or restore from the `backup` folder. `uninstall-thoth.sh` in the same folder removes the install. |
| Windows | Assign the new MSI. It performs a major upgrade in place. | A major upgrade **blocks downgrades**: installing an older MSI over a newer one fails with "A newer version is already installed". Uninstall the newer version, then install the older MSI. |
| Linux | Change `thoth_version` or `thoth::version` and re-run. | Set the previous version and re-run. |

`thoth update` and `thothctl update` fetch the latest release and replace the binary in place when the account can write it. Install binaries where standard users cannot write, so upgrades go through your tooling and not through individual users.

## Related runbooks

- [Release Channels + Verification](https://docs.atensecurity.com/docs/deployments/release-channels)
- [Deployment Validation Matrix](https://docs.atensecurity.com/docs/deployments/validation-matrix)
- [Windows Enterprise Release Platform](https://docs.atensecurity.com/docs/deployments/windows-enterprise-release)
- [Jamf macOS Runbook](https://docs.atensecurity.com/docs/deployments/jamf-macos)
- [Intune Onboarding Overview](https://docs.atensecurity.com/docs/deployments/intune-overview)
- [Santa macOS Trust Policy](https://docs.atensecurity.com/docs/deployments/santa-macos)
- [Claude Desktop Fleet Configuration](https://docs.atensecurity.com/docs/mcp/fleet-deployment)
