> ## 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.

# AppSignal Standalone agent config load order

The AppSignal standalone agent can be configured using environment variables or a configuration file.

The configuration is loaded in a four step process, loading the configuration from different sources.

## Load orders

* 1. [Agent defaults](#1-agent-defaults)
* 2. [System detected settings](#2-system-detected-settings)
* 3. [Environment variables](#3-environment-variables)
* 4. [Config file](#4-config-file)

## 1. Agent defaults

The agent starts with loading its default configuration, setting default paths
and enabling certain features. The agent defaults can be found on the [options page][options].

## 2. System detected settings

The agent detects what kind of system it's running on and configures itself
accordingly. If a configuration option looks at the system to set its default, this will be listed on the [options page][options].

For example, when it's running inside a container based system (such as Docker
and Heroku) it sets the configuration option `running_in_container` to `true` and enables or disables host metrics automatically.

## 3. Environment variables

The agent will look for its configuration in environment variables. See the [options page][options] for available configuration options.

Environment variables can be in global environment configurations that are loaded on boot for installed Linux packages and set in scripts before calling the `appsignal-agent` process.

<CodeGroup>
  ```bash Bash theme={null}
  export APPSIGNAL_APP_NAME="my custom app name"
  # start the agent here
  ```
</CodeGroup>

When AppSignal environment variables are found for configuration options, these will override all given configuration options from previous steps.

## 4. Config file

This configuration source is used by the [Linux package installation](/standalone-agent/installation/linux-package). It is also loaded using the `--config` CLI option when calling the `appsignal-agent` process manually.

The path of this configuration file is `/etc/appsignal-agent.conf` for the Linux package installation. If the standalone agent is called manually with the `--config` option, the file must be at the place specified with the `--config` option. For example, `appsignal-agent --config /path/to/config/appsignal.conf` will look for the file at `/path/to/config/appsignal.conf`.

When AppSignal environment variables are found for configuration options, these will override all given configuration options from previous steps.

[options]: /standalone-agent/configuration/options.html
