Skip to main content

ClipSync

Peer-to-peer clipboard sync for Windows, macOS, and Linux. Copy on one machine, paste on another. No account, no cloud, no central server. The data never leaves your devices.

Verified working across Windows, macOS, and Linux, across different networks.

Why this exists

Every other cross-platform clipboard tool I found falls into one of three buckets:

  1. Same-LAN only - needs mDNS or a discovery broadcast, so it breaks the moment you're on a different network (or a corporate one that blocks multicast).
  2. Needs a signaling server - even the "peer-to-peer" modes usually still need a relay or a server you host somewhere, which means one more thing to maintain and one more thing that can go down.
  3. Reinvented the networking stack - custom libp2p, custom NAT traversal, custom encryption. Which means custom bugs.

The design choice here is to reuse Syncthing instead of inventing anything. Syncthing has already solved peer discovery, NAT traversal, TLS with forward secrecy, and relay fallback for millions of users. By treating a single file (clipboard.txt) inside a shared Syncthing folder as the transport, you inherit all of that for free, including cross-WAN sync that just works, without Tailscale, without port forwarding, and without a VPN.

Two loops sit on top:

  • OUT polls the local clipboard and writes changes to the file.
  • IN watches the file with filesystem events and applies remote changes to the clipboard.

A shared-last-value guard prevents ping-pong when both sides see the same write. Newlines are normalized to LF so Windows CRLF doesn't look like a real change and retrigger sync.

At-rest encryption

Syncthing already encrypts data in transit. For defense-in-depth, in case someone gains read access to the sync folder on one device, you can set a passphrase in Settings. Payloads are then encrypted with Fernet (AES-128-CBC + HMAC-SHA256) using a PBKDF2-SHA256 key derivation, and prefixed with a CSENC magic header so peers can detect ciphertext and refuse to paste it raw.

Every device in the group needs the same passphrase. A mismatch logs a clear "decrypt failed (passphrase mismatch?)" message rather than silently pasting ciphertext.

Install

pip install offbyonebit-clipsync
clipsync

Note: the PyPI package name is offbyonebit-clipsync (the name clipsync was already taken).

Or run from source:

pip install -r requirements.txt
python -m clipsync

Python 3.11+. The correct Syncthing binary for your platform is downloaded on first run from the official Syncthing GitHub release.

Linux setup notes

pystray picks its tray backend at import time: PyGObject + AppIndicator if available, XEmbed otherwise. KDE Plasma and several other modern desktops no longer render XEmbed icons; they only speak StatusNotifierItem, which AppIndicator provides. If the tray icon silently never appears, install the system packages and make them visible to your venv.

Debian / Ubuntu / Mint

sudo apt install python3-gi gir1.2-ayatanaappindicator3-0.1 xclip

Fedora

sudo dnf install python3-gobject libayatana-appindicator-gtk3 xclip

Arch

sudo pacman -S python-gobject libayatana-appindicator xclip

If you use a virtualenv, set include-system-site-packages = true in its pyvenv.cfg so the system-installed PyGObject is importable. xclip is the X11 backend pyperclip uses for clipboard access; on Wayland install wl-clipboard instead. GNOME users typically also need the AppIndicator extension for the icon to actually show up.

Pairing

  1. Tray icon -> Add Device.
  2. On the second machine, do the same.
  3. Scan the QR code with the webcam, or paste the device ID shown below it.
  4. Both sides auto-accept and start syncing.

Settings

  • Start on login (HKCU Run on Windows, LaunchAgent on macOS, XDG autostart on Linux).
  • Show notifications.
  • Pause sync.
  • Sync folder path.
  • Encryption passphrase.
  • View Syncthing logs.
  • Reset / unpair all devices.
  • Check for updates (compares against the latest GitHub release and opens the download page, no auto-install, no phone-home on startup).

Settings changes from the UI take effect immediately; hand-editing settings.json is also picked up, the file is watched for changes.

How it compares

Tool Cross-WAN No signaling server E2E encrypted Tray UI
ClipSync yes (via Syncthing relays) yes yes yes
p2p-clipboard partial yes yes yes
ClipCascade yes no (self-host required) yes yes
cross-clipboard no (LAN mDNS) yes yes no
macOS Universal Clipboard yes (iCloud) no N/A built-in
Windows Cloud Clipboard yes no (Microsoft account) N/A built-in

Project layout

Module Purpose
config.py Paths, settings with on-disk watch, logging.
syncthing.py Binary download, config generation, REST API client, subprocess lifecycle.
clipboard.py OUT poll + IN watcher, loop guard, optional Fernet encryption.
pairing.py QR generation, webcam scan, auto-accept of pending devices.
ui.py CustomTkinter windows for pairing, devices, and settings.
autostart.py Cross-platform "run at login" toggle.
main.py Tray icon, orchestration, shutdown ordering.

Status

Fully tested and working on Windows, macOS, and Linux.

License

MIT. See LICENSE. You can fork, modify, and redistribute (including commercially), but the copyright notice must travel with the code.

Support

This project is free and I don't ask for anything. If it's useful to you, a star on the repo is appreciated, and if you want to follow along with other things I'm building, you can find them under @offbyonebit.

If you'd like to support development, you can sponsor me on GitHub.

Metadata

Release files for offbyonebit-clipsync 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for offbyonebit-clipsync 1.1.0
File Size Uploaded Provenance Actions
offbyonebit_clipsync-1.1.0.tar.gz 88.3 kB Without provenance Details for offbyonebit_clipsync-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for offbyonebit-clipsync 1.1.0
File Interpreter ABI Platform Actions
offbyonebit_clipsync-1.1.0-py3-none-any.whl Python 3 none any Details for offbyonebit_clipsync-1.1.0-py3-none-any.whl

Total release size: 159.9 kB

Release files / offbyonebit_clipsync-1.1.0.tar.gz

Download URL offbyonebit_clipsync-1.1.0.tar.gz
Size 88.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d1d03f445177ddd66fc1b71396cc4b7d18caf427e97a12c90853ae6347e712cd
BLAKE2b-256 checksum
How to use checksums
72eb28939d4f1328f09baa01a015a11bb94359032533a77acce3ec8b89bc7b57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.3","id":"zena","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / offbyonebit_clipsync-1.1.0-py3-none-any.whl

Download URL offbyonebit_clipsync-1.1.0-py3-none-any.whl
Size 71.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1a7a08ce97ce1a99a28bfe63da1971f4d11661f5653f959fa27141304dc3af31
BLAKE2b-256 checksum
How to use checksums
61afec440f1febf743be0a0a92f656dc95038a15b0444ca8e730eceef5898758
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Linux Mint","version":"22.3","id":"zena","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for offbyonebit-clipsync 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page