# Shared clipboard

> Copy on one of your computers and paste on another, text and pictures, with your workspace's rules for what's shared and a history in the dashboard.

The shared clipboard puts what you copy on one of your computers on the clipboard of your others, without doing anything: copy on your laptop, paste on your desktop. Text and pictures (screenshots, copied images) both go across. Copies travel straight between your own computers over your private network, encrypted.

It only joins **your own** computers: the ones you signed in to. Nobody else in your workspace, admins included, gets your copies.

## What you need

- **Windows and macOS:** Underpass **0.8.1 or later** (Windows) or **0.8.2 or later** (Mac), with the Underpass app open (it can be minimised). Pictures, the workspace's rules and sending from the dashboard need **0.8.5 or later**.
- **Linux:** Underpass **0.8.2 or later** (pictures and rules 0.8.5), and run `underpass clipboard --install` once in your desktop session (see below). On a server without a desktop, `underpass clipboard copy` and `paste` (0.8.7).
- Your workspace hasn't turned it off: it's on unless an owner or admin turns it off in **Settings → Shared clipboard**.

## How it works

- **Copy as usual.** Within a second it's on the clipboard of your other computers that are online. The newest copy wins: if you copied something on the other computer since, that stays.
- **Pictures** go across when the clipboard holds a picture and no text, up to 10 MB. They arrive as PNG, so they paste anywhere. An animated GIF arrives as its first frame: when you copy one, the browser puts a still picture on the clipboard.
- **Passwords stay put.** A copy that a password manager marks as secret (1Password, Bitwarden, KeePass, Apple's Passwords and others) is never shared or kept.
- **Things that look like secrets stay put too**, unless your workspace allows them: API keys and tokens (more than 200 kinds, from [Gitleaks](https://github.com/gitleaks/gitleaks)), private keys, card numbers and random-looking passwords. Underpass tells you when it keeps a copy on the computer, with a notification.

## Copied lately

The dashboard's **Shared clipboard** page shows what you copied lately, live:

- **Copy** puts any of it on the clipboard of the device you're on, a phone included. Pictures open big when you click them, with **Download**.
- **Filter** by text, links, code or pictures, and **search**.
- **Pin** what you'll want again (up to 20): pinned copies stay until you unpin them.
- **Forget** one copy, or **Clear all**.

Only you see your copies. The dashboard keeps the last 50 for 24 hours (or what your workspace chose), pictures up to 2 MB, in memory only: never written to disk.

## Send from the dashboard

The box at the top of the **Shared clipboard** page sends text or a picture to your computers: type or paste, paste or drop a picture, and press **Send** (or Ctrl+Enter). Your computers that are online have it on their clipboard within a few seconds. It's the way to get something from your phone to your computer: copy it on the phone, open the page, paste, send.

## On one computer

On Windows, the Underpass app's **⋯ → Remote control** has the shared clipboard's switches for that computer (the menu is there while remote control is on for the workspace):

- **Shared clipboard**: off, nothing is shared from or to this computer.
- **Share what I copy here**: off, what you copy here stays here.
- **Paste copies from my others**: off, nothing from your other computers lands here.

## Linux

Linux has no Underpass app window; the shared clipboard is a command that runs in your desktop session:

```
underpass clipboard --install
```

`--install` starts it with every session from then on. It needs **wl-clipboard** on Wayland or **xclip** on X11 (`sudo apt install wl-clipboard`). To share one way only, add `--send-only` (your copies go out, nothing lands here) or `--paste-only`.

### Servers (no desktop)

A server has no clipboard of its own, so you pipe in and out of it instead. Copy something on your PC, then on the server (over SSH):

```
underpass clipboard paste              # print the latest copy from your other computers
underpass clipboard paste > config.yml # save it to a file
echo "hello" | underpass clipboard copy  # put it on your other computers' clipboards
```

- **paste** prints the newest copy from your other computers in the last hour, text or a picture (a picture has to go to a file). `--wait` waits for the next one. Nothing is kept once the hour is up, or when the server disconnects.
- **copy** sends text up to 64 KB, or a PNG picture (`underpass clipboard copy < shot.png`). One line break at the end is dropped, so pasting it into a terminal doesn't run it. It says which computers took it.
- The server must be **yours**: copies only go between one person's own computers, so a server that joined with a tagged key doesn't share a clipboard. It needs Underpass **0.8.7 or later**.
- Anyone who may use Underpass on the server (the `tailnet` group, or root) can paste what it holds, so keep it to people you'd share your clipboard with.

## For owners and admins

**Settings → Shared clipboard** sets the rules for the whole workspace. Every computer follows them (0.8.5 and later), and the dashboard's history follows them at once:

| Setting | What it does |
|---|---|
| **Shared clipboard** | Off: nothing is shared or kept, and everyone's history is cleared. |
| **Skip things that look like secrets** | On by default. Off: they're shared like other copies (password-manager copies are still skipped). |
| **Links**, **Code and commands**, **Other text**, **Images** | Off: that kind of copy stays on the computer it was made on. |
| **Largest copy** | 1, 10 or 64 KB of text. Longer copies stay on their computer. |
| **Keep a history** | Off: copies only go from computer to computer, and the dashboard keeps nothing. |
| **Keep copies for** | 1 hour or 24 hours. |

Changes to these rules appear in the [audit log](/manage/logs).

## Things to know

- On Windows and macOS, it works while the Underpass app is open.
- Phones can't read their clipboard in the background, so a phone uses the dashboard: **Copy** to take something, **Send** to give something.
- Files go across with [file drops](/features/file-drops) (0.8.7), not the clipboard.
- **Clocks:** before 0.8.6, copies were timed by each computer's own clock, so a computer whose clock was far off could drop copies (they looked older than what was already there). From 0.8.6 the receiving computer times them by its own clock, and a wrong clock doesn't matter. If copies don't arrive, update both computers (see [Troubleshooting](/reference/troubleshooting#clipboard-copies-are-missing)).
- To get pictures, rules and **Send** from the dashboard, both computers need 0.8.5 or later. See [Updates](/manage/updates).
