Home / Guides

Read Server Logs and Find the Error With ChatGPT or Claude

Let ChatGPT or Claude read your Linux server's logs: failed services, nginx 502s, OOM kills and cron errors, explained in plain language before anything changes.

By Sandeep Kumar Saini, founder of Shellway · Published 3 Dec 2026 · Updated 3 Dec 2026

Short answer: connect your server to ChatGPT or Claude once, then ask: "My site returns 502 errors. Read the last 200 lines of the nginx error log and the app's service log, tell me the cause, and don't change anything yet." The AI reads the logs, links the errors together and explains the fix in plain language.

Why logs are where the answer is

A service that will not start, a 502 from nginx, a cron job that silently stopped: the reason is almost always written in a log. The hard part is knowing which log, reading hundreds of lines and spotting the one that matters. That reading and connecting is what AI assistants are good at.

Step 1: connect the server once

  1. Sign up at Shellway and copy the one install command from your dashboard.
  2. Paste it on the server. The small app connects outward only, so you open no ports and share no SSH keys with the AI.
  3. Add Shellway in ChatGPT (app directory) or Claude (custom connector). Details: run your Linux server from ChatGPT or Claude.

Step 2: prompts that find the cause fast

  • "Which systemd services have failed? For each, show the last 50 log lines and explain why it stopped."
  • "My site gives 502 Bad Gateway. Check the nginx error log, then the upstream app's log, and tell me what connects them."
  • "Show errors and warnings from the last hour across the system journal, grouped by service."
  • "The backup cron job didn't run last night. Check cron's log and the script's own log."
  • "Search /var/log for 'out of memory' or 'killed process' in the last 3 days."

Commands the AI typically uses (handy to know yourself):

systemctl --failed                          # services that failed
journalctl -u myapp -n 100 --no-pager       # last 100 lines of one service
journalctl -p err --since "1 hour ago"      # errors from the last hour
sudo tail -n 200 /var/log/nginx/error.log   # recent nginx errors
grep -i "out of memory\|killed process" /var/log/syslog   # OOM kills (Debian/Ubuntu)

Step 3: from cause to fix

When the AI has found the likely cause, ask: "What exactly would you change, and how do we undo it if it's wrong?" Common outcomes:

  • 502 from nginx: the app behind it crashed or listens on another port. Fix the app, then sudo systemctl restart myapp.
  • Service won't start: often a typo in a config file or a missing environment variable. The AI can show the exact line; Shellway can keep a backup of a file before it is edited.
  • Killed by the system: memory ran out. Look at what used it before adding swap or a bigger server.
  • Permission denied: a file owner changed after a deploy. Check with ls -l before running chown.

Approve each change yourself, then ask the AI to check the log again to confirm the error is gone.

Stay safe while the AI looks around

  • Start read-only. Turn on read-only mode on the server for the first week, so the AI can look but not change anything. Why read-only first.
  • Ask before every change. Put "ask me before you delete, restart or edit anything" in your first message.
  • Your rules live on the server. Read-only mode, allowed folders and blocked commands are set on the computer itself, so the AI cannot switch them off. Every action is logged.
  • Know the limits. Shellway has not had an independent security audit yet, and folder limits cover file tools, not every command. Read the safety rules.

Common questions

Do I need to copy and paste logs into ChatGPT?

No. With Shellway connected, the AI reads the log files and runs the commands on the server itself, so you skip copying hundreds of lines.

Is it safe to let an AI read my logs?

Logs can contain email addresses, IPs or tokens. The AI provider sees what the AI reads, and requests pass through Shellway's relay, which does not store command output. Point the AI at the logs you need, and keep secrets out of logs where you can.

Which servers does this work on?

Linux servers and VPSs, a Raspberry Pi or home server, and also Windows and Mac computers. The free plan covers 1 computer; Pro covers 3.

Try it on your own server: start the 7-day Pro trial, no card needed. Then 50 actions a day free on 1 computer, or paid plans from $5/month (₹499/month in India). Set up in about 2 minutes: how it works.