Skip to content

Guide · Open source

How to use qrcp: send files to your phone with a QR code

Updated · written with AI from the project's own documentation and checked against our catalogue data

qrcp is a command-line tool that serves a file from your computer over your local Wi-Fi network and prints a QR code. You scan the code with your phone, and the phone's browser downloads the file. This guide covers installing qrcp, sending and receiving files, and the main configuration options so you can use it without guesswork.

qrcpclaudiodangelis/qrcp · ★ 10.5k · MIT

Quick start

  1. 1Install qrcp. Install qrcp with your package manager, for example brew install qrcp on macOS, or with Go 1.18 or later.
  2. 2Confirm it works. Run qrcp --help to check the installation.
  3. 3Pick a file. Choose the file or folder you want to send from your computer.
  4. 4Run qrcp. Run qrcp followed by the file path. The tool prints a QR code in the terminal.
  5. 5Scan the code. Scan the QR code with your phone while both devices are on the same Wi-Fi network. The browser starts the download.

What qrcp does and how it works

qrcp binds a web server to the address of your Wi-Fi network interface on a random port and creates a handler for it. The default handler serves the content and exits the program when the transfer is complete.

The tool prints a QR code that encodes a URL in the form http://{address}:{port}/{random_path}. Most QR apps open detected URLs in the default browser, so scanning the code starts the download in the phone's browser.

Install qrcp

The README lists several ways to install qrcp. Homebrew is available on macOS, and there are package manager options for Linux, Windows and macOS. You can also install with Go, which requires Go 1.18 or later and installs the latest development version.

  • macOS: Homebrew
  • Linux: ArchLinux (AUR), Debian/Ubuntu, CentOS/Fedora packages
  • Windows: WinGet, Scoop, Chocolatey
  • Any platform with Go 1.18+: go install
brew install qrcp

Confirm the installation

After installing, check that qrcp runs by printing its help text.

qrcp --help

Send files from your computer to your phone

Pass the file or folder you want to send as an argument. qrcp prints a QR code. Scan it with your phone, and the browser downloads the content. The README also shows how to zip content before sending.

  • Send a file: qrcp MyDocument.pdf
  • Send multiple files: qrcp MyDocument.pdf IMG0001.jpg
  • Send a folder: qrcp Documents/
  • Zip before transferring: qrcp --zip LongVideo.avi
qrcp MyDocument.pdf

Receive files from your phone on your computer

qrcp can run in reverse. When used to receive files, it serves an upload page so the phone can send files to your computer. By default, received files go to the current directory; use --output to choose another directory.

  • Receive to the current directory: qrcp receive
  • Receive to a specific directory: qrcp receive --output=/tmp/dir
qrcp receive --output=/tmp/dir

Configure qrcp (optional)

qrcp works without prior configuration. You can customise it with a configuration file, which by default is stored at $XDG_CONFIG_HOME/qrcp/config.yml, or with environment variables prefixed with QRCP_. Use the --config flag to point to another file.

Useful keys include interface, port, path, output, keep-alive and secure. Keep-alive defaults to false, which means the server stops after the transfer. Secure defaults to false and uses HTTP unless you enable HTTPS with a certificate and key.

  • interface: network interface to bind to; any binds to 0.0.0.0
  • port: defaults to a random port
  • output: default directory for received files
  • keep-alive: keep the server running after transfers
  • secure with tls-cert and tls-key: use HTTPS
qrcp --config /tmp/qrcp.yml MyDocument.pdf

Choose a network interface or enable HTTPS

Use -i to pick a specific network interface, such as a VPN tunnel. Use -i any to bind to all interfaces. To use HTTPS, provide a TLS certificate and key.

qrcp --tls-cert /path/to/cert.pem --tls-key /path/to/cert.key MyDocument.pdf

What people use it for

  • Moving a PDF or photo to a phone without email or a cable
  • Sending a folder or several files to a phone in one step
  • Zipping a large video with --zip before sending it
  • Receiving files from a phone into a chosen directory with qrcp receive --output

Frequently asked questions

Is qrcp free to use?

qrcp is released under the MIT licence, according to the project's repository. Check the licence file in the repository for the full terms.

What do I need to use qrcp?

The README does not list prerequisites for the prebuilt packages. Building with go install requires Go 1.18 or later. Your phone and computer need to be on the same Wi-Fi network.

Can I send files over the internet with qrcp?

No. The README describes transfers over the local Wi-Fi interface, so both devices should be on the same network. It is not a cloud or remote sharing tool.

Does qrcp work on Windows?

Yes. The README lists Windows installation options using WinGet, Scoop and Chocolatey, and a prebuilt binary placed in a directory on your PATH.

Can I send a phone's files to my computer with qrcp?

Yes. Run qrcp receive to serve an upload page, and the phone can send files to your computer. Use --output to choose the destination directory.

What are the alternatives to qrcp?

The README lists similar projects including qr-fileshare, qrfile, share-file-qr and qrdeliver. These are other tools that also transfer files by scanning a QR code.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

qrcp suits people who work in a terminal and want to move a file to a phone on the same Wi-Fi network without email, cables or cloud storage. It is not a good choice for transfers across different networks, for users who need a graphical app, or for persistent sync or backup.

Install options & downloads