Library / SDK
schollz/croc avatar
schollz/croc

croc: the install method decides how it updates

GitHub describes it as Easily and securely send things from one computer to another :crocodile: :package:. The repository metadata lists Go as its primary language. The metadata lists the MIT license. This article stays within the project description and details documented in the GitHub repository README.

40,945 stars1,655 forksGoMIT

At a glance

What is it?
A Go CLI for transferring files between two computers peer to peer with a relay fallback and end-to-end encryption using PAKE, installable through a dozen package managers plus a browser. The install method decides whether the tool can update itself, the Debian fallback never registers a repository, and the Docker image's default command runs a relay rather than a client.
Who is it for?
Use croc when you want a single binary that transfers between two machines with no server to run, and when you are willing to accept a background release check during transfers. Choose the install route deliberately rather than by convenience, because package-managed installs are updated by their package manager rather than by croc, and the Debian downloaded-package route is upgraded only by downloading a newer package.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 2 days ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • schollz/croc40,945 ★ · +1,224
Star history
Repository2026-08-132026-11-15
schollz/croc39.7k40.9k

1,224 Stars in the last 94 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The update story changes completely depending on how you installed

The install section is short, but the paragraph after it is where the design shows.

bash
curl https://getcroc.com | bash

The installer places `croc` and `croc-update` side by side. `croc update` (alias `croc upgrade`) checks for a release and prepares the updater, and `croc-update` then updates the croc active on `PATH`; each command asks before changing a binary, and `--yes` skips the confirmation. Package-managed installations use their owning package manager instead, and `croc update` leaves package-owned binaries intact. So the same binary behaves differently depending on where it came from. There is a second layer on top. When the CLI sends or receives a transfer it checks for a newer release at most once every 24 hours, in the background, and the notice appears only after the transfer finishes. Network and release-service failures in those background checks are ignored, and `--quiet` suppresses the notice entirely, while `croc update --check` reports release availability without installing. In practice that means a file transfer can make an outbound network call you did not ask for, and a pinned package deliberately stays pinned.

The Debian fallback never registers a repository, so upgrades are manual forever

Debian and Ubuntu have two routes and the second one has a stated downside. The first is a third-party archive, pkg.haus, which provides Debian packages, installed with a single command.

bash
sudo apt install croc

The second route exists for a release that includes upstream `.deb` downloads, and for older releases whose configured repositories do not carry croc at all. You find the file matching your architecture with `dpkg --print-architecture`, then install the downloaded file.

bash
sudo apt install ./croc_VERSION-1_ARCH.deb

The page is explicit about what this costs. It does not add an APT repository, and to upgrade it you download a newer package. So the moment you take this route you have opted out of `apt upgrade` for this tool permanently, and every future version is a manual download followed by a manual install. The same pattern is set out for Fedora and openSUSE with `dnf` and `zypper`, where the page adds that those packages install the CLI, manual, license notices, and shell completions, require `ca-certificates`, start no background services, and are left intact by `croc update`.

Alpine stable branches can hand you a release several versions behind

The Alpine section warns about version drift before you install. It tells you to enable the community repository for your Alpine release, then run a single command.

bash
apk add croc

The instruction that matters comes next: check the package index for your branch's version, because stable branches can carry older releases, and consult the distribution status document before selecting one. That is a warning from the project about its own packaging, not a general caveat. The consequence is that on Alpine your `apk` database will happily install whatever the branch pins without telling you that you are on an older release, and since a package-managed install is never overwritten by the tool's own updater, you have no automatic path forward either. If your work depends on a recent croc behaviour, check the version the branch actually carries before you commit to Alpine.

nix
environment.systemPackages = [
  pkgs.croc
];

The NixOS configuration snippet in the README installs `pkgs.croc` from your Nix channel.

The Docker one-liner can only reach the directory you launched it from

Rather than publishing a client image workflow, the Docker section hands you a shell function to paste into your profile.

bash
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 "$@"; }

Three consequences follow from reading the mounts. The working directory is bind-mounted to `/c` and set as the workdir, so only files under the current directory are visible inside the container. The config directory is bind-mounted separately from `$HOME/.config/croc`. And the pairing secret is passed through the environment as `CROC_SECRET`, so it is in your process environment for the life of the run. Finally, the function shadows the real binary in your shell, which means that with this in your profile you have no croc at all whenever Docker is unavailable.

The container's default command starts a relay, not a client

The default command of the image built from this repository is not a client invocation; the README's Docker function passes its own arguments to docker.io/schollz/croc to use it as a client. The entrypoint is a script called `croc-entrypoint.sh` and the default command is `relay`. The image exposes port 8080 and then a run of ports from 9009 to 9017, and the health check probes whichever relay ports are configured, resolving them in order from `CROC_RELAY_PORTS`, then `CROC_PORTS`, then `CROC_PORT`, defaulting to 9009. It runs as `nobody`, and it creates a storage directory owned by that user. So run without arguments, it is a self-hosted relay for people who want the fallback path under their own control. It also sits in deliberate tension with one of the tool's headline claims, that no local server or port forwarding is needed. Clients need neither, but a relay does need to be reachable, and reachability is exactly what those exposed ports are for.

CGO is off and the whole dependency graph ships inside the binary

The build configuration is consistent across the Makefile and the Dockerfile, and it is the standard recipe for a portable static binary. The build flags are `-buildvcs=false -trimpath -tags netgo,osusergo`, the linker flags are `-s -w -buildid=`, and `CGO_ENABLED=0` is set for both the main binary and the web binary. The module path carries the major version, `github.com/schollz/croc/v11`, and the manifest requires Go 1.27.3, so building from source needs a recent toolchain. What is worth pausing on is the dependency list. Alongside the expected pieces, the cryptographic PAKE library, a peer discovery library, CBOR encoding, QR code generation, and a hash library, the graph includes `tailscale.com`, `tailscale/gliderssh`, and `gvisor.dev/gvisor`, which is a userspace network stack. None of that is wrong for a tool that supports proxies and LAN discovery, but it means the attack surface of a tool whose entire pitch is security is a large dependency graph rather than a small one.

The test suite is split into two race files, and two CI systems are still in the tree

Two test files sit at the root of the repository, `race_disabled_test.go` and `race_enabled_test.go`. Their names point to files selected by whether the Go race detector is enabled when the tests run. The same pattern shows up in the CI configuration. The README badge points at a GitHub Actions workflow, and `.github/` is present, but a `.travis.yml` is still in the tree. Two CI systems for one repository is not an error, but it does split the question of what runs on a pull request across two files in two different formats, and the older one is not obviously marked as legacy.

Every GUI is a third-party project, and the browser is the only official alternative

The official surface is the CLI plus a browser at getcroc.com, and the page is clear that the browser version is fully compatible with the CLI, so you can send from one and receive with the other without installing anything.

Editorial conclusion

Use croc when you want a single binary that transfers between two machines with no server to run, and when you are willing to accept a background release check during transfers. Choose the install route deliberately rather than by convenience, because package-managed installs are updated by their package manager rather than by croc, and the Debian downloaded-package route is upgraded only by downloading a newer package. Before you commit, confirm your platform's package actually carries a current version rather than a stale one, and if you run the container, remember the default command starts a relay listening on the network rather than a client you send from.

Frequently asked questions

How does croc file transfer work?

croc transfers files and folders between two computers peer to peer, with a relay fallback when a direct path is not available. The connection is end-to-end encrypted using PAKE, transfers can be resumed if interrupted, multiple files are supported, the networking is IPv6-first with IPv4 fallback, and it can use a proxy such as Tor.

Which file sharing app is the safest, according to croc?

The project does not rank file sharing tools. What it claims for croc is end-to-end encryption using PAKE, no need for a local server or port forwarding, and the ability to use a proxy, with an author remark that it believes croc is the only CLI file transfer tool doing all of that at once.

What is the best free file transfer software, per croc?

croc does not rank software, including itself. It is MIT licensed and can be installed with a single command that pipes a script from getcroc.com, or through Homebrew, MacPorts, Scoop, Chocolatey, Nix, Alpine, Debian, Fedora, Arch, Termux, FreeBSD, conda, or Docker.

Is file sharing safe with croc?

croc's stated protections are end-to-end encryption using PAKE, peer to peer transfer with relay fallback, and proxy support. It also states that no local server or port forwarding is required for a transfer, though the self-hosted relay container in the repository exposes ports for the fallback path to be reachable.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/schollz-croc.svg)](https://hysenlabs.com/projects/schollz-croc)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/schollz-croc.svg)](https://hysenlabs.com/projects/schollz-croc)

Was this useful?