For the complete documentation index, see llms.txt. Markdown versions are available by appending .md to documentation URLs.

Install the OpenTelemetry Collector on a Virtual Machine

SigNoz Cloud - This page applies to SigNoz Cloud editions.
Self-Host - This page applies to self-hosted SigNoz editions.

This guide explains how to install the VM Collection Agent on a virtual machine or server: with Foundry on Linux, and from the OpenTelemetry Collector's release packages on macOS and Windows.

Prerequisites

  • One of these hosts:
    • A Linux host with systemd 238 or newer, with sudo, curl, and tar on it.
    • A Mac (Apple silicon or Intel) with macOS 12 or newer.
    • A Windows 10 version 1803, Windows Server 2019, or newer host (x64), with administrator access for the MSI. The MSI starts its default config first, which also needs TCP ports 1777, 9411, 14250, 14268, and 55679 and UDP ports 6831 and 6832 free.
  • Ports 4317, 4318, 8888, and 13133 free on the host. To run the agent on the host that runs self-hosted SigNoz, see Run on the same host as self-hosted SigNoz.
  • A SigNoz to send data to: SigNoz Cloud or a self-hosted SigNoz.

Install on Linux with Foundry

Step 1: Install foundryctl

Run this on the Linux host:

curl -fsSL https://signoz.io/foundry.sh | bash

For a manual install or PATH setup, see the foundry getting-started guide.

Step 2: Download the OpenTelemetry Collector

The agent runs the OpenTelemetry Collector Contrib binary that you place on the host. Run this on the Linux host to download version 0.139.0 to /opt/signoz-collector-agent/bin/otelcol-contrib, where Foundry looks for it by default:

ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
curl -fsSL "https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.139.0/otelcol-contrib_0.139.0_linux_${ARCH}.tar.gz" | tar -xz otelcol-contrib
sudo install -D -m 755 otelcol-contrib /opt/signoz-collector-agent/bin/otelcol-contrib

Step 3: Create casting.yaml

Create a file named casting.yaml on the Linux host, with one document for the agent described in How it works:

casting.yaml
apiVersion: v1alpha1
kind: CollectionAgent
metadata:
  name: signoz
spec:
  deployment:
    mode: systemd
    flavor: binary
  collector:
    spec:
      env:
        SIGNOZ_INGESTION_ENDPOINT: https://ingest.<region>.signoz.cloud:443
        SIGNOZ_INGESTION_KEY: <your-ingestion-key>
        OTEL_RESOURCE_ATTRIBUTES: deployment.environment=<your-environment>
      config:
        data:
          collector/agent/agent.yaml: |
            exporters:
              otlphttp/signoz:
                headers:
                  signoz-ingestion-key: ${env:SIGNOZ_INGESTION_KEY}

Verify these values:

  • <region>: Your SigNoz Cloud region.
  • <your-ingestion-key>: Your SigNoz Cloud ingestion key.
  • <your-environment>: Your deployment environment, for example staging or production.

For every option of this casting, see the systemd binary example.

Step 4: Deploy

Run this from the directory that contains casting.yaml:

sudo foundryctl cast -f casting.yaml

This command:

  • writes the collector config, the environment file and the systemd unit to pours/collectionagent/collector/agent/;
  • installs them under /etc and creates the signoz-collector-agent user;
  • enables and restarts the signoz-collector-agent service.

Run the same command again after editing casting.yaml.

Step 5: Verify the Collection Agent

Run this on the Linux host to check that the agent started:

sudo journalctl -u signoz-collector-agent --no-pager

The logs should include a line similar to the following:

... Everything is ready. Begin running and processing data.

In SigNoz, open Infrastructure Monitoring > Hosts: your host appears under its host name as data arrives. Check Logs Explorer for the warnings and errors that services on the host write to the systemd journal.

Customize the Collection Agent

Every change follows the same loop: edit casting.yaml, then run sudo foundryctl cast -f casting.yaml again. Each run restarts the agent.

  • Collector settings (environment): set them in the collector's spec (see spec fields). For example, to add a team resource attribute to everything the agent sends:

    spec:
      collector:
        spec:
          env:
            OTEL_RESOURCE_ATTRIBUTES: deployment.environment=<your-environment>,team=backend

    Verify these values:

    • <your-environment>: Your deployment environment, for example staging or production.
  • Collector config (receivers, processors, pipelines): add it under spec.collector.spec.config.data, keyed collector/agent/agent.yaml. It merges into the generated config (see custom config files). For example, to collect host metrics every 30s:

    spec:
      collector:
        spec:
          config:
            data:
              collector/agent/agent.yaml: |
                receivers:
                  hostmetrics:
                    collection_interval: 30s
  • Unit file (resource limits, capabilities): add patches under spec.patches against collectionagent/collector/agent/signoz-collector-agent.service. A [Service] directive's path is /Service/<Directive>. For example, to cap the agent at half a CPU:

    spec:
      patches:
        - target: collectionagent/collector/agent/signoz-collector-agent.service
          operations:
            - op: add
              path: /Service/CPUQuota
              value: 50%

    Take the target and paths from the files under pours/. Each run regenerates them, so keep every change in casting.yaml.

Troubleshooting

sudo cannot find foundryctl

In Step 4, sudo foundryctl cast -f casting.yaml stops with sudo: foundryctl: command not found.

Cause: the installer from Step 1 puts foundryctl in ~/.local/bin (or $XDG_BIN_HOME when it is set), which is not on the PATH that sudo uses.

Fix: run foundryctl through sudo with your current PATH, from the directory that contains casting.yaml:

sudo env "PATH=$PATH" foundryctl cast -f casting.yaml

To make foundryctl available to sudo for every later command, install it into /usr/local/bin instead:

curl -fsSL https://signoz.io/foundry.sh | sudo bash -s -- -d /usr/local/bin

After the fix, the command installs the agent, and Step 5 shows Everything is ready.

foundryctl cast stops with binary not found

In Step 4, sudo foundryctl cast -f casting.yaml stops with otelcol-contrib binary not found at "/opt/signoz-collector-agent/bin/otelcol-contrib", before it installs anything under /etc.

Cause: the collector binary is not at that path.

Fix: run Step 2 again, or set the binary's path as Collector binary in another location? in Step 3 shows, then run Step 4 again.

After the fix, Step 5 shows Everything is ready.

foundryctl cast refuses the collector's settings

In Step 4, sudo foundryctl cast -f casting.yaml stops with failed to enrich molding collector, followed by one of these:

  • spec.collector.spec.enabled is false, the CollectionAgent kind requires an enabled collector
  • spec.collector.spec.cluster.replicas is 2, an agent runs once per host

Cause: the casting turns the collector off or asks for more than one agent. The agent runs once on each host.

Fix: remove enabled and cluster.replicas from spec.collector.spec, then run Step 4 again.

After the fix, Step 5 shows Everything is ready.

The agent logs at least one endpoint must be specified

In Step 5, sudo journalctl -u signoz-collector-agent --no-pager shows exporters::otlphttp/signoz: at least one endpoint must be specified, and systemd keeps restarting the agent.

Cause: the casting sets no SIGNOZ_INGESTION_ENDPOINT under spec.collector.spec.env.

Fix: add it as in Step 3, then run Step 4 again.

After the fix, Step 5 shows Everything is ready.

The agent logs bind: address already in use

In Step 5, sudo journalctl -u signoz-collector-agent --no-pager shows listen tcp 127.0.0.1:8888: bind: address already in use, or the same error for 0.0.0.0:13133, 0.0.0.0:4317, or 0.0.0.0:4318, and systemd keeps restarting the agent.

Cause: another process on the host holds the port, such as the otelcol-contrib service from the OpenTelemetry Collector package or a self-hosted SigNoz on the same host.

Fix: remove the old collector as Migrate to Foundry shows, or move the agent's ports as Run on the same host as self-hosted SigNoz shows, then run Step 4 again.

After the fix, Step 5 shows Everything is ready.

foundryctl cast rejects a patch

In Step 4, sudo foundryctl cast -f casting.yaml stops before it installs the agent, with failed to apply patch for target "<target>" followed by one of these:

  • patch target "<target>" did not match any generated material
  • doc is missing path: <path>: missing value
  • doc is missing key: <path>: missing value
  • unable to remove nonexistent key: <key>: missing value
  • json patch on blob material "<target>" is not supported

Cause: the patch's target or path does not exist in what Foundry generates. Patches apply to agent.yaml and the unit file; set the agent's variables under spec.collector.spec.env.

Fix: remove the patch, then run this from the directory that contains casting.yaml:

sudo foundryctl forge -f casting.yaml

Take the target and path from the files under pours/collectionagent/, add the patch back, then run Step 4 again.

After the fix, Step 5 shows Everything is ready.

Send data from your applications

Host metrics flow as soon as the agent is running, and on Linux so do the warnings and errors in the systemd journal. To send traces, metrics, and logs from your applications through the agent, see Send Data from Applications to Collector on VM.

Next Steps

Is this page helpful

Last updated—October 26, 2026

Edit on GitHub

Is this page helpful

On this page

Last updated—October 26, 2026

Edit on GitHub