Instant PC‑Phone File Transfer with QR Codes Using qrcp
This guide explains how qrcp creates a QR‑coded URL to bind a temporary web server for seamless file transfers between computers and mobile devices, covering its inner workings, installation via Go or binary releases, and detailed command‑line usage for sending and receiving files.
Overview
qrcp starts a temporary HTTP server bound to a random port on the machine’s Wi‑Fi interface (or a user‑specified interface). It generates a QR code that encodes a URL of the form http://{address}:{port}/{random_path}. Scanning the QR code opens the URL in a mobile browser, allowing the device to download files from the server or upload files to it.
Installation
Two common installation methods are supported:
Go install (requires Go 1.8+): go get github.com/claudiodangelis/qrcp Binary release : download the latest binary from the GitHub Releases page, place it in a directory that is in $PATH (e.g., /usr/local/bin), and make it executable:
chmod +x /usr/local/bin/qrcpSending Files
Send a single file: qrcp MyDocument.pdf When multiple files or a directory are provided, qrcp automatically creates a zip archive, serves it, and removes the archive after the transfer.
# Multiple files
qrcp MyDocument.pdf IMG0001.jpg
# Whole folder
qrcp Documents/Force compression even for a single file:
qrcp --zip LongVideo.aviReceiving Files
Start a receive server that shows an upload page. Files are saved to the current working directory by default: qrcp receive Specify a target directory by providing the path after the command:
qrcp receive /path/to/targetNetwork Interface Selection
qrcp automatically selects a suitable network interface, but you can explicitly choose one with -i or --interface. Example binding to the tun0 interface: qrcp -i tun0 MyDocument.pdf Using the special interface name any binds the server to 0.0.0.0, making it reachable from any network (useful on cloud VMs such as AWS EC2, DigitalOcean droplets, or GCP instances):
qrcp -i any MyDocument.pdfReference
GitHub repository: https://github.com/claudiodangelis/qrcp
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
