Skip to main content
Wings includes a built-in diagnostics command that collects system information, configuration details, and logs for troubleshooting.

Diagnostics Command

Usage

wings diagnostics
Description: Collects and reports information about the Wings instance to assist in debugging. Source: cmd/diagnostics.go:45-60

Command Flags

wings diagnostics --hastebin-url https://ptero.co --log-lines 200
Available Flags:
FlagDefaultDescription
--hastebin-urlhttps://ptero.coHastebin instance URL for uploading reports
--log-lines200Number of log lines to include
Source: cmd/diagnostics.go:56-57

Interactive Prompts

Configuration Questions

When running diagnostics, you’ll be prompted:
questions := []*survey.Question{
    {
        Name:   "IncludeEndpoints",
        Prompt: &survey.Confirm{
            Message: "Do you want to include endpoints (i.e. the FQDN/IP of your panel)?",
            Default: false,
        },
    },
    {
        Name:   "IncludeLogs",
        Prompt: &survey.Confirm{
            Message: "Do you want to include the latest logs?",
            Default: true,
        },
    },
    {
        Name: "ReviewBeforeUpload",
        Prompt: &survey.Confirm{
            Message: "Do you want to review the collected data before uploading?",
            Help:    "The data, especially the logs, might contain sensitive information",
            Default: true,
        },
    },
}
Source: cmd/diagnostics.go:70-87

Collected Information

Version Information

fmt.Fprintln(output, "               Wings:", system.Version)
fmt.Fprintln(output, "              Docker:", dockerVersion.Version)
fmt.Fprintln(output, "              Kernel:", kernelVersion)
fmt.Fprintln(output, "                  OS:", operatingSystem)
Includes:
  • Wings version
  • Docker version
  • Kernel version
  • Operating system
Source: cmd/diagnostics.go:98-109

Wings Configuration

fmt.Fprintln(output, "      Panel Location:", redact(cfg.PanelLocation))
fmt.Fprintln(output, "  Internal Webserver:", redact(cfg.Api.Host), ":", cfg.Api.Port)
fmt.Fprintln(output, "         SSL Enabled:", cfg.Api.Ssl.Enabled)
fmt.Fprintln(output, "     SSL Certificate:", redact(cfg.Api.Ssl.CertificateFile))
fmt.Fprintln(output, "             SSL Key:", redact(cfg.Api.Ssl.KeyFile))
fmt.Fprintln(output, "         SFTP Server:", redact(cfg.System.Sftp.Address), ":", cfg.System.Sftp.Port)
fmt.Fprintln(output, "      SFTP Read-Only:", cfg.System.Sftp.ReadOnly)
fmt.Fprintln(output, "      Root Directory:", cfg.System.RootDirectory)
fmt.Fprintln(output, "      Logs Directory:", cfg.System.LogDirectory)
fmt.Fprintln(output, "      Data Directory:", cfg.System.Data)
fmt.Fprintln(output, "   Archive Directory:", cfg.System.ArchiveDirectory)
fmt.Fprintln(output, "    Backup Directory:", cfg.System.BackupDirectory)
fmt.Fprintln(output, "            Username:", cfg.System.Username)
fmt.Fprintln(output, "         Server Time:", time.Now().Format(time.RFC1123Z))
fmt.Fprintln(output, "          Debug Mode:", cfg.Debug)
Configuration Details:
  • Panel location (redacted by default)
  • API host and port
  • SSL configuration
  • SFTP configuration
  • Directory paths
  • System username
  • Current server time
  • Debug mode status
Source: cmd/diagnostics.go:111-134

Docker Information

func getDockerInfo() (types.Version, dockersystem.Info, error) {
    client, err := environment.Docker()
    dockerVersion, err := client.ServerVersion(context.Background())
    dockerInfo, err := client.Info(context.Background())
    return dockerVersion, dockerInfo, nil
}
Docker Details:
fmt.Fprintln(output, "Server Version:", dockerInfo.ServerVersion)
fmt.Fprintln(output, "Storage Driver:", dockerInfo.Driver)
// Driver status details
for _, pair := range dockerInfo.DriverStatus {
    fmt.Fprintf(output, "  %s: %s\n", pair[0], pair[1])
}
fmt.Fprintln(output, "LoggingDriver:", dockerInfo.LoggingDriver)
fmt.Fprintln(output, " CgroupDriver:", dockerInfo.CgroupDriver)
// Warnings
for _, w := range dockerInfo.Warnings {
    fmt.Fprintln(output, w)
}
Includes:
  • Server version
  • Storage driver and status
  • System status
  • Logging driver
  • Cgroup driver
  • System warnings
Source: cmd/diagnostics.go:136-159, 210-224

Running Containers

docker ps
c := exec.Command("docker", "ps")
if co, err := c.Output(); err == nil {
    output.Write(co)
}
Output: Standard docker ps output showing all running containers Source: cmd/diagnostics.go:161-166

Wings Logs

tail -n 200 /var/log/pterodactyl/wings.log
if diagnosticsArgs.IncludeLogs {
    p := path.Join(cfg.System.LogDirectory, "wings.log")
    c, err := exec.Command("tail", "-n", strconv.Itoa(diagnosticsArgs.LogLines), p).Output()
    fmt.Fprintf(output, "%s\n", string(c))
}
Default Lines: 200 (configurable with --log-lines) Location: {LogDirectory}/wings.log Source: cmd/diagnostics.go:169-181

Sensitive Data Redaction

Redaction Function

func redact(s string) string {
    if !diagnosticsArgs.IncludeEndpoints {
        return "{redacted}"
    }
    return s
}
Source: cmd/diagnostics.go:253-258

Auto-Redaction

If endpoints are excluded, the following are automatically redacted:
if !diagnosticsArgs.IncludeEndpoints {
    s := output.String()
    output.Reset()
    s = strings.ReplaceAll(s, cfg.PanelLocation, "{redacted}")
    s = strings.ReplaceAll(s, cfg.Api.Host, "{redacted}")
    s = strings.ReplaceAll(s, cfg.Api.Ssl.CertificateFile, "{redacted}")
    s = strings.ReplaceAll(s, cfg.Api.Ssl.KeyFile, "{redacted}")
    s = strings.ReplaceAll(s, cfg.System.Sftp.Address, "{redacted}")
    output.WriteString(s)
}
Redacted Fields:
  • Panel location
  • API host
  • SSL certificate path
  • SSL key path
  • SFTP address
Source: cmd/diagnostics.go:183-192

Report Output

Report Format

Pterodactyl Wings - Diagnostics Report

|
| Versions
| ------------------------------
               Wings: v1.11.0
              Docker: 24.0.5
              Kernel: 5.15.0-91-generic
                  OS: Ubuntu 22.04.3 LTS

|
| Wings Configuration
| ------------------------------
      Panel Location: https://panel.example.com
  
  Internal Webserver: 0.0.0.0 : 8080
         SSL Enabled: true
     SSL Certificate: /etc/letsencrypt/live/node.example.com/fullchain.pem
             SSL Key: /etc/letsencrypt/live/node.example.com/privkey.pem
  
         SFTP Server: 0.0.0.0 : 2022
      SFTP Read-Only: false
  
      Root Directory: /var/lib/pterodactyl
      Logs Directory: /var/log/pterodactyl
      Data Directory: /var/lib/pterodactyl/volumes
   Archive Directory: /var/lib/pterodactyl/archives
    Backup Directory: /var/lib/pterodactyl/backups
  
            Username: pterodactyl
         Server Time: Mon, 04 Mar 2026 10:30:45 -0500
          Debug Mode: false

|
| Docker: Info
| ------------------------------
...

|
| Docker: Running Containers
| ------------------------------
...

|
| Latest Wings Logs
| ------------------------------
...
Source: cmd/diagnostics.go:98-181, 260-263

Uploading Reports

Hastebin Upload

func uploadToHastebin(hbUrl, content string) (string, error) {
    r := strings.NewReader(content)
    u, _ := url.Parse(hbUrl)
    u.Path = path.Join(u.Path, "documents")
    
    res, err := http.Post(u.String(), "text/plain", r)
    if err != nil || res.StatusCode < 200 || res.StatusCode >= 300 {
        return "", err
    }
    
    body, _ := io.ReadAll(res.Body)
    json.Unmarshal(body, &pres)
    
    if key, ok := pres["key"].(string); ok {
        u.Path = path.Join(u.Path, key)
        return u.String(), nil
    }
}
Process:
  1. POST report content to {hastebin}/documents
  2. Parse JSON response for document key
  3. Return shareable URL: {hastebin}/{key}
Source: cmd/diagnostics.go:226-251

Upload Confirmation

upload := !diagnosticsArgs.ReviewBeforeUpload
if !upload {
    survey.AskOne(&survey.Confirm{
        Message: "Upload to " + diagnosticsArgs.HastebinURL + "?",
        Default: false,
    }, &upload)
}
if upload {
    u, err := uploadToHastebin(diagnosticsArgs.HastebinURL, output.String())
    if err == nil {
        fmt.Println("Your report is available here: ", u)
    }
}
Source: cmd/diagnostics.go:198-207

Example Usage

Basic Diagnostics

# Run diagnostics with default settings
wings diagnostics
Prompts:
? Do you want to include endpoints (i.e. the FQDN/IP of your panel)? (y/N)
? Do you want to include the latest logs? (Y/n)
? Do you want to review the collected data before uploading? (Y/n)

Custom Configuration

# Use custom hastebin and more log lines
wings diagnostics --hastebin-url https://paste.example.com --log-lines 500

Review Before Upload

If you choose to review:
---------------  generated report  ---------------
Pterodactyl Wings - Diagnostics Report
...
---------------   end of report    ---------------

? Upload to https://ptero.co? (y/N)

Troubleshooting Use Cases

Docker Issues

The diagnostics report helps identify:
  • Docker version incompatibilities
  • Storage driver problems
  • Cgroup driver misconfigurations
  • Container networking issues

Configuration Problems

Review:
  • Incorrect directory paths
  • SSL certificate issues
  • SFTP configuration errors
  • Panel connection problems

Performance Issues

Examine:
  • Running container count
  • System resource usage
  • Docker warnings
  • Recent error logs

Installation Failures

Check:
  • Docker image pull failures
  • Network connectivity
  • System permissions
  • Available disk space

Security Considerations

Sensitive Information

Diagnostics may contain:
  • Server hostnames/IPs
  • File paths
  • Configuration values
  • Recent log entries
  • Error messages with details

Best Practices

  1. Review Before Sharing
    • Always review output before uploading
    • Redact endpoints when possible
    • Remove any sensitive log entries manually
  2. Exclude Logs if Necessary
    • Answer “No” to include logs prompt
    • Manually review log content first
    • Consider sharing partial logs
  3. Use Private Paste Services
    • Self-hosted hastebin instances
    • Password-protected pastes
    • Expiring links
  4. Limit Distribution
    • Only share with trusted support staff
    • Delete reports after issue resolution
    • Use private support channels

Output Headers

Header Format

func printHeader(w io.Writer, title string) {
    fmt.Fprintln(w, "\n|\n|", title)
    fmt.Fprintln(w, "| ------------------------------")
}
Sections:
  • Versions
  • Wings Configuration
  • Docker: Info
  • Docker: Running Containers
  • Latest Wings Logs
Source: cmd/diagnostics.go:260-263

Build docs developers (and LLMs) love