official pcopy executable (v0.6.*) with some custom style changes, compiled with go 1.24, serving via docker image (FROM debian:stable-slim).
run the container with: docker run --rm -it bfancy/pcopy. this will print the usage text.
to really use it as a clipboard tool set it up like this:
docker pull bfancy/pcopy
alias pcopy="docker run --rm -v ~/.cache/pcopy:/var/cache/pcopy -v ~/.config/pcopy:/etc/pcopy -p 2586:2586/tcp -it bfancy/pcopy"
alias pcp="pcopy copy"
alias ppaste="pcopy paste"
for further instructions see here: docker usage.
to deploy the container, you will need at least one directory containing the clipboards (./cache). here is my compose.yaml file for deployment with docker:
$ cat compose.yaml
services:
pcopy:
image: bfancy/pcopy:latest
restart: unless-stopped
ports:
- "127.0.0.1:2586:2586"
volumes:
- "./cache:/var/cache/pcopy"
- "./config:/etc/pcopy"
command: ["serve"]
the second directory (./config) contains the server.conf file. here is mine:
$ cat ~/.config/pcopy/server.conf
ServerAddr http://test.server.example:80
ListenAddr :2586/http
WebUI true
to use the above configured pcopy server behind a reverse-proxy server like nginx use a site config like this:
$ cat /etc/nginx/sites-enabled/pcopy-test
upstream pcopy_upstream {
server 127.0.0.1:2586;
}
server {
listen 80;
server_name test.server.example;
access_log off;
log_not_found off;
location / {
proxy_pass http://pcopy_upstream;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_connect_timeout 1m;
proxy_send_timeout 1m;
proxy_read_timeout 1m;
}
}
BEWARE: everyone can join your pcopy instance now. better write parameter Key XXXXXXXX (created via pcopy keygen) to your server.conf.
another best practice is to deploy a pcopy instance only via https with a valid certificate for the domain!
Content type
Image
Digest
sha256:3b651ae39…
Size
33.8 MB
Last updated
4 months ago
docker pull bfancy/pcopy