> ## Documentation Index
> Fetch the complete documentation index at: https://docs.recasaos.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Collect logs for a bug report

> Where ReCasaOS keeps its logs, which commands to run, and what to hide before you paste them in an issue.

Most problems leave a trace in the logs of the ReCasaOS services. Run the commands below on the box, copy what they print, hide what is personal, and paste it in your [issue](https://github.com/ReCasaOS/CasaOS/issues).

## Which release you run

```bash theme={null}
cat /var/lib/casaos/fork-release
```

## The log files

Each service writes to `/var/log/casaos/`: `casaos.log` (the core), `gateway.log`, `app-management.log`, `local-storage.log`, `message-bus.log`, `upgrade.log` (updates of ReCasaOS), `package-update.log`, `docker-update.log`, and one file per optional module. The last lines of the one that matches your problem are usually enough:

```bash theme={null}
sudo tail -n 200 /var/log/casaos/app-management.log
```

## The service journals

```bash theme={null}
sudo journalctl -b -u casaos -u casaos-gateway -u casaos-app-management -u casaos-local-storage --no-pager -n 200
```

`-b` keeps what happened since the last start of the machine.

## An app's container

```bash theme={null}
sudo docker ps -a
sudo docker logs --tail 100 <container name>
sudo docker inspect --format '{{json .State.Health}}' <container name>
```

## Before you paste

> [!WARNING]
>
> Logs can hold secrets. Replace with `***`: passwords and tokens, the addresses of your machines and your public IP, host names and domain names, e-mail addresses.


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