# 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](https://www.cncf.io/projects/).

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](https://docs.fluentd.org/installation/before-install).

## 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](https://docs.fluentd.org/quickstart/fluent-package-v5-vs-td-agent).

| Platform | Platform Version | Package |
|  --- | --- | --- |
| Ubuntu | 24.04 Noble, 22.04 Jammy (64-bit) | fluent-package 6 LTS |
| Debian | Bookworm, Trixie (64-bit) | fluent-package 6 LTS |


- [Installation Guide](https://docs.fluentd.org/installation/install-fluent-package)


### 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):


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

For Ubuntu Jammy (22.04):


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

For Debian Bookworm:


```bash
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.


```bash
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:


```bash
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

- [Fluentd Documentation](https://docs.fluentd.org/)
- [Continuous Data Import with Fluentd](/int/fluentd-continuous-data-import-integration)