Zainstaluj klienta i połącz z serwerem
Przewodnik krok po kroku instalacji klienta HashRelay na Linux i Windows.
The client sits on the same LAN as the miners. It dials the server, then opens local listen ports from the mappings the server pushes. You do not configure miner ports in client.toml.
Create the node first
In the web admin UI open Client Nodes and create a node. Copy client_id and the access token. The server stores tokens in client_nodes; the client only presents the token.
Linux
Replace every YOUR_* value. Already-root hosts (OpenWrt / iStoreOS) run the script directly; other Linux hosts use sudo.
# Create a client node on the server first (Web UI → Client Nodes).
# Replace YOUR_* values below with your own before running.
# Already root (OpenWrt / iStoreOS): runs directly. Other Linux: uses sudo.
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/install-client.sh | \
env \
SERVER_ADDR=YOUR_SERVER_IP \
TCP_PORT=8555 \
QUIC_PORT=9555 \
CLIENT_ID=YOUR_CLIENT_ID \
TOKEN=YOUR_ACCESS_TOKEN \
sh -c 'if [ "$(id -u)" -eq 0 ]; then exec sh; else exec sudo env "SERVER_ADDR=$SERVER_ADDR" "TCP_PORT=$TCP_PORT" "QUIC_PORT=$QUIC_PORT" "CLIENT_ID=$CLIENT_ID" "TOKEN=$TOKEN" sh; fi'Or let the script ask:
# Interactive install — the script prompts for each value.
# Already root (OpenWrt / iStoreOS): runs directly. Other Linux: uses sudo.
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/install-client.sh | sh -c 'if [ "$(id -u)" -eq 0 ]; then exec sh; else exec sudo sh; fi'Or install first, then edit /etc/hash-relay/client.toml and restart hash-relay-client.
# Install first, edit config, then restart.
# Already root (OpenWrt / iStoreOS): runs directly. Other Linux: uses sudo.
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/install-client.sh | sh -c 'if [ "$(id -u)" -eq 0 ]; then exec sh; else exec sudo sh; fi'
# Edit /etc/hash-relay/client.toml — set server_addr, tcp_port, quic_port, client_id, token
# Linux: sudo nano /etc/hash-relay/client.toml
# OpenWrt / already root: vi /etc/hash-relay/client.toml
# Restart — Linux (systemd):
# sudo systemctl restart hash-relay-client
# Restart — OpenWrt (procd):
# /etc/init.d/hash-relay-client restartWhat client.toml actually sets
[client]
server_addr = "YOUR_SERVER_IP"
tcp_port = 8555
quic_port = 9555
client_id = "mine-site-01"
token = "YOUR_ACCESS_TOKEN"
[client.enc]
frame_encrypt_alg = 0
# insecure = true # lab only
# pin_sha256 = "..." # copy from the server log when tls = "self_signed"
[client.connection]
transport = "auto" # auto/quic: QUIC first, then TCP. tcp: TCP first, then QUIC
reconnect_interval = 5
max_reconnect_attempts = 0
heartbeat_interval = 60
heartbeat_timeout_count = 3Windows
Download hr-client.exe from the download page and run it with the same TOML. The fields are identical to Linux.
.\hr-client.exe --config client.tomlSee that it connected
On the server dashboard the node should show a heartbeat. On the client:
sudo systemctl status hash-relay-client
sudo journalctl -u hash-relay-client -f