Skip to main content

How to Deploy the Huntress Agent on Linux Using the Command Template

Overview

Swif provides a built-in Huntress Linux Command Template that simplifies deploying the Huntress agent to your Linux devices. Instead of manually creating a custom command from scratch, you can use this pre-configured template to get started in minutes.

The template uses the official Huntress Linux install script (huntress_linux_install.sh) and requires your Huntress Account Key and Organization Key to complete setup.


Prerequisites

Before you begin, make sure you have:

  • Admin access to your Swif console

  • A Huntress account with access to your Huntress Portal

  • Your Huntress Account Key (found in your Huntress portal)

  • Your Huntress Organization Key (found in your Huntress portal)

  • The Huntress Linux install script (huntress_linux_install.sh) downloaded from your Huntress portal

  • One or more Linux devices enrolled in Swif


Step-by-Step Instructions

Step 1: Locate the Command Template

  1. In the Swif console, navigate to Device Management → Commands.

  2. At the top of the page, find the Recommended Command Templates carousel.

  3. Look for the "Install Huntress Template" card — it displays the teal Huntress dragon logo and the description "Installation of the Huntress agent."

Tip: You can also click "View All Templates >" to open the full Command Templates list and find it there.

Step 2: Configure the Template

  1. Click the "Configure" button on the Install Huntress Template card.

  2. The command template creation flow opens directly (no OS selection is needed — this template is Linux-only).

Step 3: Add Your Install Script Content

The template pre-configures the following for you:

  • Execution Type: Run by File (pre-selected)

  • File Name: huntress_linux_install.sh (pre-filled)

  • File Content: Empty — you must paste your script here

To get your install script:

  1. Log into your Huntress Portal.

  2. Click the hamburger menu (top-right) → "Download Agent".

  3. Click "View Installation Guides".

  4. Select the "Linux" tab.

  5. Click "Huntress install script for Linux" to download the .sh file.

  6. Open the downloaded file in a text editor, copy its contents, and paste them into the File Content script editor in Swif.

Step 4: Replace the Placeholder Keys in the Build Script

The Build Script field is pre-filled with:

huntress_linux_install.sh -a YOUR_ACCOUNT_KEY -o YOUR_ORGANIZATION_KEY

You will see two yellow warning banners reminding you to replace the placeholders:

  • ⚠️ "Missing Huntress Account Key. Replace YOUR_ACCOUNT_KEY before continuing."

  • ⚠️ "Missing Huntress Organization Key. Replace YOUR_ORGANIZATION_KEY before continuing."

Replace the placeholders with your actual keys:

  • -a → Your Huntress Account Key

  • -o → Your Huntress Organization Key

Where to find your keys: In the Huntress Portal, go to the Linux installation guide, select your organization from the dropdown, and copy the command — your keys will be embedded in it.

Step 5: Create the Command

  1. Fill in a command name (e.g., "Install Huntress") and any additional fields as desired.

  2. Click "Continue" or "Create" to finalize.

  3. You'll receive a success confirmation, and the command will appear in your Commands list.

Step 6: Assign to Linux Devices

  1. Navigate to your Commands list.

  2. Find the newly created Huntress command (it will show as Custom Command / Run By File / Manual).

  3. Assign the command to one or more Linux devices.


Important Notes

  • This is a Command Template, not an App Template. It appears on the Commands page, not the Applications page.

  • The install script is unique per account. Each organization must download their own huntress_linux_install.sh from the Huntress Portal — the script is not universal.

  • Both keys are required. The command will not execute successfully without valid Account Key and Organization Key values.

  • The file content is intentionally left empty so that you paste the latest version of the script directly from Huntress. This ensures you always deploy the most up-to-date agent installer.


Troubleshooting

Issue

Solution

Template not visible in the carousel

Ensure you're on the Commands page (not Applications). Try clicking "View All Templates" to search.

Warning banners still showing

You haven't replaced YOUR_ACCOUNT_KEY or YOUR_ORGANIZATION_KEY with your actual Huntress keys.

Command fails on device

Verify that the file content contains the full huntress_linux_install.sh script and that your keys are correct. Ensure the target device is running a supported Linux distribution.

Script editor is empty after creation

This is expected — paste your script content downloaded from the Huntress Portal.


Related

Did this answer your question?