# Logs

> Read what your Cloud app writes while it runs, and the build log of a publish, to find out why something failed.
> Source: https://playcode.io/docs/publish/logs - last reviewed 2026-10-09.
> Ask Playcode's agent: "Read this app's production logs and tell me why sign-up fails." It reads the logs on the production or development computer and tells you what failed; what to change stays your call.

A Cloud app writes its logs on its own computer: open a terminal on the development or production computer and read them with `journalctl`. Each publish keeps its own build log in the **Deployment** window.

## Do it yourself

### Read the app's logs

1. Open the project menu (☰ and the project name, at the top left), choose **Terminal**, then **New PROD terminal** for the published app or **New DEV terminal** for the preview.
2. Show the last 200 lines of the backend:

   ```bash
   sudo journalctl -u playcode-backend -n 200 --no-pager
   ```

3. Watch new lines as they arrive, then stop with Ctrl+C:

   ```bash
   sudo journalctl -u playcode-frontend -f
   ```

4. Show the last 5 minutes of every app service:

   ```bash
   sudo journalctl -u 'playcode-*' --since '5 min ago'
   ```

### Read the build log of a publish

1. Open **Publish** and choose **View publish progress**.
2. Open **Build details**. When a publish fails, it opens by itself, under **What went wrong**.
3. Choose **Download log** to save the whole log as a file.

## If it doesn't work

### "Publish the project first to open a PROD terminal."

The production computer exists only after the first publish. Publish the app, or read the development logs.

### The log is empty or starts recently

The computer restarted, and a restart clears the logs. A restore, a change of computer size and a restart all do this.

### "No entries" for playcode-backend

The project may run its services under other names. List them with `systemctl list-units 'playcode-*'`, or ask the agent to find them.

### "This run's log is no longer available."

Playcode could not load the build log of that publish. Publish again to get a fresh log, or [ask a person](/docs/help/get-help-from-a-person) if the problem stays.

## Limits

- A computer keeps its logs in memory, up to 32 MB. A restart clears them; sleep does not.
- The development and production computers have separate logs.
- A log holds whatever your code prints. Do not print secrets or customer data.
- A static site has no server, so it has no server logs: its code runs in the visitor's browser.
