How to Use Croc: Send Files Between Any Two Computers

CodexFuse Team · 2026-10-30T09:52:53.880Z · 9 min read

If you have ever needed to get a file from one computer onto another — a laptop and a desktop, your home PC and a server, your machine and a friend's — and reached for email, a USB stick, or a cloud upload just to move a few megabytes, this guide is for you. Learning how to use croc takes about five minutes, and it replaces all of that with a single command and a short code phrase.

Croc is a free, open-source (MIT-licensed) command-line tool by developer Zack Schollz that sends files and folders between any two computers. There is no account to create, no server to configure, and no port forwarding. You type croc send on one machine, croc prints a short code phrase, and the other machine types that phrase to receive the file.

What Is Croc, and How Does It Work?

Croc is a cross-platform file-transfer tool (Windows, macOS, Linux, plus a browser client) built around one idea: the code phrase is both the address and the password. When the sender and receiver enter the same phrase, croc runs a PAKE — password-authenticated key exchange — handshake that negotiates a secret encryption key directly between the two machines.

That handshake is what makes the transfer end-to-end encrypted. A public relay server introduces the two machines and passes the data along, but it only ever sees ciphertext: it cannot read your file names, your file contents, or your code phrase. Keep the mental model simple: the phrase is the address and the password, and the relay is just a blind courier.

Prefer a browser over the terminal? CodexFuse's croc file share tool offers a web-based way to move files, while the rest of this guide covers the command-line tool itself.

The project's own documentation (checked today) lists the headline facts: croc transfers files and folders, sends multiple files at once, resumes interrupted transfers, needs no local server or port forwarding, and the project has passed 40,800 stars on GitHub.

How Do I Install Croc?

Pick the row for your platform and run the command. That is the whole installation — croc is a single binary with no dependencies.

PlatformCommandNotes
macOSbrew install crocvia Homebrew
Windowsscoop install croc or choco install crocvia Scoop or Chocolatey
Arch Linuxpacman -S crocofficial repositories
Debian / Ubuntusudo apt install croc (pkg.haus repo) or the release .debthird-party repo; match your architecture
Any Linux / macOScurl https://getcroc.com | bashofficial installer script
Androidcrocgui or croc-appGUI clients on F-Droid
No install at allopen getcroc.combrowser client, fully compatible with the CLI

Version note: the current release is v11.5.5, published October 19, 2026 (checked via the GitHub releases API today). The CLI checks for updates in the background at most once every 24 hours, so you will hear about new releases without doing anything.

How Do I Send My First File With Croc?

Here is the entire ceremony, in three steps:

  1. Send. On the sending computer, open a terminal and run croc send myfile.pdf. Croc prints a code phrase — something like 3456-some-rocket.
  2. Receive. On the receiving computer, run croc 3456-some-rocket (or run bare croc and paste the phrase when prompted).
  3. Confirm. The receiver sees the file name and size, presses y to accept, and the transfer runs. The file lands in the current directory.

The code-phrase lesson, said once: treat the phrase like a password for the life of the transfer. Send it to the other person over a separate channel — a message, a call, a QR scan — because anyone holding it while the sender is waiting can claim the file.

How Do I Receive a File With Croc?

Receiving is the simpler half of the pair. Type croc followed by the sender's code phrase, review the file name and size croc shows you, and press y. That confirmation step is deliberate — croc never writes a file to your machine without asking first.

Three flags cover the routine cases: --yes accepts automatically (useful in scripts), --overwrite replaces an existing file without prompting, and --rename keeps both files by saving the incoming one under a new name, like video (1).mkv.

How Do I Set a Custom Code Phrase?

If you would rather pick a memorable phrase than read out a random one, pass --code:

croc send --code blue-river-seven report.pdf

The receiver then runs croc blue-river-seven. Custom phrases must be at least 6 characters. One documented quirk: a custom code maps directly onto the public relay pool, while an auto-generated code probes the pool and picks the healthiest relay — in practice you will not notice the difference.

Can Croc Send Folders, Multiple Files, and Text?

Yes to all three, and folders need no special treatment — no flags, no zipping first:

croc send project-folder/

Multiple files and folders go in one command: croc send file1.pdf file2.pdf photos/. Short text and URLs travel the same way: croc send --text "hello world". Sending a big project folder? Trim the junk first with croc send --exclude "node_modules,.venv" project/, which skips anything whose path contains those strings.

What Are Pipes, QR Codes, and Proxies For?

Croc plays well with the Unix toolbox. Stream a file straight from stdin with cat backup.sql | croc send, and on the receiving end write a transfer to stdout with croc --yes <code-phrase> > out.

Moving a file to your phone? Run croc send --qr document.pdf and croc shows a QR code that opens the getcroc.com web client in receive-only mode — scan it and the file downloads in the browser. On restricted networks, croc --socks5 "127.0.0.1:9050" send file.pdf routes the transfer through a SOCKS5 proxy such as Tor.

What Is the Croc Relay Rule?

The relay rule, said once: the default public relay is fine for ordinary files, because it only ever sees ciphertext — but it is still someone else's server, so self-host the relay for anything genuinely private.

Self-hosting is one command on your own machine or VPS: croc relay (it uses TCP ports 9009–9013 by default). Then point both ends at it: croc --relay "myrelay.example.com:9009" send file.pdf. The project's relay documentation even publishes its abuse protection — 64 incomplete handshakes in total, 32 per source IP — so a stranger cannot cheaply camp on your relay.

Under the hood, current croc (v11) first tries to open a direct encrypted path between the two machines — a WireGuard-based link that gets promoted whenever NAT traversal succeeds — and falls back to the relay when it cannot. Either way, the PAKE handshake means the middle of the connection cannot read the data.

If you are putting that relay on your own server, our guide to what VPS hosting is explains the machine underneath it.

How Do I Keep My Code Phrase Out of Shell History?

On Linux and macOS, hand croc the secret through the CROC_SECRET environment variable instead of typing it as a command argument. The project's README calls this out explicitly: putting the secret on the command line can leak it via the process name, and it links NVD guidance on the issue. The README prints the pattern as CROC_SECRET=<redacted> for exactly this reason. On a single-user machine you can also make the safer behavior permanent with croc --classic.

Does Croc Resume Interrupted Transfers?

Yes. Resuming interrupted transfers is one of croc's headline features: if the network drops halfway through, re-run the same send command and croc picks up where it stopped instead of starting over. That alone makes it worth reaching for on flaky hotel or café Wi-Fi.

How Is Croc Different From scp, rsync, and LocalSend?

ToolWhat it needsBest for
scpSSH access to a reachable hostQuick copies between your own machines
rsyncSSH access to a reachable hostSynced, incremental copies
LocalSendSame local network, GUI/mobile appsPhone-to-PC transfers on the same Wi-Fi
crocJust the code phraseAny two computers, anywhere, from the terminal

The lane line, drawn once: LocalSend is the app lane — phones and PCs on the same network; croc is the terminal lane — two machines, one code phrase, no same-Wi-Fi requirement, working across the internet. (Our LocalSend beginner guide is queued next in this series; the two are siblings, never rivals.)

Developers who live in the terminal usually pair tools like this with version control — see our Git beginner guide and GitHub beginner guide. And if croc's newer croc ssh shared-terminal feature has you thinking about keys, our SSH key generator makes a fresh pair in seconds.

Croc Command Cheat Sheet

TaskCommand
Send a filecroc send file.pdf
Receivecroc <code-phrase>
Custom code phrasecroc send --code my-phrase file.pdf
Send a foldercroc send folder/
Send short textcroc send --text "hello world"
Pipe from stdincat file | croc send
Receive to stdoutcroc --yes <code-phrase> > out
QR code for mobilecroc send --qr file.pdf
Exclude junk from a foldercroc send --exclude "node_modules,.venv" folder/
Self-host the relaycroc relay, then croc --relay "host:9009" send file
Send via a proxycroc --socks5 "127.0.0.1:9050" send file.pdf
Async transfer (sender may go offline)croc store file.pdf (1-day expiry, 1 download by default)

Sources

  • schollz/croc GitHub repository README — install commands, usage flags, relay and transport details, environment-variable guidance (fetched October 30, 2026): github.com/schollz/croc
  • GitHub Releases API for schollz/croc — current release v11.5.5, published October 19, 2026 (checked October 30, 2026)
  • TechRepublic, "How to easily transfer files between computers with croc" (October 2021) — the classic send/receive walkthrough and custom code phrases
  • x-cmd croc install page — PAKE end-to-end encryption explainer, pipes, resumable transfers, QR codes (crawled October 30, 2026)

Frequently Asked Questions

Is croc really end-to-end encrypted?

Yes. The code phrase feeds a PAKE handshake that negotiates the encryption key between the two machines, so the relay only ever passes ciphertext and stores nothing. This is documented in the project's own README, not a marketing claim.

Is croc free?

Yes. It is MIT-licensed open source and free on every platform, and the getcroc.com browser client needs no install at all.

Do both computers have to be online at the same time?

For a normal send, yes — the sender waits while the receiver connects. If you need asynchronous delivery, croc store uploads client-side-encrypted ciphertext and gives you a link and token (one-day expiry and one download by default).

Can I use croc on my phone?

The sender can run croc send --qr file to show a QR code that opens the getcroc.com web client in receive-only mode — scan it and the file downloads in the mobile browser. F-Droid also carries GUI clients such as crocgui and croc-app.

What if someone guesses my code phrase?

The phrase only works while the sender is actively waiting for a receiver, and relays rate-limit handshakes (the relay docs cite 64 incomplete handshakes in total, 32 per source IP). For sensitive files, use a long custom code — and self-host the relay so no third party is in the middle at all.