selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

pcopy logo

Self-host pcopy

v0.6.1

Cross-machine clipboard and temporary file host

BetaOpen SourceApache-2.0
Updated2 years ago
LanguageGo
Setup difficultyModerate
Stars
428
Port
2586 (HTTPS server (Web UI, curl API, CLI))
Docker
binwiederhier/pcopy
Install with Docker
pcopy screenshot 1pcopy screenshot 2pcopy screenshot 3pcopy screenshot 4pcopy screenshot 5pcopy screenshot 6

What is pcopy?

pcopy is a self-hosted clipboard synchronization tool that enables copying and pasting text snippets or files across different machines. It runs as a server that listens on port 2586 (HTTPS) and optionally port 9999 (raw TCP for netcat uploads). Users interact via a CLI (pcp/ppaste), a web UI for drag-and-drop uploads, curl for scriptable access, or netcat for zero-dependency uploads. The server supports multiple named clipboards, each optionally password-protected with key derivation. Files can be shared via temporary links with configurable TTL/expiration, and a browser-only mode stores data entirely in the URL fragment without server storage. The server stores data on the local filesystem with configurable limits on total size, file count, per-file size, and expiration. It is written in Go, distributed as a single binary, and available as Docker image, Debian/Ubuntu packages, RPM, Homebrew, and via Go install.

Should you self-host pcopy?

pcopy scores 49/100 on selfhost.directory (how scoring works) and ranks #19 of 27 in File Sharing & Collaboration. It has 428 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is moderate: expect some configuration beyond a single command. An official Docker image is available. It is Apache-2.0-licensed and written mostly in Go.

Its closest alternative on selfhost.directory is Nextcloud (86/100, 37 325 stars). It scores higher overall, so compare the two before you pick. See pcopy vs Nextcloud side by side.

Features

  • Browser-only links
  • Certificate pinning
  • Clipboard usage limits
  • Cross-machine clipboard sync
  • curl-compatible API
  • File extraction
  • Folder/ZIP copy
  • Multiple clipboards
  • Netcat-compatible upload
  • Password-protected clipboards
  • Streaming transfer
  • Temporary share links with TTL
  • Web UI

pcopy README

How to install pcopy

Install pcopy with Docker

docker pull binwiederhier/pcopy alias pcopy="docker run --rm -v ~/.cache/pcopy:/var/cache/pcopy -v ~/.config/pcopy:/etc/pcopy -p 2586:2586/tcp -it binwiederhier/pcopy" alias pcp="pcopy copy" alias ppaste="pcopy paste"

Maps config to ~/.config/pcopy, clipboard data to ~/.cache/pcopy, port 2586

How to configure pcopy

  • CertFileConfig path with .crt extensionPath to TLS certificate for HTTPS traffic

    Path to TLS certificate for HTTPS traffic

    values: /some/path/to/server.crt (PEM formatted)

  • ClipboardCountLimit0 (disabled)Maximum number of clipboard files

    Maximum number of clipboard files

    values: <number>

  • ClipboardDir/var/cache/pcopyPath to directory where clipboard data resides

    Path to directory where clipboard data resides

    values: /some/folder

  • ClipboardNamepcopyName of the clipboard as shown in the Web UI

    Name of the clipboard as shown in the Web UI

    values: <string>

  • ClipboardSizeLimit0 (disabled)Maximum total size of entire clipboard (sum of all files)

    Maximum total size of entire clipboard (sum of all files)

    values: <number>(GMKB)

  • DefaultIDdefaultDefault clipboard ID used when CLI is used without an ID

    Default clipboard ID used when CLI is used without an ID

    values: string consisting only of 0-9a-z.-_, but has to start with 0-9a-z

  • FileExpireAfter7dDuration after which clipboard contents are deleted (default, nontext-max, text-max)

    Duration after which clipboard contents are deleted (default, nontext-max, text-max)

    values: default [nontext-max [text-max]] (durations: s|m|h|d|w|mo|y)

  • FileModesAllowedrw roAllowed file modes for uploads (read-write, read-only)

    Allowed file modes for uploads (read-write, read-only)

    values: rw|ro [rw|ro]

  • FileSizeLimit0 (disabled)Maximum size per uploaded clipboard file

    Maximum size per uploaded clipboard file

    values: <number>(GMKB)

  • KeyDerived key for password-protected clipboard (SALT:KEY base64)

    Derived key for password-protected clipboard (SALT:KEY base64)

    values: SALT:KEY (both base64 encoded)

  • KeyFileConfig path with .key extensionPath to private key for TLS certificate

    Path to private key for TLS certificate

    values: /some/path/to/server.key (PEM formatted)

  • ListenAddr:2586/httpsAddress and port to bind the server (HTTPS, HTTP, raw TCP)

    Address and port to bind the server (HTTPS, HTTP, raw TCP)

    values: [ADDR]:PORT[/(https|http|tcp)]

  • ServerAddrURL or hostname/port of the pcopy server, advertised to clients

    URL or hostname/port of the pcopy server, advertised to clients

    values: [http(s)://]HOST[:PORT]

pcopy releases & version history

More in File Sharing & Collaboration

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…