CHAN.RUN

Products
Restunnel
Guide
Quick start

CLI Node

CLI Node

The CLI node runs on any Linux or macOS machine — a Raspberry Pi, a home server, a laptop. It's a single binary that connects to your hub as an exit node.

Install

curl -fsSL https://raw.githubusercontent.com/zerocity/tunnel.chan.run/main/install-node.sh | sh

Installs restunnel-node to ~/.local/bin. Override with INSTALL_DIR:

INSTALL_DIR=/usr/local/bin curl -fsSL https://raw.githubusercontent.com/zerocity/tunnel.chan.run/main/install-node.sh | sh

:::tip Private repo? Set a token first: export GITHUB_TOKEN=ghp_..., then run the install command. :::

Enroll

Use the enrollment URL from your hub's token generation:

restunnel-node \
  --hub "noise://<your-public-ip>:9000?token=<token>&pubkey=<pubkey>" \
  --label vienna-home
  • --hub — Enrollment URL (required on first run, stored for reconnection)
  • --label — Human-readable name for this node
  • --data-dir — Persistent state directory (default node-data/)

Reconnect

After enrollment, the node reconnects automatically using its stored keypair:

restunnel-node

No token needed — authentication is via the cryptographic keypair generated during enrollment.

Run as a Service

For always-on exit nodes (Raspberry Pi, home server), run as a systemd service:

# /etc/systemd/system/restunnel-node.service
[Unit]
Description=Restunnel Exit Node
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
ExecStart=/usr/local/bin/restunnel-node --data-dir /var/lib/restunnel-node
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target
sudo systemctl enable --now restunnel-node