> ## Documentation Index
> Fetch the complete documentation index at: https://docs.appsignal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Standalone AppSignal Agent Linux package installation

This documentation describes how to install the AppSignal standalone agent through a Linux package on the host you want to monitor, like a database or a host without an instrumented app running on it.

We are in the process of testing and packaging the standalone agent on Linux distributions that are most popular with our customers. [Let us know](mailto:support@appsignal.com) if you want to run the agent on a distribution that is not supported yet.

## Operating System

### Debian and Ubuntu

The agent has been tested on Ubuntu LTS 14.04/16.04/18.04/20.04/22.04/24.04 and Debian 8/9/10/11/12.
First make sure the following packages are installed. All the following commands need root permissions, you might have to use `sudo`.

<CodeGroup>
  ```bash Bash theme={null}
  apt-get install curl gnupg apt-transport-https
  ```
</CodeGroup>

Then import the GPG key from [Packagecloud](https://packagecloud.io). This is a service we use to host the repositories for us.

<CodeGroup>
  ```bash Bash theme={null}
  curl -L https://packagecloud.io/appsignal/agent/gpgkey | sudo apt-key add -
  ```
</CodeGroup>

Create a file named `/etc/apt/sources.list.d/appsignal_agent.list` that contains the repository configuration below for the OS you use.

#### Ubuntu

Make sure to replace `lunar` in the `appsignal_agent.list` config file below with your Ubuntu release's name. Use the following release names:

* `noble` for Ubuntu 24.04
* `jammy` for Ubuntu 22.04
* `focal` for Ubuntu 20.04
* `bionic` for Ubuntu 18.04
* `xenial` for Ubuntu 16.04
* `trusty` for Ubuntu 14.04

<CodeGroup>
  ```conf /etc/apt/sources.list.d/appsignal_agent.list theme={null}
  deb https://packagecloud.io/appsignal/agent/ubuntu/ lunar main
  deb-src https://packagecloud.io/appsignal/agent/ubuntu/ lunar main
  ```
</CodeGroup>

#### Debian

Make sure to replace `bookworm` in the `appsignal_agent.list` config file below with your Debian release's name. Use the following release names:

* `bookworm` for Debian 12
* `bullseye` for Debian 11
* `buster` for Debian 10
* `stretch` for Debian 9
* `jessie` for Debian 8

<CodeGroup>
  ```conf /etc/apt/sources.list.d/appsignal_agent.list theme={null}
  deb https://packagecloud.io/appsignal/agent/debian/ bookworm main
  deb-src https://packagecloud.io/appsignal/agent/debian/ bookworm main
  ```
</CodeGroup>

#### Install the agent

Then run `apt update` to get the newly added packages and install the agent.

<CodeGroup>
  ```bash Bash theme={null}
  apt-get update
  apt-get install appsignal-agent
  ```
</CodeGroup>

The agent has now been installed. Next up is configuring it to report to the correct app in AppSignal.

### Redhat Enterprise Linux/Centos

At the moment EL version 7 and 8 are supported. First make sure the following packages are installed. All the following commands need root permissions, you might have to use `sudo`.

<CodeGroup>
  ```bash Bash theme={null}
  yum install pygpgme yum-utils
  ```
</CodeGroup>

Create a file named `/etc/yum.repos.d/appsignal_agent.repo` that contains the repository configuration below for EL7:

<CodeGroup>
  ```conf /etc/yum.repos.d/appsignal_agent.repo theme={null}
  [appsignal_agent]
  name=appsignal_agent
  baseurl=https://packagecloud.io/appsignal/agent/el/7/$basearch
  repo_gpgcheck=1
  gpgcheck=0
  enabled=1
  gpgkey=https://packagecloud.io/appsignal/agent/gpgkey
  sslverify=1
  sslcacert=/etc/pki/tls/certs/ca-bundle.crt
  metadata_expire=300
  ```
</CodeGroup>

Or this config for EL8:

<CodeGroup>
  ```conf /etc/yum.repos.d/appsignal_agent.repo theme={null}
  [appsignal_agent]
  name=appsignal_agent
  baseurl=https://packagecloud.io/appsignal/agent/el/8/$basearch
  repo_gpgcheck=1
  gpgcheck=0
  enabled=1
  gpgkey=https://packagecloud.io/appsignal/agent/gpgkey
  sslverify=1
  sslcacert=/etc/pki/tls/certs/ca-bundle.crt
  metadata_expire=300
  ```
</CodeGroup>

Update your local yum cache by running:

<CodeGroup>
  ```bash Bash theme={null}
  yum -q makecache -y --disablerepo='*' --enablerepo='appsignal_agent'
  ```
</CodeGroup>

And you can then install the agent:

<CodeGroup>
  ```bash Bash theme={null}
  yum install appsignal-agent
  ```
</CodeGroup>

## Configuration

The standalone agent configuration can be found at `/etc/appsignal-agent.conf`. For a list of all the available options, see the [configuration options](/standalone-agent/configuration/options) page for the standalone agent.

The required Push API key can be found in the ["Push & Deploy" section](https://appsignal.com/redirect-to/app?to=info) for any app in your organization, and in the ["Add app" wizard](https://appsignal.com/redirect-to/organization?to=sites/new) for your organization.

When configuring the standalone agent, pick an app name and environment that works for you. It can either be a separate app, or you can configure it for an existing app so that it reports as a new host to that app.

<CodeGroup>
  ```conf /etc/appsignal-agent.conf theme={null}
  push_api_key = "<YOUR PUSH API KEY>"
  app_name = "<YOUR APP NAME>"
  environment = "<YOUR APP ENVIRONMENT>"
  hostname = "<YOUR HOST NAME>"
  ```
</CodeGroup>

For example:

<CodeGroup>
  ```conf /etc/appsignal-agent.conf theme={null}
  push_api_key = "0000-0000-0000-000"
  app_name = "My app name"
  environment = "production"
  hostname = "hostname"
  ```
</CodeGroup>

Once you edit the configuration file you need to restart the agent.

* On Ubuntu 14.04 use `service appsignal-agent restart`
* On Centos/Redhat and Ubuntu 16.04 and up use `systemctl restart appsignal-agent`

## Collected metrics

The agent collects [host metrics](/metrics/host-metrics) by default. You can also send [StatsD](/standalone-agent/statsd) messages to it that will be processed as custom metrics.

We are eager to get feedback on this, let us know via the chat in the app or [support@appsignal.com](mailto:support@appsignal.com).
