REW

How Do I Add Tempo To A Server?

Published Aug 29, 2025 3 min read
On this page

Adding Grafana Tempo to a server involves three main stages: deploying the Tempo server, instrumenting your applications to send trace data, and configuring a visualization tool like Grafana to query and display the traces.

This process allows for robust distributed tracing, providing deep insights into the performance of your microservices and applications.

Part 1: Deploying the Tempo server

Before collecting traces, you must first install and configure the Tempo backend. For a single server, the most straightforward method is to run Tempo as a single binary or in a Docker container.

Step 1: Download and install Tempo

Method A: Single binary (for Linux)

  1. Download the latest Tempo binary from the official GitHub releases page using wget.sh

    wget https://github.com/grafana/tempo/releases/download/v2.8.1/tempo_2.8.1_linux_amd64.tar.gz
    

    Use code with caution.

  2. **Extract the archive.**sh

    tar -xvf tempo_2.8.1_linux_amd64.tar.gz
    

    Use code with caution.

  3. Move the binary to your system path for easy access.sh

    sudo mv tempo /usr/local/bin/
    

    Use code with caution.

Method B: Docker container (Recommended for testing and production)

  1. Ensure Docker is installed on your server.

  2. Use a docker-compose.yaml file for a simple setup that includes Tempo, Grafana, and Prometheus. This provides an end-to-end observability stack out of the box.yaml

    # docker-compose.yaml
    version: "3"
    networks:
      backend:
    services:
      tempo:
        image: grafana/tempo:latest
        command: -config.file=/etc/tempo.yaml
        volumes:
          - ./tempo.yaml:/etc/tempo.yaml
          - ./tempo-data:/tmp/tempo
        ports:
          - "3200:3200" # Tempo gRPC
          - "4317:4317" # OTLP gRPC
          - "4318:4318" # OTLP HTTP
        networks:
          - backend
    

    Use code with caution.

  3. Run docker-compose up -d to start the services.

Step 2: Configure the Tempo server

Tempo requires a YAML configuration file to define its behavior. For a local installation, a minimal configuration is sufficient.

  1. Create a tempo.yaml file in a designated directory (e.g., /etc/tempo).

  2. Add the following configuration for a basic, monolithic setup using local storage.yaml

    server:
      http_listen_port: 3200
    distributor:
      receivers:
        otlp:
          protocols:
            grpc:
            http:
    ingester:
      trace_idle_period: 10s
      max_block_duration: 5m
    compactor:
      compaction:
        block_retention: 1h
    storage:
      trace:
        backend: local
        local:
          path: /tmp/tempo/traces
    

    Use code with caution.

    • server: Defines the HTTP listening port for Tempo.
    • distributor: Configures the receivers that accept trace data. Here, we enable OpenTelemetry Protocol (OTLP) via gRPC and HTTP, which is the recommended approach.
    • storage: Specifies where Tempo stores trace data. For production, you should replace the local backend with a more robust, scalable option like AWS S3, GCS, or an S3-compatible object store.

Step 3: Run Tempo as a service

For a production environment, running Tempo as a systemd service ensures it starts on boot and restarts automatically if it fails.

  1. Create a systemd service file at /etc/systemd/system/tempo.service.sh

    [Unit]
    Description=Grafana Tempo
    After=network.target
    [Service]
    Type=simple
    ExecStart=/usr/local/bin/tempo --config.file=/etc/tempo/tempo.yaml
    Restart=on-failure
    [Install]
    WantedBy=multi-user.target
    

    Use code with caution.

  2. Reload the systemd daemon, enable the service, and start it.sh

    sudo systemctl daemon-reload
    sudo systemctl enable tempo.service
    sudo systemctl start tempo.service
    

    Use code with caution.

  3. Verify that Tempo is running using systemctl status tempo.service.

Part 2: Instrumenting applications with OpenTelemetry

Once Tempo is deployed, you need to instrument your applications to collect trace data and export it to your Tempo server. This is typically done using the OpenTelemetry SDKs and collector.

Enjoyed this article? Share it with a friend.