Get Server Logs
Servers
Get Server Logs
GET
Get Server Logs
Retrrieves the most recent lines from the server’s console log file.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/pterodactyl/wings/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
Requires the Wings authentication token in theAuthorization header:
Path Parameters
The UUID of the server
Query Parameters
Number of lines to retrieve from the log file. Minimum: 1, Maximum: 100. Values outside this range are clamped to the limits.
Response
Array of log line strings from the server’s console output. Lines are returned in chronological order (oldest first).
Error Responses
404 Not Found
The requested server does not exist on this Wings instance.
500 Internal Server Error
An error occurred while reading the log file.
Behavior
- Reads from the server’s persistent log file
- Returns the last N lines from the file (where N is the
sizeparameter) - Log lines are returned as raw strings
- If the log file has fewer lines than requested, all available lines are returned
- Size parameter is automatically clamped between 1 and 100
Example Requests
Get Last 100 Lines (Default)
Get Last 50 Lines
Example Response
Notes
- This endpoint reads from a persistent log file, not live output
- For real-time log streaming, use the websocket connection
- Log files are rotated/cleared on server restart (depending on configuration)
- The maximum retrievable lines is capped at 100 for performance reasons
- Empty log files return an empty array
- This is useful for viewing recent server output without establishing a websocket connection
Source Reference
Implemented inrouter/router_server.go:26 and server/server.go:252