Don't have Fly.io CLI?
Install flyctl
using the official instructions.
Start the official Fly log shipper using the Fly.io CLI:
fly launch --no-deploy --image flyio/log-shipper:latest
Install flyctl
using the official instructions.
Specify port in services configuration in the fly.toml
config. Replace the whole [http_service]
section with following configuration:
[[services]]
http_checks = []
internal_port = 8686
Set correct tokens and ingesting host:
# 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
Finally, run the log shipper:
fly deploy
You should see your logs in Better Stack → Live tail.
Please let us know at hello@betterstack.com.
We're happy to help! 🙏