# Secure mode

> The package encrypts reports and logs on your server before sending them, so only your devices can read them. Pulse stores a packet it can’t open.

- Section: Monitor your apps
- Availability: Pro and Team. Turning it on from the app is coming soon.
- URL: https://pulse-app.si/en/docs/apps/secure-mode

> **Can’t be turned on from the app yet**
>
> The server and the packages are ready, but the screen that creates the keys and turns on the mode isn’t in the app yet. This page describes how it works. An app without secure mode sends its reports in the clear, with secrets masked and no queries or business data.

## How it works

Diagram: The package encrypts before sending: the Pulse server keeps a packet it cannot open. The app screen that creates the keys and opens the packets is coming soon.

1. Your device creates a key pair. The private key stays in your devices’ keychain and never leaves it.
2. The public key, which starts with `pulse_pub_`, goes in your app’s `PULSE_PUBLIC_KEY` variable.
3. The package encrypts each report and each batch of logs with that key before sending.
4. Pulse stores the packet without being able to open it. It keeps only your key’s fingerprint.
5. The Pulse app decrypts the packet on your device when you read it.

**.env**

```bash
PULSE_PUBLIC_KEY=pulse_pub_…
PULSE_CLEAR=status
```

Encryption follows the HPKE standard (RFC 9180), with X25519, HKDF-SHA256 and AES-256-GCM.

## What Pulse can still see

To alert you, Pulse has to know something is wrong. `PULSE_CLEAR` chooses what stays readable: `status`, `checks`, `crons`, `versions`, or `none` for nothing. The default is `status`.

| Data | Readable by Pulse |
| --- | --- |
| Heartbeat | Yes, with no error text |
| Status summary | Only if `PULSE_CLEAR` includes `status` |
| Dependencies, tasks, versions | Only if `PULSE_CLEAR` names them |
| Full report and logs | No |
| Public key | No, only its fingerprint |
| Private key | Never |

## What changes in alerts

The notification no longer gives details: “2 issues reported. The details are encrypted: open Pulse to read them.” With `PULSE_CLEAR=none`, Pulse only knows the app is alive, so it alerts you if the app goes silent, but not if Redis goes down.

In the [MCP connector](https://pulse-app.si/en/docs/mcp/overview), an app in secure mode shows only its name and state.

## Package messages

The package writes these messages in English, whatever your language.

| Message | What to do |
| --- | --- |
| `Secure mode is on for this app: add PULSE_PUBLIC_KEY. Plain reports have stopped.` | Pulse refuses reports in the clear and keeps nothing from them. Add the key. |
| `PULSE_PUBLIC_KEY no longer matches the app’s key: copy it again from the Pulse app.` | The key changed. Replace the value and restart the app. |
| `Secure mode is off for this app: remove PULSE_PUBLIC_KEY or turn it back on in the app.` | Remove the variable or turn the mode back on. |
| `PULSE_PUBLIC_KEY is malformed: copy it from the Pulse app, it starts with pulse_pub_.` | Copy the whole key again. |

> **When your subscription ends**
>
> The mode stays on. Encrypted reports still show that the app is alive and the summary in the clear still applies, but the packet is no longer kept.

- [Live logs](https://pulse-app.si/en/docs/apps/logs): Encrypted lines in the app.
- [All variables](https://pulse-app.si/en/docs/packages/variables): `PULSE_PUBLIC_KEY` and `PULSE_CLEAR`.
