Skip to content

Installing Fluentd on Ubuntu and Debian

td-agent was discontinued in December 2023 and has been replaced by fluent-package. The fluent-package is the official successor maintained by the Cloud Native Computing Foundation.

fluent-package is a stable distribution package of Fluentd.

Before Installation

You can learn more about how to prepare for the installation at Fluentd Installation Guide.

Install fluent-package

You can install fluent-package using the following methods. We recommend using fluent-package 6 LTS.

Learn more about how this version compares to earlier versions.

PlatformPlatform VersionPackage
Ubuntu24.04 Noble, 22.04 Jammy (64-bit)fluent-package 6 LTS
DebianBookworm, Trixie (64-bit)fluent-package 6 LTS

fluent-package 6 LTS

A shell script is provided to automate the installation process for each version. The shell script registers a new apt repository and installs the fluent-package deb package.

For Ubuntu Noble (24.04):

curl -fsSL https://fluentd.cdn.cncf.io/sh/install-ubuntu-noble-fluent-package6-lts.sh | sh

For Ubuntu Jammy (22.04):

curl -fsSL https://fluentd.cdn.cncf.io/sh/install-ubuntu-jammy-fluent-package6-lts.sh | sh

For Debian Bookworm:

curl -fsSL https://fluentd.cdn.cncf.io/sh/install-debian-bookworm-fluent-package6-lts.sh | sh

Launch the daemon with systemd

The systemd service script is provided to start, stop, or restart the agent.

sudo systemctl start fluentd.service
sudo systemctl status fluentd.service

Example output:

● fluentd.service - fluentd: Fluentd based data collector
     Loaded: loaded (/lib/systemd/system/fluentd.service; disabled; vendor preset: enabled)
     Active: active (running) since Thu 2024-01-01 15:12:27 PST; 6min ago
       Docs: https://docs.fluentd.org/
    Process: 53192 ExecStart=/opt/fluent/bin/fluentd --config /etc/fluent/fluentd.conf
   Main PID: 53198 (fluentd)
      Tasks: 2 (limit: 4915)
     Memory: 19.9M
        CPU: 1.251s
     CGroup: /system.slice/fluentd.service
             └─53198 /opt/fluent/bin/ruby /opt/fluent/bin/fluentd --config /etc/fluent/fluentd.conf

If you want to customize systemd behavior, place your fluentd.service file in /etc/systemd/system.

The following commands are supported:

sudo systemctl start fluentd.service
sudo systemctl stop fluentd.service
sudo systemctl restart fluentd.service
sudo systemctl status fluentd.service

Make sure your configuration file is located at /etc/fluent/fluentd.conf.

The logs are located under /var/log/fluent. After you modify the config file, restart the agent.

Other Resources