Better Stack Fly.io logging

Start logging in 2 minutes

1. Install

Start the official Fly log shipper using the Fly.io CLI:

Launch log shipper
fly launch --no-deploy --image flyio/log-shipper:latest

2. Configure port

Specify port in services configuration in the fly.toml config. Replace the whole [http_service] section with following configuration:

fly.toml
[[services]]
  http_checks = []
  internal_port = 8686

3. Set up secrets

Set correct tokens and ingesting host:

Set secrets
# You can find your organizations' slugs with "fly orgs list"
ORGANIZATION_SLUG=personal
fly secrets set ORG=$ORGANIZATION_SLUG
fly secrets set ACCESS_TOKEN=$(fly tokens create readonly $ORGANIZATION_SLUG | cut -d' ' -f2)
fly secrets set BETTER_STACK_SOURCE_TOKEN=$SOURCE_TOKEN
fly secrets set BETTER_STACK_INGESTING_HOST=$INGESTING_HOST

4. Deploy

Finally, run the log shipper:

Deploy log shipper
fly deploy

You should see your logs in Better Stack → Live tail.

Need help?

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