> ## Documentation Index
> Fetch the complete documentation index at: https://aeros-c1d071c8.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting

> Commands and fixes for common problems on Debian and Ubuntu.

## Useful commands

```bash theme={null}
# Panel status and memory (the "Memory:" line is the cgroup figure)
systemctl status aeros-panel

# Panel logs, live
journalctl -u aeros-panel -f

# Panel logs since the last boot
journalctl -u aeros-panel -b

# Is the API up? (no auth needed)
curl -s http://127.0.0.1:3000/api/health

# A project's unit, status, and logs
systemctl cat discord-bot
systemctl status discord-bot
journalctl -u discord-bot -n 100

# Exact counters the Projects page reads
systemctl show --property=ActiveState,MemoryCurrent,CPUUsageNSec -- discord-bot
```

`GET /api/health` returns `{"ok": true, "uptime": <seconds>}`.

## Common problems

> [accordion] I lost the admin password
>
> Reset it from SSH. This also signs out every session of that user:
>
> ```bash theme={null}
> sudo node /opt/aeros-panel/backend/dist/seed.js admin your-new-password
> ```
>
> The password must be at least 10 characters. If you installed to a custom `AEROS_DIR`, adjust the path.

> [accordion] Too many failed login attempts
>
> After 10 attempts from one IP in 15 minutes, logins return `429` until the window ends. Wait for the time in the message, or restart the panel to clear the in-memory counters:
>
> ```bash theme={null}
> sudo systemctl restart aeros-panel
> ```

> [accordion] The page shows 'AerosPanel frontend build not found'
>
> `frontend/dist` is missing. Rebuild it:
>
> ```bash theme={null}
> cd /opt/aeros-panel/frontend
> sudo npm ci && sudo npm run build
> sudo systemctl restart aeros-panel
> ```
>
> Or run the installer again, which rebuilds both parts.

> [accordion] The panel does not start
>
> Read the last log lines:
>
> ```bash theme={null}
> journalctl -u aeros-panel -n 50 --no-pager
> ```
>
> * `EADDRINUSE`: another process uses the port. Find it with `sudo ss -ltnp | grep :3000`, or change `PORT` in `/opt/aeros-panel/backend/.env`.
> * `Cannot find module .../dist/index.js`: the backend was not built. Run `npm ci && npm run build` in `backend/`, or rerun the installer.
> * Errors loading `sqlite3`: the native module was built for a different Node version. Run `npm rebuild sqlite3` in `backend/` after a Node upgrade.

> [accordion] Logs or actions fail with 'Cross-origin request blocked' or close code 4403
>
> The browser's `Origin` does not match the `Host` the panel sees. This happens behind a proxy that rewrites the `Host` header. Forward the original host, or add the public origin to `CORS_ORIGIN` in `backend/.env` and restart the panel. See [Security](https://aeros-c1d071c8.mintlify.site/security.md#cross-site-request-protection).

> [accordion] A service is 'inactive' and RAM and CPU show nothing
>
> Metrics are only reported for active units. Check why it stopped:
>
> ```bash theme={null}
> systemctl status discord-bot
> journalctl -u discord-bot -n 100
> ```
>
> Common causes: `ExecStart` points to a binary that does not exist (use absolute paths, check with `which node`), the build output (`dist/`) is missing, or `MemoryMax=` is too low and the kernel killed the process (`journalctl` shows `oom-kill`).

> [accordion] Permission denied with User= set
>
> The service user needs read access to the working directory and write access to anything the app writes. For example:
>
> ```bash theme={null}
> sudo chown -R bot:bot /opt/discord-bot
> ```
>
> Deploys run as root, so files created by `git pull` or the build belong to root. Run the `chown` again after a deploy, or put it in the build command.

> [accordion] Deploy fails on git pull
>
> The panel uses `git pull --ff-only`, so a checkout with local commits or a rewritten remote history fails instead of merging. Inspect it:
>
> ```bash theme={null}
> cd /opt/discord-bot
> sudo git status
> sudo git log --oneline -5
> ```
>
> For private repositories, the root user needs access: an SSH deploy key in `/root/.ssh/` with an `ssh://` or `git@host:path` URL, or a credential helper for HTTPS.

> [accordion] Deploy says a deployment is already in progress
>
> Only one deploy or rollback runs per service. Wait for the terminal to print `Completed` or `FAILED`. The lock is in memory, so restarting the panel also clears it.

> [accordion] Saving a Caddy domain fails
>
> * `Caddy service is not active on this host.`: start Caddy with `sudo systemctl start caddy`.
> * The domain saves but does not resolve: make sure `/etc/caddy/Caddyfile` contains `import /etc/caddy/conf.d/*.caddy`, then check `sudo caddy validate --config /etc/caddy/Caddyfile` and `journalctl -u caddy -n 50`.

> [accordion] Alerts never arrive
>
> Press **TEST** in Settings first. If the test works but real failures do not alert:
>
> ```bash theme={null}
> systemctl show -p OnFailure discord-bot
> ls -l /etc/aeros-panel/alerts.env /etc/systemd/system/aeros-notify@.service
> journalctl -u 'aeros-notify@*' -n 20
> ```
>
> `OnFailure` must list `aeros-notify@discord-bot.service.service`. If it is empty, save the alert settings again to rewrite the drop-ins.

> [accordion] journalctl uses too much disk
>
> The installer caps the journal at `SystemMaxUse=64M` unless a cap already existed. Check usage and shrink it now:
>
> ```bash theme={null}
> journalctl --disk-usage
> sudo journalctl --vacuum-size=64M
> ```

> [accordion] Temperature or battery shows nothing
>
> The panel reads `/sys/class/thermal/thermal_zone0/temp` and the first `BAT*` entry in `/sys/class/power_supply/`. VPSs and some desktops do not expose these files. Without a battery, the panel reports `AC_POWER`.

## Where things are

| Path | What |
| :- | :- |
| `/opt/aeros-panel` | Install directory (`AEROS_DIR`) |
| `/opt/aeros-panel/backend/.env` | Panel environment (`PORT`, `HOST`) |
| `/opt/aeros-panel/backend/aeros.db` | SQLite database |
| `/etc/systemd/system/aeros-panel.service` | Panel unit |
| `/etc/systemd/system/<service>.service` | Project units |
| `/etc/systemd/system/aeros-backup-<name>.{service,timer}` | Backup units |
| `/var/backups/aeros-panel/` | Backup archives |
| `/etc/aeros-panel/alerts.env` | Alert configuration |
| `/etc/caddy/conf.d/aeros-<service>.caddy` | Caddy snippets |
| `/etc/systemd/journald.conf.d/aeros-limits.conf` | journald caps |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.