selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

croc logo

Self-host croc

v11.6.5

Encrypted peer-to-peer file transfers from the command line

ReleaseOpen SourceMIT
curl https://getcroc.com | bash
Updatedyesterday
LanguageGo
Setup difficultyEasy
Stars
40 886
Port
9009 (croc relay TCP ports (9009-9013 by default, at least 2 required))
Docker
schollz/croc
croc screenshot 1

What is croc?

croc is a command-line tool for sending files and folders directly between any two machines, with end-to-end encryption negotiated through a code phrase using PAKE. It attempts a peer-to-peer path first and falls back to a relay when a direct connection isn't possible, so no port-forwarding or local server is needed; the relay itself can be self-hosted via croc relay or a Docker container. Interrupted transfers can be resumed, multiple files or folders go in one batch, and text, stdin/stdout pipes, and QR-launched browser links are supported. An opt-in stored-transfer mode (croc store) uploads client-side-encrypted ciphertext to a service with a finite lifetime and a cap on downloads, and croc ssh shares a live terminal with read/write or read-only participants. Install via a curl one-liner, Homebrew, MacPorts, Scoop, Chocolatey, apt/dnf/zypper/pacman/apk/pkg, Nix, conda, or Docker; MIT-licensed, free, and sustained by donations.

croc alternatives

Should you self-host croc?

croc scores 81/100 on selfhost.directory (how scoring works) and ranks #1 of 11 in File Transfer & Sync. It has 40 886 GitHub stars, +366 in the last 30 days.

It shipped 54 stable releases in the past year. The latest, v11.6.5, came out on 7 November 2026. New versions land roughly every 2 days.

Setup is easy: most people get it running in one sitting. An official Docker image is available. It is MIT-licensed and written mostly in Go.

Its closest alternative on selfhost.directory is DashBeam (71/100, 10 256 stars). croc scores higher overall. See croc vs DashBeam side by side.

Features

  • Browser (no-install) client
  • Clipboard integration
  • Custom code phrase
  • Encrypted stored transfers
  • End-to-end encryption via PAKE
  • IPv6-first with IPv4 fallback
  • Multiple files and folders
  • Peer-to-peer transfer with relay fallback
  • QR Code Sharing
  • Resumable transfers
  • Self-hostable relay
  • Send text and URLs
  • Shared terminal sessions (croc ssh)
  • SOCKS5 proxy support
  • Stdin/stdout piping

croc README

croc
Version Build Status GitHub Sponsors

This project’s future depends on community support. Become a sponsor today.

About

croc is a tool that allows any two computers to simply and securely transfer files and folders. AFAIK, croc is the only CLI file-transfer tool that does all of the following:

  • Allows any two computers to transfer data (p2p with relay fallback)
  • Provides end-to-end encryption (using PAKE)
  • Enables easy cross-platform transfers (Windows, Linux, Mac, Browser)
  • Allows multiple file transfers
  • Allows resuming transfers that are interrupted
  • No need for local server or port-forwarding
  • IPv6-first with IPv4 fallback
  • Can use a proxy, like Tor

How to install croc

Install croc with Docker

Environment variables
CROC_SECRET, CROC_PASS, CROC_PORTS, CROC_PORT
croc() { [ $# -eq 0 ] && set -- ""; mkdir -p "$HOME/.config/croc"; docker run --rm -it --user "$(id -u):$(id -g)" -v "$(pwd):/c" -v "$HOME/.config/croc:/.config/croc" -w /c -e CROC_SECRET docker.io/schollz/croc "$@"; }

POSIX-shell function added to ~/.profile; CLI via Docker only works within the current directory and its subdirectories. The same image can run a relay: `docker run -d -p 9009-9013:9009-9013 -e CROC_PASS='YOURPASSWORD' docker.io/schollz/croc`.

How to configure croc

  • CROC_PASSPassword for a self-hosted relay when running the Docker image
  • CROC_PORTSComma-separated custom relay ports for the Docker relay
  • CROC_PORTBase port for a custom relay port setup
  • CROC_SECRETTransfer secret/code phrase passed as an environment variable (needed on Linux/macOS to avoid leaking the secret via the process name)
  • --store-max-transfer1GiBMaximum plaintext bytes per transfer (up to `2GiB`)

croc releases & version history

@ Every self-hosted release, weekly

One Monday email with the week's stable releases across the directory.

More in File Transfer & Sync

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…