# Send logs to Better Stack using Logstash

## Start logging to Better Stack

### 1. Install

Install [Logstash](https://www.elastic.co/guide/en/logstash/current/installing-logstash.html) on your server.

### 2. Set up inputs

Install and set up [Logstash input plugins](https://www.elastic.co/guide/en/logstash/current/input-plugins.html).

### 3. Set up output

Modify the Logstash output configuration to send logs to Better Stack:

```text
[label Output configuration]
input {
   # Configure your input plugins here
}

output {
  http {
    url => "https://$INGESTING_HOST"
    http_method => "post"
    headers => {
      "Authorization" => "Bearer $SOURCE_TOKEN"
    }
    format => "json"
  }
}
```

### 4. Restart

Restart the Logstash service:

```
[label Restart the service]
sudo systemctl restart logstash.service
```


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! 🙏



