Wdróż pierwszy serwer w 5 minut
Kompletny przewodnik: pobierz, skonfiguruj i uruchom serwer HashRelay na Linux.
The server is the public end of the tunnel. The installer downloads hr-server, writes /etc/hash-relay/server.toml, installs the web admin UI, and registers a service (systemd, or procd on OpenWrt).
What you need
- A Linux host with a public IP. OpenWrt / iStoreOS is supported and is already root.
- TCP 8555 for the TLS tunnel, UDP 9555 for QUIC, and TCP 8585 for the admin API and web UI. 8585 is the installer default; pass API_PORT if you want another port.
Install
Linux — sudo asks for your password. Press Enter at each prompt to keep the default.
bash
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/install-server.sh | sudo shOpenWrt / iStoreOS, or a shell that is already root:
bash
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/install-server.sh | shTo skip the prompts, pass the values on the command. Linux:
bash
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/install-server.sh | sudo env \
TCP_PORT=8555 \
QUIC_PORT=9555 \
API_PORT=8585 \
API_LISTEN=0.0.0.0 \
shThe same non-interactive install when you are already root:
bash
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/install-server.sh | env \
TCP_PORT=8555 \
QUIC_PORT=9555 \
API_PORT=8585 \
API_LISTEN=0.0.0.0 \
shDefaults from the installer: listen 0.0.0.0, TCP 8555, QUIC 9555, API/Web 8585 on 0.0.0.0, SQLite at the data directory, and a random JWT secret. On systemd the binary is /opt/hash-relay/bin/hr-server and state is /var/lib/hash-relay. On OpenWrt the binary is /usr/bin/hr-server.
Open the admin UI
- Browse to http://YOUR_SERVER:8585.
- Sign in as admin / hash. The seeded account must change that password on first login.
- If the page does not load, confirm the service is up and that 8585/tcp is open.
bash
sudo systemctl status hash-relay-server
sudo journalctl -u hash-relay-server -f
sudo ufw allow 8555/tcp
sudo ufw allow 9555/udp
sudo ufw allow 8585/tcpLeave 8555 and 9555 reachable by your farm. 8585 is the admin UI — put it behind a firewall or a reverse proxy if the host is on the public internet. API_LISTEN=127.0.0.1 keeps it local.