Operations 5 min read

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.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Instant PC‑Phone File Transfer with QR Codes Using qrcp

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/qrcp

Sending 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.avi

Receiving 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/target

Network 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.pdf

Reference

GitHub repository: https://github.com/claudiodangelis/qrcp

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

GonetworkQR codefile transfer
Liangxu Linux
Written by

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.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.