Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

Transfer files and folders between any two computers with a short code phrase, end-to-end encrypted, with relay fallback.

40,860
1,650
Go
MIT
9 years old

What it does

croc moves files and folders between two machines without a local server or port forwarding. The sender gets a short code phrase; the receiver uses that phrase to connect, and the phrase also drives PAKE to derive an end-to-end encryption key. Transfers prefer a direct peer-to-peer path and fall back to a relay, support multiple files or whole folders, and can resume interrupted transfers. It runs on Windows, Linux, and macOS, and the browser client at getcroc.com interoperates with the CLI. The project is MIT licensed and written in Go.

Quick start

Install with the command-line installer:

curl https://getcroc.com | bash

Or use a package manager such as Homebrew (brew install croc), Scoop (scoop install croc), or build from source with Go 1.27.3+ (go install github.com/schollz/croc/v11@latest). Prebuilt archives are on the release page.

On the sending machine:

croc send <file-or-folder>

This prints a code phrase such as code-phrase. On the receiving machine, run:

croc <code-phrase>

On Linux and macOS, avoid exposing the phrase in the process list by passing it as an environment variable:

CROC_SECRET='<code-phrase>' croc

The receiver sees the incoming files and confirms the transfer. For a quick, no-install session, open the browser client and enter the same code.

Usage options

  • --overwrite replaces existing files without prompting; --rename keeps both files.
  • --exclude "node_modules,.venv" drops paths matching substrings; --exclude-file matches exact relative paths.
  • croc send --text "hello" sends short text, and --qr shows a QR code for mobile receiving.
  • --socks5 routes traffic through a SOCKS5 proxy.
  • croc store uploads client-side encrypted ciphertext when a live transfer is inconvenient; the link expires by time or download count, and the sender can revoke it.
  • croc ssh shares a terminal session between participants without an SSH daemon or port setup.

Constraints

  • Without a direct path, data goes through the public relay servers; these are community-funded and best effort, and the project asks for sponsorship to cover bandwidth.
  • Custom relays require at least two TCP ports (default 9009–9013) and can be run with croc relay or Docker.
  • Folder paths containing .ssh or .gnupg components are always rejected; .git metadata is included by default.
  • The code phrase is the secret: on Linux and macOS it is read from CROC_SECRET rather than the command line to avoid leaking it through process names.
  • The CLI checks for a newer release at most once every 24 hours after a transfer and shows a notice unless --quiet is set.

HotRepo's take

The repository has accumulated more than 40,000 stars, and its daily all-language records show gains of 396, 737, and 739 stars on 2026-07-21 through 2026-07-23, before settling to 18 stars in the Go daily list on 2026-11-04, where it ranked 14th. Those early spikes line up with a fresh Hacker News discussion on 2026-07-12, which drew 52 points and 27 comments. Older threads from 2020 and 2023 are larger, at 150 and 300 points respectively. Discussion has centered on the relationship to Magic Wormhole and on reliance on the maintainer's relay server; a 2023 comment quoted the relay handling roughly 20 TB of bandwidth per month. For a tool whose main cost is bandwidth, the self-hosted relay option is the practical answer when public capacity is a concern.

Written by AI from the project's README, updated . The project's own docs are the source of truth.

Hacker News

Croc: Easily and securely send things from one computer to another
▲ 300 · 141 comments · September 22, 2023
Croc: Easily and securely send things from one computer to another
▲ 150 · 68 comments · September 17, 2020
Croc: Securely transfer files and folders between two computers
▲ 52 · 27 comments · July 12, 2026