Установить клиент и подключить к серверу
Пошаговое руководство по установке клиента HashRelay на Linux и 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. Linux — sudo asks for your password:
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/install-client.sh | sudo env \
SERVER_ADDR=YOUR_SERVER_IP \
TCP_PORT=8555 \
QUIC_PORT=9555 \
CLIENT_ID=YOUR_CLIENT_ID \
TOKEN=YOUR_ACCESS_TOKEN \
shOpenWrt / iStoreOS, or a shell that is already root:
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 \
shOr let the script ask. Linux:
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/install-client.sh | sudo shAlready root:
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/install-client.sh | shOr install first, then edit /etc/hash-relay/client.toml and restart hash-relay-client. Linux:
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/install-client.sh | sudo sh
# Edit /etc/hash-relay/client.toml — set server_addr, tcp_port, quic_port, client_id, token
# sudo nano /etc/hash-relay/client.toml
# sudo systemctl restart hash-relay-clientAlready root:
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/install-client.sh | sh
# Edit /etc/hash-relay/client.toml — set server_addr, tcp_port, quic_port, client_id, token
# vi /etc/hash-relay/client.toml
# /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