# Running your own Node

For a more non-technical user guide please visit this section

## Prerequisites

zkProofer nodes run inside Docker containers. To install Docker please visit

[Docker: Accelerated Container Application Development](https://www.docker.com/)

### Hardware requirements

#### Container-Level Resource Limits

| Resource | Single Node / Multi-Node (up to 20 licenses) |
| -------- | -------------------------------------------- |
| CPU      | 0.5 vCPU (or shared/burstable)               |
| RAM      | 256 MB                                       |
| Storage  | 500 MB                                       |
| Network  | 10 Mbps                                      |

These limits apply to each container running a zk proofer node.

***

#### Minimum Machine Specs (Self-Host)

| Resource | Single Node / Multi-Node (up to 20 licenses) |
| -------- | -------------------------------------------- |
| CPU      | 1 vCPU                                       |
| RAM      | 512 MB                                       |
| Storage  | 5 GB                                         |
| Network  | 10 Mbps                                      |
| OS       | Linux (Ubuntu 22.04+), macOS, Windows (WSL2) |
| Runtime  | Docker 24+                                   |
| Arch     | x86\_64 (amd64) or ARM64                     |

### Setting up environment variables

To make the process smoother you can set your environment variables before running your zkProffer node

#### Linux and Mac

```bash
# set your node image name
export FLOHIVE_IMAGE=easeflow/flohive-node:latest
# set your owner wallet address from which licenses will be delegated
export OWNER_ADDRESS=0x123abc
```

#### Windows

```bash
set "FLOHIVE_IMAGE=easeflow/flohive-node:latest"
set "OWNER_ADDRESS=0x123abc"
```

## Run the node

Copy and run this command to run your node:

#### Linux and Mac

```bash
mkdir -p ~/flohive && docker run --pull always -v ~/flohive:/app/cache  -e OWNERS_ALLOWLIST=$OWNER_ADDRESS $FLOHIVE_IMAGE
```

#### Windows

```bash
mkdir %USERPROFILE%\\flohive 2>nul & docker run --pull always -v %USERPROFILE%\\flohive:/app/cache -e OWNERS_ALLOWLIST=%OWNER_ADDRESS% %FLOHIVE_IMAGE%
```

You'll see logs like following:

```bash
2025-02-06T13:54:16.086Z	[INFO]	loaded config	{"config": {"network": "ethereum", "heartbeatPeriodSeconds": 43200, "checkJobsPeriodSeconds": 10, "ownersAllowList": ["0xF9c7082CA8a6A882859f16661701c1ad65d12812"], "checkDelegationOfferPeriodSeconds": 10, "disableHeartbeats": false, "disableAutomaticDelegations": false, "eth.rpcNodes": ["<https://flohive-network-testnet.rpc.caldera.xyz/http>"], "eth.privateKey": "...", "eth.chainId": 629274, "eth.registry": "0xB33d2D2a2c84b3a1DEf601608a1F019213a02774", "eth.paginationChunkSize": 100, "eth.gasLimit": 6000000}}
2025-02-06T13:54:16.086Z	[DEBUG]	initializing node ...
2025-02-06T13:54:16.088Z	[DEBUG]	generating burner wallet
2025-02-06T13:54:16.090Z	[DEBUG]	node cache does not exit, initializing empty node cache
2025-02-06T13:54:16.098Z	[DEBUG]	burner wallet cache written	{"file": "/app/cache/flohive-cache.json"}
2025-02-06T13:54:16.098Z	[DEBUG]	generated burner wallet	{"address": "0x44686e722D114A8C5e27Fbd29a6dF9F31385F5b4"}
2025-02-06T13:54:16.102Z	[INFO]	Using burner wallet	{"address": "0x44686e722D114A8C5e27Fbd29a6dF9F31385F5b4"}
2025-02-06T13:54:16.106Z	[DEBUG]	loaded plugin	{"path": "plugins/signature-scan-demo.so", "supported types": ["signature-scan-demo"]}
2025-02-06T13:54:17.403Z	[DEBUG]	using delegation hub	{"address": "0x3F1BD1Abc350eD6313Ff7Eaab561DCAbbcc61071"}
2025-02-06T13:54:17.404Z	[DEBUG]	starting delegations offer check
2025-02-06T13:54:17.683Z	[DEBUG]	received delegation offers count	{"delegation offers": "0"}
2025-02-06T13:54:17.683Z	[DEBUG]	received delegation offers	{"delegation offers": 0}
2025-02-06T13:54:17.683Z	[DEBUG]	successfully checked delegation offers
2025-02-06T13:54:17.683Z	[DEBUG]	starting heartbeats
2025-02-06T13:54:17.980Z	[DEBUG]	received delegations count	{"delegations": "0"}
2025-02-06T13:54:17.980Z	[DEBUG]	received delegations	{"delegations": 0}
2025-02-06T13:54:18.300Z	[DEBUG]	received delegations count	{"delegations": "0"}
2025-02-06T13:54:18.300Z	[DEBUG]	received delegation owners	{"delegation owners": 0}
2025-02-06T13:54:18.300Z	[DEBUG]	sending heartbeat	{"tokenIds": []}
2025-02-06T13:54:18.300Z	[WARN]	no delegations, skipping heartbeat
```

### Find your burner wallet

To get the burner address, check your node logs for the following output:

```bash
[INFO]  Using burner wallet {"address": "0x44686e722D114A8C5e27Fbd29a6dF9F31385F5b4"}
```

### Top up your burner wallet

If you didn't top it up previously, this step is required. Node uses burner balance to pay for gas.

### Delegate

#### Go to delegation app

1. Find your delegation app, like https\://\<project-name>.delegate.easeflow\.io/
2. Connect your owner wallet
3. Click Delegate next to license, submit your burner address in the field and click Delegate
4. Sign the transaction

#### Make sure node detected your delegations

If output of you node includes messages of this format, then you're good.

```bash
[DEBUG]	received delegation offers count	{"delegation offers": "1"}
[DEBUG]	received delegations offers from eth	{"length": 1}
[DEBUG]	received delegation offers	{"delegation offers": 1}
[DEBUG]	accepting delegation offer	{"hash": "cf9cede70c3934d7952af1e94d8ca631aff3528375cd94765abb66e11f8f1de9"}
[DEBUG]	received unfinished jobs count	{"delegations": "0"}
[DEBUG]	received unfinished jobs	{"jobs": 0}
[DEBUG]	transaction submitted	{"hash": "0x7f396478018f2b1e56cc2d0ea456ec15e6462936161fa2dcbf89bbb30d7c63b2"}
[INFO]	delegation offer accepted	{"hash": "cf9cede70c3934d7952af1e94d8ca631aff3528375cd94765abb66e11f8f1de9"}
```

## Advanced

As an alternative to generating a burner for user and storing it in `/app/cache` folder, it is possible to specify burner private key with `ETH_PRIVATE_KEY` environment variable:

```bash
docker run --pull always -e ETH_PRIVATE_KEY=<bruner_private_key> -e OWNERS_ALLOWLIST=$OWNER_ADDRESS $FLOHIVE_IMAGE
```


---

# 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://docs.humanity.org/zkproofer-node/how-to-run-zkproofer-nodes/binding-and-delegating/running-your-own-node.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.
