---
title: "Shipping Logs"
description: "Shipping Logs describes how Fly.io application stdout moves through the platform and how to centralize and retain it beyond Fly.io’s log lifetime. Apps run in Firecracker VMs, where an injected Rust init process captures stdout and sends it through host-side Go code to Vector, which publishes the logs to an internal NATS cluster; Flaps limits access to an organization’s logs. The Fly Log Shipper runs Vector as a NATS client and forwards organization-wide streams to a configured sink such as Logtail, Loki, Datadog, or Cloudwatch, using secrets for provider credentials. Deployment involves launching the image, removing the generated services section, adding an internal port, and running fly deploy. A SUBJECT environment variable can narrow collection with NATS subjects such as logs.sandwich.>, covering an app across regions and instances."
---

# Shipping Logs

[Fly.io](https://yomu.fyi/company/fly-io) · Feb 21, 2023

**Type:** Tutorial

## Summary

Shipping Logs describes how Fly.io application stdout moves through the platform and how to centralize and retain it beyond Fly.io’s log lifetime. Apps run in Firecracker VMs, where an injected Rust init process captures stdout and sends it through host-side Go code to Vector, which publishes the logs to an internal NATS cluster; Flaps limits access to an organization’s logs. The Fly Log Shipper runs Vector as a NATS client and forwards organization-wide streams to a configured sink such as Logtail, Loki, Datadog, or Cloudwatch, using secrets for provider credentials. Deployment involves launching the image, removing the generated services section, adding an internal port, and running fly deploy. A SUBJECT environment variable can narrow collection with NATS subjects such as logs.sandwich.>, covering an app across regions and instances.

## Context

Fly.io applications can generate substantial output, and centralizing logs supports correlating events across services and retaining logs beyond Fly.io’s retention period.

## Approach / What changed

Run the Fly Log Shipper image, configure Vector sinks through secrets, connect to the organization-scoped NATS log stream through Flaps, and optionally set a SUBJECT environment variable to select specific application logs.

## Takeaways

- The log path runs from application stdout through the VM’s Rust init process, host-side Go code, Vector, NATS, and the Flaps access proxy.
- The Fly Log Shipper can forward organization-wide logs to sinks including Logtail, Loki, Datadog, and Cloudwatch, with provider configuration supplied through secrets.
- NATS subjects can filter logs by application; logs.sandwich.> matches the sandwich app across regions and instances.

**Tags:** [NATS](https://yomu.fyi/topic/nats), [Observability](https://yomu.fyi/topic/observability), [Vector](https://yomu.fyi/topic/vector)

- Source: [Fly.io](https://fly.io/blog/shipping-logs)
- Source URL: https://fly.io/blog/shipping-logs
- Ingested by Yomu: 2026-09-03T01:25:35.611Z

[Read original post](https://fly.io/blog/shipping-logs)
