Saturday, November 15, 2025

Install croc (P2P file transfer tool)

Install croc (P2P file transfer tool)

curl https://getcroc.schollz.com | bash
croc –version   # Should show v10.2.7

Test P2P transfer without relay

Sender:

croc send /path/to/file.tar.gz
# Example output:
# Sending ’file.tar.gz’ (23 MB)
# Code is: celtic-husky-cactus

Receiver:

croc celtic-husky-cactus

Test self-hosted relay (recommended on VPS)

Sender using relay:

croc –relay <VPS_IP>:9009 send somefile.zip

Receiver using relay:

croc –relay <VPS_IP>:9009 CODE

CODE is the verification code from sender.
Create systemd service to run relay in background

sudo nano /etc/systemd/system/croc-relay.service

Paste:

[Unit]
Description=Croc Relay Server
After=network.target

[Service]
Type=simple
ExecStart=/usr/local/bin/croc relay
Restart=on-failure
User=root
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target

Enable and start service:

sudo systemctl daemon-reload
sudo systemctl enable –now croc-relay
sudo systemctl status croc-relay

Check for:

Active: active (running)

Optional: Multi-port configuration

/usr/local/bin/croc relay –ports ”9009,9010,9011,9012,9013”

Default ports are 9009–9013.
Notes

1.Do NOT use –hostname or –host :9009

v10 relay automatically listens on all interfaces

Clients just connect using VPS public IP or domain

2.Firewall

Make sure TCP ports 9009–9013 are open

3.Clean old versions (optional)

sudo systemctl stop croc-relay
sudo systemctl disable croc-relay
sudo rm /etc/systemd/system/croc-relay.service
sudo find / -name ”croc” -exec rm -f {} ;
curl https://getcroc.schollz.com | bash

OVER!!!

RSS | ATOM


Add comment

Fill out the form below to add your own comments


BBCode Help