Install standalone Elastic Agents (advanced users)


Install standalone Elastic Agents (advanced users)edit

Running Elastic Agent in standalone mode is an advanced use case. The documentation is incomplete and not yet mature. When possible, we recommend using Fleet-managed agents instead of standalone mode.

To run an Elastic Agent in standalone mode, install the agent on each host you want to monitor and manually configure the agent locally on the system where it’s installed. You are responsible for managing and upgrading the agents. This approach is recommended for advanced users only.

We recommend using Fleet-managed Elastic Agents, when possible, because it makes the management and upgrade of your agents considerably easier.

Standalone agents are unable to upgrade to new integration package versions automatically. When you upgrade the integration in Kibana, you’ll need to update the standalone policy manually.

To install and run Elastic Agent standalone:

  1. On your host, download and extract the installation package.

    curl -L -O
    tar xzvf elastic-agent-7.16.3-darwin-x86_64.tar.gz

    Refer to the download page for other installation options.

  2. Modify settings in the elastic-agent.yml as required.

    To get started quickly and avoid errors, use Kibana to create and download a standalone configuration file rather than trying to build it by hand. For more information, refer to Create a standalone Elastic Agent policy.

    For additional configuration options, refer to Elastic Agent standalone configuration.

  3. In the elastic-agent.yml policy file, under outputs, specify an API key or user credentials for the Elastic Agent to access Elasticsearch. For example:

        type: elasticsearch
          - ''
        api_key: _Nj4oH0aWZVGqM7MGop8:349p_U1ERHyIc4Nm8_AYkw 

    For more information required privileges and creating API keys, see Grant standalone Elastic Agents access to Elasticsearch.

  4. Make sure the assets you need, such as dashboards and ingest pipelines, are set up in Kibana and Elasticsearch. If you used Kibana to generate the standalone configuration, the assets are set up automatically. Otherwise, you need to install them. For more information, refer to View Elastic Agent integration assets and Install integration assets.
  5. From the agent directory, run the following commands to install Elastic Agent and start it as a service.

    On macOS, Linux (tar package), and Windows, run the install command to install Elastic Agent as a managed service and start the service. The DEB and RPM packages include a service unit for Linux systems with systemd, so just enable then start the service.

    You must run this command as the root user because some integrations require root privileges to collect sensitive data.

    sudo ./elastic-agent install

Refer to Installation layout for the location of installed Elastic Agent files.

Because Elastic Agent is installed as an auto-starting service, it will restart automatically if the system is rebooted.

If you run into problems, refer to Troubleshoot common problems.