---
name: server-logs
description: View live server logs from the Archipelago dev server
allowed-tools: Bash
argument-hint: "[backend|nginx|container-name]"
---

View logs from the Archipelago server (192.168.1.228). Use `ssh -i ~/.ssh/archipelago-deploy archipelago@192.168.1.228` for all commands.

If $ARGUMENTS is provided, show logs for that specific service. Otherwise, show backend logs by default.

## Log sources

- **backend** (default): `sudo journalctl -u archipelago -n 50 --no-pager`
- **nginx**: `sudo tail -50 /var/log/nginx/error.log`
- **nginx-access**: `sudo tail -50 /var/log/nginx/access.log`
- **Any container name**: `sudo podman logs --tail 50 $ARGUMENTS`

Show the last 50 lines. If the user needs live streaming, use `-f` flag instead of `--tail`/`-n`.
