Deployment
Production deployment guide for the HashRelay server and client.
Server — Recommended Specs
| Size | Clients | Monthly Cost (est.) |
|---|---|---|
| 1 vCPU / 512 MB | ≤ 10 | ~$4 USD/mo |
| 2 vCPU / 2 GB | ≤ 100 | ~$12 USD/mo |
| 4 vCPU / 8 GB | ≤ 1000 | ~$40 USD/mo |
Server — One-Line Install (Recommended)
The installer downloads hr-server, writes /etc/hash-relay/server.toml, installs the web UI to /usr/share/hash-relay/web, and registers a service (systemd, or procd on OpenWrt).
Interactive install prompts for ports, the database URL, and the JWT secret.
Linux — sudo asks for your password:
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/install-server.sh | sudo shOpenWrt / iStoreOS, or a shell that is already root:
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/install-server.sh | shNon-interactive install — override defaults with environment variables:
Linux — sudo asks for your password:
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/install-server.sh | sudo env \
TCP_PORT=8555 \
QUIC_PORT=9555 \
API_PORT=8080 \
shOpenWrt / iStoreOS, or a shell that is already root:
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/install-server.sh | env \
TCP_PORT=8555 \
QUIC_PORT=9555 \
API_PORT=8080 \
shManaging the systemd Service
The installer creates and enables a hash-relay-serverservice running as the hashrelay user with ExecStart=/usr/local/bin/hr-server --config /etc/hash-relay/server.toml.
sudo systemctl status hash-relay-server
sudo systemctl restart hash-relay-server
sudo journalctl -u hash-relay-server -fUpdating
Linux — sudo asks for your password:
# Server
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/update-server.sh | sudo sh
# Client
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/update-client.sh | sudo sh
# Web admin UI
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/update-web.sh | sudo shOpenWrt / iStoreOS, or a shell that is already root:
# Server
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/update-server.sh | sh
# Client
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/update-client.sh | sh
# Web admin UI
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/update-web.sh | shClient — Linux
Create a client node on the server first (Web UI → Client Nodes). Replace every YOUR_* placeholder below:
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 install interactively (the script prompts for each value):
Linux — sudo asks for your password:
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/install-client.sh | sudo shOpenWrt / iStoreOS, or a shell that is already root:
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/install-client.sh | shOr install first, edit config, then restart:
Linux — sudo asks for your password:
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-clientOpenWrt / iStoreOS, or a shell that is already 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 restartsudo systemctl status hash-relay-client
sudo journalctl -u hash-relay-client -fClient — Windows
# Download hr-client.exe from the Downloads page, then run with your config
.\hr-client.exe --config client.tomlFile Locations
| Path | Purpose |
|---|---|
| /usr/local/bin/hr-server | Server binary (systemd installs) |
| /etc/hash-relay/server.toml | Server config |
| /etc/hash-relay/client.toml | Client config |
| /var/lib/hash-relay | Data (SQLite DB, self-signed certs) |
| /var/log/hash-relay | Log files |
| /usr/share/hash-relay/web | Web admin UI static files |
Firewall Rules
# Server: allow inbound
ufw allow 8555/tcp # tunnel (TCP/TLS)
ufw allow 9555/udp # tunnel (QUIC)
ufw allow 8080/tcp # admin API + web UI (restrict in production)Uninstall
Linux — sudo asks for your password:
# Server
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/uninstall-server.sh | sudo sh
# Client
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/uninstall-client.sh | sudo shOpenWrt / iStoreOS, or a shell that is already root:
# Server
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/uninstall-server.sh | sh
# Client
curl -fsSL https://downloads.hashrelay.net/hashrelay/scripts/uninstall-client.sh | sh