pcopy is a tool to copy/paste across machines. It can be used from the web UI, via a CLI or without a client by using curl. It can also be used as a self-hosted NoPaste or as a temporary file hosting service.
After installing the pcopy server, you can use the pcopy command line tool to copy from STDIN (pcp < file.txt) and
paste on any connected machine to STDOUT (ppaste > file.txt). If you don't have pcopy installed, you can also use its
super simple REST API to copy/paste, e.g. via curl.
The web UI allows you to paste text or upload files (even if they are gigabytes in size), and generates temporary links you can share with others.
To see what else pcopy can do, check out the live demo (aka nopaste.net) or the videos.
Features:
* 📋 Copy/paste across computers (via STDIN/STDOUT)
* 🔒 HTTPS secure server (via cert-pinning)
* 🔑 Clipboards can be password-protected, or they can be open for everyone
* 📚 Support for multiple clipboards (e.g. personal, work, ...)
* 🌎 Simple Web UI for uploading text snippets or large files
* 🔗 Direct temporary links to clipboard content (with TTL/expiration)
* 💻 No-install usage via curl (curl nopaste.net) and netcat (echo help | nc -N nopaste.net 9999)
* 👁️ Browser-only links that store your data in the URL fragment

Binaries can be found on the releases page.
Debian/Ubuntu (from a repository):
curl -sSL https://archive.heckel.io/apt/pubkey.txt | sudo apt-key add -
sudo apt install apt-transport-https
sudo sh -c "echo 'deb [arch=amd64] https://archive.heckel.io/apt debian main' > /etc/apt/sources.list.d/archive.heckel.io.list"
sudo apt update
sudo apt install pcopy
Debian/Ubuntu (manual install):
wget https://github.com/binwiederhier/pcopy/releases/download/v0.6.1/pcopy_0.6.1_amd64.deb
dpkg -i pcopy_0.6.1_amd64.deb
Fedora/RHEL/CentOS:
rpm -ivh https://github.com/binwiederhier/pcopy/releases/download/v0.6.1/pcopy_0.6.1_amd64.rpm
Docker (see detailed instructions):
docker run --rm -it binwiederhier/pcopy
Go:
# requires Go 1.16
go get -u heckel.io/pcopy
Manual install (any x86_64-based Linux):
wget https://github.com/binwiederhier/pcopy/releases/download/v0.6.1/pcopy_0.6.1_linux_x86_64.tar.gz
sudo tar -C /usr/bin -zxf pcopy_0.6.1_linux_x86_64.tar.gz pcopy
After installation, you may want to check out the Bash/ZSH autocomplete instructions.
To setup a new pcopy server, simply run sudo pcopy setup (see server setup demo):
sudo pcopy setup
sudo systemctl enable pcopy
sudo systemctl start pcopy
This will walk you through an interactive setup wizard and place a config file at /etc/pcopy/server.conf (see
sample config). The wizard will set up a pcopy user and a systemd service. Once the service
is started, it listens on port 2586 by default.
If you've enabled the Web UI, you can browse to it an paste text snippets or upload files to it (see live demo).
To join an existing clipboard, you may use pcopy join:
pcopy join private.example.com
pcopy join work.mycorp.com work
pcopy list
You can join multiple clipboards and give each of them an optional alias (see work clipboard above). Each
clipboard has its own config file, either in ~/.config/pcopy or in /etc/pcopy (for root). You can list connected
clipboards with pcopy list.
Now you can start copying and pasting by using pcp (short for: pcopy copy) and ppaste (short for: pcopy paste).
Any connected client, regardless of what computer it's on, can copy/paste like this (see copy/pasting videos):
pcp < foo.txt # Copies foo.txt to the default clipboard
pcp bar < bar.txt # Copies bar.txt to the default clipboard as 'bar'
echo hi | pcp work: # Copies 'hi' to the 'work' clipboard
echo ho | pcp work:bla # Copies 'ho' to the 'work' clipboard as 'bla'
pcp : img1/ img2/ # Creates ZIP from two folders, copies it to the clipboard
ppaste # Reads from the default clipboard and prints its contents
ppaste bar > bar.txt # Reads 'bar' from the default clipboard to file 'bar.txt'
ppaste work: # Reads from the 'work' clipboard and prints its contents
ppaste work:ho > ho.txt # Reads 'ho' from the 'work' clipboard to file 'ho.txt'
ppaste : images/ # Extracts ZIP from default clipboard to folder images/
The server can be configured via the well-documented config file /etc/pcopy/server.conf (see sample config).
Here are a few highlights:
When you set up a new clipboard via pcopy setup, you can enter a password. That derives a key, which is stored in the
config file (see Key section).
To add a password after initial setup, use the pcopy keygen command.
When joining a clipboard with pcopy join, you'll be asked for a password. When using curl, you can provide the
password via -u :<password> (see curl usage).
You can provide an (optional) alias to a clipboard when you pcopy join it (see join).
You may then later reference that alias in pcp <alias>:.. and ppaste <alias>:.. (see copy/paste).
To list all your connected clipboards, simple type:
$ pcopy list
Clipboard Server address Config file
--------- --------------- ----------------------------
work 10.0.160.67 ~/.config/pcopy/work.conf
default nopaste.net:443 ~/.config/pcopy/default.conf
pcopy comes with a Web UI. You can check out the demo.
(Note: I am not a web guy. I could use some help here!)

curl-compatible usageIf you don't want to install pcopy on a server, you can use simple HTTP GET/PUT/POSTs, e.g. via curl. There's an entire
curl help page available too if you just type curl <hostname>. You may use -u :<password> to provide the clipboard
password (if any). Here's an example for the demo clipboard:
# Show curl help page
curl nopaste.net
# Copy/upload to clipboard (POST/PUT both work)
curl -d Howdy nopaste.net/hi-there
curl -T germany.jpg https://nopaste.net/germany
# Paste/download from clipboard
curl https://nopaste.net/hi-there
nc-compatible usageSimilar to the curl API, you can upload files via netcat (nc). There's a detailed help page available by typing echo help | nc <hostname> <port>, e.g. echo help | nc -N nopaste.net 9999. Unlike the curl-API, the netcat usage is limited to uploading files only.
# Show nc help page
echo help | nc -N nopaste.net 9999
# Upload to clipboard
echo check this out | nc -N nopaste.net 9999
cat dog.jpg | nc -N nopaste.net 9999
# Upload with TTL
(echo "pcopy:?t=30m"; cat dog.jpg) | nc -N nopaste.net 9999
If you have particularly large files to send across, and you know you only want to send them to exactly one server,
you can use pcp --stream. It creates a FIFO device (mkfifo) on the server side, and will wait until a reading
client (ppaste or curl ..) is connected before sending.
# On machine 1
yes | pcp --stream # Will block until 'machine 2' is connected
# On machine 2
ppaste | pv > /dev/null
You can generate temporary links to clipboard entries with pcopy link. You can send this link to someone and they
can download the clipboard content without downloading the client or using any command line tools:
$ pcopy link hi-there
# Direct link (valid for 2d, expires 2021-01-29 22:35:09 -0500 EST)
https://nopaste.net/hi-there?a=SE1BQyA
# Paste via pcopy (you may need a prefix)
ppaste hi-there
# Paste via curl
curl -sSL 'https://nopaste.net/hi-there?a=SE1BQyAxNjA'
You can limit the clipboard usage in various ways in the config file (see config file), to avoid abuse:
ClipboardSizeLimit: Limits the total size of the entire clipboard (size of all files)ClipboardCountLimit: Limits the number of clipboard filesFileSizeLimit: Limits the per-file sizeFileExpireAfter: Limits the age of a file (after which they will be deleted)The demo clipboard uses these settings very restrictively to avoid abuse.
Inspired by nopaste.ml and paste, pcopy also supports links that
store all data in the URL fragment/anchor (the part in the URL after the #) and not on the server.
When the "Client-side" checkbox is checked in the Web UI, pcopy compresses the text in the editor using LZMA and then
encodes the result using Base64, e.g. https://nopaste.net/#XQAAAQAKAA.... As long as you have this link, this text can
never be deleted and never expires.
Here's an example.
When you open the link, pcopy reads, decodes, and decompresses whatever is after the #, and displays the result in the editor.
This process is done entirely in your browser, and the web server hosting pcopy never has access to the fragment.
The link is also compatible with the original implementations. Here's the same example for nopaste.ml and for topaz's paste.
You can also generate the links from the command line (thanks to nopaste.ml for this):
# Linux
echo -n 'Hello World' | lzma | base64 -w0 | xargs -0 printf "https://nopaste.net/#%s\n"
# Mac
echo -n 'Hello World' | lzma | base64 | xargs -0 printf "https://nopaste.net/#%s\n"
# Windows / WSL / Linux
echo -n 'Hello World' | xz --format=lzma | base64 -w0 | printf "https://nopaste.net/#%s\n" "$(cat -)"
To use the pcopy image, simply pull it and set up a few shell aliases to simplify local usage:
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"
This maps the following folders and ports (you may choose different host folders):
* Config folder: /etc/pcopy (image) to ~/.config/pcopy (host)
* Clipboard folder (only for server usage): /var/cache/pcopy (image) to ~/.cache/pcopy (host)
* Service port (only for server usage): 2586 (both image and host)
You can then use pcopy just like it was installed on your host system. To use it as a client, run
pcopy join (see join instructions). To set up a server, run
pcopy setup
pcopy serve
Tab completion is available for Bash and ZSH. For Bash, when installed via rpm/deb, autocomplete is immediately available. ZSH autocomplete installation is manual.
Bash (only if not installed via rpm/deb): ``` sudo wget -O /etc/bash_completion.d/pcopy https://raw.githubusercontent.com/binwiederhier/pcopy/master/scripts/autocomplete_bash sudo ln -s /etc/bash_completion.d/pc
$ claude mcp add pcopy \
-- python -m otcore.mcp_server <graph>