A secure, native terminal for the Synology DSM desktop. DiskShell gives DSM administrators a modern multi-tab shell with persistent sessions, split views, search, uploads, and explicit clipboard controls—without exposing a separate terminal port on the network.
- Multiple shell tabs — work in up to four independent terminals in one DSM window and rename them for quick orientation.
- Background sessions — keep a shell and its processes running after its tab or the DiskShell window is closed, then reopen it later.
- Split view — place two existing tabs side by side or one above the other, with clear pane ownership and independent terminal sizing.
- Terminal search — search each tab's scrollback with
⌘ForCtrl+Fand navigate between matches. - Drag-and-drop uploads — securely upload files into the active shell's current directory.
- Deliberate clipboard access — Copy & Paste remains disabled until it is explicitly enabled for the current DiskShell window.
- DSM-native authentication — uses the current DSM session, allows DSM administrators only, and starts the shell under the authenticated account.
- Live system monitor — automatically scaled one-minute histories per logical CPU core and for RAM usage, the fullest NAS volume, fastest fan, and hottest drive sensor; values stream every two seconds over an authenticated WebSocket. Click a widget for scrollable individual readings. A shared sampler avoids per-window polling; DSM sessions are revalidated every minute; temporary lookup failures reconnect with backoff. A monotonic graph clock and sample sequence numbers tolerate NAS clock corrections. History resets on service restart and otherwise survives reconnects and shows gaps where no readings were collected. Hidden monitors suspend their connections, and sampling pauses when no monitors are subscribed. Fans and disk temperatures require readable Linux hwmon sensors; unsupported hardware (including VirtualDSM) shows an unavailable indicator.
- Responsive toolbar — accessible icon controls, state-aware tooltips, and a compact layout that adapts to the DSM window. Monitor widgets disappear from right to left as the window narrows: drive temperature, fans, volume usage, RAM, then CPU.
Sudo shells can be opened with plus with shield beside the new-tab button. DiskShell starts sudo as the authenticated DSM account; sudo applies its normal policy. The password dialog sends the credential over the authenticated connection to a one-shot stdin pipe for sudo, separately from terminal input. Background persistence is opt-in for these tabs too. File uploads still use the DSM account permissions.
DiskShell currently targets DSM 7.2 on x86_64 Synology systems.
- Download the latest
.spkand its checksum from GitHub Releases. - Verify the downloaded package against the
.sha256file. - In DSM, open Package Center → Manual Install and select the SPK.
- Launch DiskShell from the DSM main menu while signed in as an administrator.
DiskShell's service listens only on 127.0.0.1:16082. DSM's nginx proxy exposes
the application under /diskshell/; no additional network port is published.
- Node.js 22 or newer
- npm
- Go 1.26 or newer
- GNU
tar
Install dependencies, validate the project, and build an SPK:
npm ci
npm run check
npm test
npm run buildThe package is written to:
build/DiskShell-<version>-<revision>.spk
When multiple Go toolchains are installed, select one explicitly:
DISKSHELL_GO_BINARY=/path/to/go npm run buildUse a unique package revision for every package installed on a live DSM system. This prevents DSM from reusing cached JavaScript or CSS assets:
DISKSHELL_PACKAGE_REVISION=42 npm run buildThe browser UI is written in TypeScript and SCSS and uses xterm.js. A compact Go
service validates the active DSM session, verifies membership in the DSM
administrators group, and launches /bin/sh under that account through a
pseudo-terminal.
Important boundaries include:
- same-origin checks for terminal, session, and upload requests;
- bounded WebSocket messages, terminal output buffers, uploads, and concurrent shell sessions;
- per-account ownership for sessions and uploaded files;
- no DSM tokens in nginx access logs;
- a loopback-only backend behind DSM's existing web proxy.
Background sessions live inside the DiskShell service. They survive browser and DiskShell window closures, but not a package restart, DSM reboot, or service failure.
| Path | Purpose |
|---|---|
src/ui/ |
DSM desktop UI, terminal components, styles, and translations |
native/ |
Go HTTP/WebSocket service, session manager, PTY, and uploads |
payload/ |
Files installed into the SPK payload |
conf/ |
DSM package permissions and resource declarations |
scripts/ |
DSM package lifecycle and service scripts |
test/ |
Package, security-boundary, and integration tests |
build.mjs |
Deterministic frontend, native binary, and SPK build |
Use a disposable DSM test system and a unique package revision. After installation:
-
Confirm
/diskshell/healthreturns{"status":"ok"}through the DSM URL. -
Open DiskShell as a DSM administrator and run:
printf '__DISKSHELL_OK__\n' id -un stty size
-
Verify the marker, authenticated account, and a non-zero terminal size.
-
Resize the DSM window and verify
stty sizechanges accordingly. -
Confirm non-administrator accounts cannot open a shell.
Contributions are welcome. Keep changes focused and preserve the authentication and privilege boundaries.
- Fork the repository and create a feature branch.
- Install dependencies with
npm ci. - Make the change and add or update relevant tests.
- Run
npm run checkandnpm test. - Open a pull request describing the behavior, security impact, and DSM testing performed.
Please do not test package installation on a production NAS.
The version in package.json must match the semantic Git tag. Pushing a tag such
as v1.3.0 runs the release workflow, builds revision 1, generates a SHA-256
checksum, and publishes both files as a GitHub Release.
Before tagging a release:
- Update
package.json,package-lock.json, andCHANGELOG.mdtogether. - Run
npm ci,npm run check, andnpm test(including the native tests on Linux). - Build with
DISKSHELL_PACKAGE_REVISION=1 npm run buildand verify the SPK on a disposable DSM system. - Commit the release preparation, then create and push the matching version tag when ready to publish.
The default package revision is 1; use a higher explicit revision for subsequent
builds installed under the same version. Updating the package restarts its service
and ends all active shells, including background sessions.
DiskShell is available under the MIT License.
