# Local Clipboard

Transfers text, images, and files across a trusted network through a NAS hub.

## Metadata

- HTML: https://glenzli.com/en/projects/local-clipboard/
- Markdown: https://glenzli.com/en/projects/local-clipboard.md
- Collection: Projects
- Language: en
- Published: 2026-08-23
- Updated: 2026-08-29
- Status: active
- Tags: clipboard, lan, file-transfer, macOS, windows, linux, pwa

## Content

Local Clipboard moves text, images, and files across a trusted LAN or private VPN. One always-on machine—usually a NAS—runs the hub, desktop machines run local clients, and phones connect through the hub's web app. There is no cloud service and no account system.

## Send on Demand

Local Clipboard does not watch every clipboard change. Ordinary `Cmd+C` and `Ctrl+C` stay local. Content leaves a machine only when the user presses the dedicated hotkey, chooses a tray action, or runs a command.

The built-in macOS and Windows hotkeys copy the current selection before sending the new clipboard value. Tray actions and `send-clipboard` send only what is already on the clipboard. Incoming text and images are written to the desktop clipboard; incoming files become pending offers and are saved to the downloads directory after acceptance.

Phones send and receive explicitly through the hub page. A single image can be sent to a desktop clipboard or transferred as a file. Received text, images, and files remain under the phone user's control to copy, save, or download.

## Hub and Network

```text
desktop A ── WebSocket ──▶ NAS hub ◀── WebSocket ── desktop B
                                │
                                └── mobile web page
```

The hub maintains device connections, forwards messages, and temporarily stores relayed files. Desktop clients keep a WebSocket connection and expose a local Console at `127.0.0.1:9101`; phones use the hub page. A shared token authorizes HTTP and WebSocket requests. A trusted mobile browser can store a derived credential instead of entering the token on every visit.

The hub uses plain HTTP and WebSocket, so the shared token does not encrypt traffic. The service belongs on a trusted LAN or private VPN, and port `9100` should not be exposed directly to the public internet.

## Platform Scope

The repository includes Docker deployment for a Linux amd64 hub, an Apple Silicon macOS installer, a Windows amd64 installation script, and a Linux client. The macOS and Windows clients include built-in hotkeys. The static Linux build requires the user to copy first, then invoke `send-clipboard` from a desktop shortcut.

The mobile page includes a Web App Manifest. Over plain HTTP, installation and clipboard APIs depend on the browser. A trusted HTTPS URL enables more complete PWA and clipboard behavior.
