railway logs adds network flow log mode
Introduced 2026-06-19 · score 0.98
HOW TO USE IT
When you need to inspect service-level network flows, run `railway logs --network`; add typed filters and `--filter` as needed, and use `--lines` for a finite snapshot or omit it to stream live.
railway logs --networkrailway logs --network --lines <N>railway logs --network --protocol <PROTOCOL> --filter "<QUERY>"WHY THIS HELPS
Inspect network flow logs for a deployment using the Railway CLI.
BEFORE THIS CHANGE
The release note describes --network as an added mode; before this change, the CLI command had no network-flow log mode.
REQUIREMENTS AND LIMITATIONS
- Version: v5.16.0
- --network (required): Select network flow logs; log type flags are mutually exclusive.
- --protocol <PROTOCOL>: Filter by tcp, udp, icmp, icmpv6, or unknown.
- --direction <DIRECTION>: Filter by ingress or egress.
- --peer <PEER>: Filter by peer service name or ID, internet, dns, or edge-proxy.
- --peer-kind <KIND>: Filter by service, internet, edge_proxy, local_dns, or unknown.
- --status <STATUS>: Filter by ok or dropped.
- --dropped <BOOL>: Filter by whether packets were dropped.
- --port <PORT>: Filter by source or destination port.
- --src <IP>: Filter by source IP.
- --dst <IP>: Filter by destination IP.
- --host <IP>: Filter by source or destination IP.
- --drop-cause <CAUSE>: Filter by drop cause.
- -f, --filter <QUERY>: Filter using Railway query syntax; network flow fields include @protocol, @direction, @peer, @peer_kind, @status, @drop_cause, @src, @dst, @host, @port, and @dropped.
- -n, --lines <N>: Fetch a finite number of log lines; disables streaming.
- --json: Output newline-delimited JSON; network rows include timestamp as an alias of captureEnd.
- -s, --service <SERVICE>: Select the service by name or ID; defaults to the linked service.
- -e, --environment <ENV>: Select the environment by name or ID; defaults to the linked environment.
- Prerequisite: Install the Railway CLI; the docs list Homebrew, npm, Scoop, and prebuilt binaries as installation methods.
- Prerequisite: Network flow logs are service-level; select the target service with --service or use the linked service.
- `--network` is a mutually exclusive log mode.
- NDJSON output aliases `timestamp` to `captureEnd`.
FIRST-PARTY EVIDENCE
- https://github.com/railwayapp/cli/releases/tag/v5.16.0
- https://github.com/railwayapp/cli/pull/978
- https://docs.railway.com/cli/logs
- https://docs.railway.com/cli
Check the installed version and the source before using it. Entry JSON