# Send logs to Better Stack using Fluentd

## Start logging to Better Stack

### 1. Install

Install [Fluentd](https://docs.fluentd.org/installation) on your server.

### 2. Set up inputs

Install and set up [Fluentd input plugins](https://docs.fluentd.org/input).

### 3. Install Better Stack

Install the Better Stack Fluent plugin:

```
[label Install Logtail gem]
fluent-gem install fluent-plugin-logtail
```

Read more about [Plugin Management](https://docs.fluentd.org/deployment/plugin-management) in the official documentation.

### 4. Set up outputs

Modify the Fluentd configuration to send logs to Better Stack:

```text
[label Output configuration]
<match **>
  @type logtail
  @id output_logtail
  source_token $SOURCE_TOKEN
  ingesting_host $INGESTING_HOST
  flush_interval 2 # in seconds
</match>
```

### 5. Restart

Restart the Fluentd service:

```bash
[label Restart the service]
systemctl restart fluentd
```


You should see your logs in [Better Stack → Live tail](https://telemetry.betterstack.com/team/0/tail ";_blank").

## Need help?

Please let us know at hello@betterstack.com.  
We're happy to help! 🙏

