# Hyperliquid Instruction Guide

### System Requirements

| Component | Requirement  |
| --------- | ------------ |
| CPU       | 4 cores      |
| RAM       | 16 GB        |
| Disk      | 50 GB        |
| OS        | Ubuntu 24.04 |

### Installation and Configuration

1. Create a new user for the node:

```bash
sudo adduser hlnode
sudo usermod -aG sudo hlnode
su - hlnode
```

2. Install necessary packages:

```bash
sudo apt update 
sudo apt install screen curl
```

3. Set up the node environment:

```bash
curl https://binaries.hyperliquid.xyz/Testnet/initial_peers.json > ~/initial_peers.json
echo '{"chain": "Testnet"}' > ~/visor.json
curl https://binaries.hyperliquid.xyz/Testnet/non_validator_config.json > ~/non_validator_config.json
```

4. Download and configure the executable file:

```bash
curl https://binaries.hyperliquid.xyz/Testnet/hl-visor > ~/hl-visor
chmod a+x ~/hl-visor
```

5. Start the node in the background:

```bash
screen -S hlnode
~/hl-visor run-non-validator
```

Then detach the screen session with Ctrl + A + D.

### Firewall Configuration

```bash
sudo ufw allow 22/tcp
sudo ufw allow 8080/tcp
sudo ufw allow 26656/tcp
sudo ufw enable
```

### Autostart Node Setup

Create a systemd service file:

```bash
sudo nano /etc/systemd/system/hyperliquid.service
```

File contents:

```
[Unit]
Description=Hyperliquid Node
After=network.target

[Service]
User=hlnode
ExecStart=/home/hlnode/hl-visor run-non-validator
Restart=always
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target
```

Activate the service:

```bash
sudo systemctl enable hyperliquid
sudo systemctl start hyperliquid
```

### Monitoring and Maintenance

1. View node logs:

```bash
tail -f ~/hl/logs/visor.log
```

2. Check synchronization status:

```bash
curl http://localhost:8080/status
```

3. Monitor resource usage:

```bash
top -u hlnode
```

4. Check stored data volume:

```bash
du -hs hl
```

5. Inspect data directory contents:

```bash
cd ~/hl/data && ls
```

### Updating the Node

To update the node, execute:

```bash
curl https://binaries.hyperliquid.xyz/Testnet/hl-visor > ~/hl-visor.new
chmod a+x ~/hl-visor.new
mv ~/hl-visor.new ~/hl-visor
```

Then restart the node.

### Validator Node Setup (Optional)

If you want to run a validator node, perform these additional steps:

1. Generate a validator wallet:

```bash
echo '{"key": "<your-secure-key>"}' > ~/hl/hyperliquid_data/node_config.json
```

2. Register the validator's public IP address and node information on the network.

Note that running a validator node may require whitelisting your address during the initial testing phase.

### Purpose of Running a Hyperliquid Node

Running a Hyperliquid node means participating in the development of a decentralized financial platform. Your node:

1. Supports network operations
2. Assists in transaction validation
3. Contributes to system decentralization
4. Allows you to gain experience with blockchain technologies
