Skip to main content

Run your own relay

A relay is the server two devices meet at when they cannot connect directly. It passes encrypted data and cannot read it. CrocApp normally uses croc's public relays. On a Mac you can run a relay yourself, so devices on your home or office network use it instead.

Run a relay on your Mac​

Open Settings (⌘,) and choose the Relay tab, or use the Run a Relay switch in the menu bar window.

  • Run a Relay starts and stops the relay. It is off by default and never starts by itself.
  • Port is the first of four ports. croc's default is 9009, so the relay uses 9009 to 9012. Change it while the relay is stopped. If a port is taken, CrocApp says "That port is already in use": choose another or quit the app that uses it.
  • Password is optional, but set one. The relay listens on every network connection of your Mac. Leave the password blank and it uses croc's default, which is public, so anyone who can reach your Mac can use it, over the internet too if your router or IPv6 firewall lets them in. A password you set is kept in the Keychain and shown only as dots.
  • Start Relay at Launch (off by default) starts the relay each time CrocApp opens. The relay stops when you quit CrocApp.

While it runs, Use on the other device lists this Mac's addresses, such as 192.168.1.20:9009. On the other device, enter one as the relay in CrocApp's Settings, with the same password. IPv6 addresses go in IPv6 Address. With the croc command line, use croc --relay 192.168.1.20:9009 --pass <password> .... Both devices must use the same relay. If a device cannot connect, allow ports 9009 to 9012 in the Mac's firewall.

The relay works for the Mac App Store and the direct-download builds alike. Only devices that can reach your Mac can connect, and CrocApp does not open a port on your router.

Check a relay​

On every platform, Settings has Check Relay…. It tests the relay your transfers use: the address and IPv6 address you set, or croc's four public relays if you set none. For each address it shows, for IPv4 and for IPv6:

ResultWhat it meansWhat to change
Reachable in 12 ms, password acceptedThe relay answered and accepted the passwordNothing
No address of this kindThe name has no IPv4 or no IPv6 addressNothing, if the other version works
Can't connectNothing answered on that address and portCheck your internet connection, the address and port, and that the relay is running
Reachable, password rejectedThe relay is there but refused the passwordFix the relay password in Settings
Reachable, but the relay is busyThe relay took the password but turned this check away for nowTry again in a minute
Reachable, but not a croc relaySomething answers, but it is not a croc relayCheck the address and port

The screen also shows whether CrocApp may use the local network, and how to turn it on if it is off. The check connects and joins the relay the way a transfer does, without sending anything. It connects directly and does not use the proxies in Advanced, so every relay it tries sees this device's own address. If you set a proxy, the screen warns you and waits until you tap Check Anyway. Your password never leaves your device except to the relay you check. With Local Network Only on, transfers use no relay, so there is nothing to check.