# Hemi

## ***Automatic Installation***

```bash
source <(curl -s https://raw.githubusercontent.com/NodersUA/Scripts/main/hemi)
```

## **Manual Installation**

```bash
sudo apt update
```

```bash
# Install Go
source <(curl -s https://raw.githubusercontent.com/NodersUA/Scripts/main/system/go)
```

```bash
git clone https://github.com/hemilabs/heminetwork.git
cd heminetwork
make deps
make install
cp popmd /usr/local/bin/
```

```
cd ~/heminetwork/bin && ./keygen -secp256k1 -json -net="testnet" > ~/heminetwork/bin/popm-address.json
```

Get tokens from [faucet](https://coinfaucet.eu/en/btc-testnet/)

```
sudo tee /root/heminetwork/.env > /dev/null <<EOF
POPM_BTC_PRIVKEY=$(jq -r '.private_key' ~/heminetwork/bin/popm-address.json)
POPM_STATIC_FEE=20
POPM_BFG_URL=wss://testnet.rpc.hemi.network/v1/ws/public
EOF
```

```
sudo tee /etc/systemd/system/popmd.service > /dev/null <<EOF
[Unit]
Description=Hemi Service
After=network.target

[Service]
User=root
Type=simple
EnvironmentFile=/root/heminetwork/.env
ExecStart=/usr/local/bin/popmd
Restart=on-failure

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

```
# Start the node
systemctl daemon-reload
systemctl enable popmd
systemctl restart popmd && journalctl -u popmd -f -o cat
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://nodersua.gitbook.io/about-nodersua/testnet/hemi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
