# Connect Synology DSM

Add Synology to Kochab with DSM username and password and default port 5001.

Canonical: https://kochab.io/docs/services/synology/

Synology DSM is an **infrastructure** service. Kochab uses the DSM Web API for storage, system stats, and Container Manager.

## What Kochab exposes through Synology

- **Storage:** volume utilization and capacity
- **System:** CPU, RAM, uptime, network throughput; temperature when DSM exposes the sensors Kochab reads
- **Container Manager:** container list, start/stop/restart/delete, log tail

## Not exposed through Synology

- Pause/unpause/kill. DSM answers these with error 103, "method does not exist" (verified on DSM 7.2.2), so Kochab does not offer them
- Image pull/recreate, autostart toggles, or container live stats
- VMs, iSCSI/LUN admin, or full Storage Manager configuration
- Multi-host Docker (one NAS per Synology entry)
- *arr/Plex library data (add app services on their own ports)

Prefer this native entry on Synology instead of Portainer on the same socket. See [Infrastructure vs container integrations](/docs/infra-vs-containers/).

## Before you start

Use a DSM account with permission to query system info and manage Container Manager containers. A dedicated low-privilege user is fine if it has the needed package access.

## Default connection

| Field | Typical value |
|---|---|
| Port | **5001** (HTTPS) or **5000** (HTTP) |
| Scheme | `https` recommended |
| Auth | DSM username + password (session login) |

Kochab logs in to the Synology Web API and keeps a session; credentials are stored in the device keychain.

## Add in Kochab

1. Open **Services -> Add service** and choose **Synology**.
2. Enter your **NAS hostname or IP**.
3. Set port **5001** for HTTPS (or **5000** for HTTP).
4. Enter **username** and **password**.
5. Tap **Test and add**.
6. Use **Infrastructure** for volumes, stats, and containers.

## Notifications (optional webhook)

Kochab can surface DSM alerts as a push notification. DSM 7.1+ has a native webhook, so this is a one-time setup in DSM.

1. In Kochab, open the **Notifications** screen, find this Synology instance, and copy its **hook URL**.
2. In DSM, open **Control Panel -> Notification -> Push Service -> Webhooks** and add a provider.
3. Set the provider **URL** to the hook URL you copied.
4. Set the request **body** template to exactly:

   ```json
   {"eventType": "synology.alert"}
   ```

5. Under the DSM **Notification rules**, enable **Push Service** for the alert categories you want to reach Kochab.

Only that fixed token is sent, so no alert text leaves your NAS; Kochab fetches the detail over its own authenticated connection. The token in the hook URL is a credential: keep it private, and if it leaks, revoke and re-mint the hook in Kochab.

## TLS

Synology often uses a private certificate. Trust TOFU or import your CA when prompted. See [Certificate trust](/docs/cert-trust).

## Tips

- Two-factor authentication on the DSM account may block API login; use an app password or a dedicated API user without 2FA if your policy allows.
- Roaming: add an external URL on the stack for QuickConnect or VPN hostnames away from home.

## Official docs

[Synology DSM help](https://kb.synology.com/en-global/DSM/help)