Get server runtime logs
Retrieves runtime logs (stdout/stderr) from a game server, including timestamps, log levels, and region info.
Pagination: Use the next_token from the response as start_time in the next request to fetch subsequent logs. Returns an empty logs array if the server has never launched.
Authorizations
Path Parameters
Server instance ID.
Query Parameters
Window start. Accepts ISO 8601 format (e.g., "2026-03-15T12:00:00Z") or relative time (e.g., "-1h", "-30m"). Omit to use the default 1-hour window (matching the dashboard), NOT the whole retention period.
Window end. Same format as start_time. Defaults to now if omitted. Pass the response's older_token here (keeping start_time) to page backward through the window.
Maximum number of log entries to return (1–1000). Defaults to 1000. Returns the most recent entries in the window.
1 <= x <= 1000Case-insensitive substring to match within log messages. Applied server-side across the ENTIRE window, not just the returned page.
256Restrict to a single inferred severity. Levels are inferred from message content (Fly forwards raw stdout without parsed levels).
error, warn, info Which end of the window to return when it holds more than limit rows. "newest" (default) returns the most-recent entries (live-tail). "oldest" returns the EARLIEST entries ascending from start_time — use it to reach a server's genuine first log lines. In "oldest" mode older_token is null (you are at the start) and next_token pages FORWARD toward now (pass it as start_time, keeping order=oldest).
newest, oldest Response
Server runtime logs with pagination cursor.
Server runtime logs with forward (live-tail) and backward pagination support.
The most recent log entries for the server within the requested window (after any search/level filter), ordered oldest-to-newest.
Server instance ID these logs belong to.
Fly.io machine ID that produced these logs. Null if no machine is assigned (server never launched).
Live-tail cursor pointing just after the newest entry returned. Pass as start_time in the next request to fetch only newer logs. Null if no logs were returned.
Backward cursor equal to the oldest entry returned. Pass as end_time (keeping the same start_time) to page further back through the window. Null if no logs were returned.