> ## Documentation Index
> Fetch the complete documentation index at: https://berachain-422fce37-docs-staking-pool-install-cli.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Install a staking pool

> Deploy and activate a staking pool from a remote machine with install.sh.

`install.sh` deploys and activates one staking pool from `guides/apps/staking-pools/install-helpers/`. You configure the environment, run the script, and execute the commands it asks you to. The script uses Foundation-delegated funds when a DelegationHandler has been provisioned for your validator. Otherwise it spends **10,000 BERA** plus gas from your funding wallet.

## What you need before you run install.sh

You need a synced validator, helper tools, and live endpoints:

* A synced Berachain validator
* `bash`, [Foundry](https://book.getfoundry.sh/) (`cast`), `jq`, and `curl`
* Reachable execution-layer JSON-RPC and consensus-layer Node API endpoints. [Enable the Node API](https://docs.berachain.com/nodes/beaconkit/configuration#node-api-beacon-kit-node-api). The Node API can run on any node; it doesn't have to be on the validator.

You also need one funding path:

* Self-funded: at least **10,000 BERA** plus gas in the funding wallet
* Delegated: a DelegationHandler already formed and funded for your validator, plus gas for activation

The Berachain Foundation forms the DelegationHandler when they issue a delegation. That setup is internal; operators run `install.sh` once the handler exists.

## Clone install-helpers

Clone the guides repo and enter the helper directory:

```bash theme={null}
git clone https://github.com/berachain/guides/
cd guides/apps/staking-pools/install-helpers
```

## Set environment variables

Copy `env.sh.template` to `env.sh` in that directory, then edit the copy. `install.sh` sources `env.sh` when the file is present.

```bash theme={null}
cp env.sh.template env.sh
```

| Variable           | Purpose                                                                                    |
| ------------------ | ------------------------------------------------------------------------------------------ |
| `EL_RPC_URL`       | Execution-layer JSON-RPC. Default: Bepolia public RPC. Network is read from `eth_chainId`. |
| `CL_NODE_API_URL`  | Beacon Kit Node API base URL. Default: `http://127.0.0.1:3500`.                            |
| `PRIVATE_KEY`      | Signs `cast send` on this host when set.                                                   |
| `VALIDATOR_PUBKEY` | Validator pubkey default.                                                                  |
| `FUNDING_ADDRESS`  | Funding wallet on the self-funded path. Ignored when `PRIVATE_KEY` is set.                 |
| `OPERATOR_ADDRESS` | Operator on the self-funded path.                                                          |
| `SHARES_RECIPIENT` | Shares recipient on the self-funded path.                                                  |

## Run install.sh

Use `./install.sh --help` for usage.

```bash theme={null}
cp env.sh.template env.sh   # optional; defaults apply without this
./install.sh
```

If a DelegationHandler with delegated funds exists for your validator's pubkey, the script uses the delegated path. Otherwise it uses the self-funded path.

The script will walk you through obtaining the necessary information, verifying the signatures, and activating the validator.

Upon completion, receipts are written to `staking-pool-receipts.jsonl`.

## What's next

The [Operator guide](/nodes/staking-pools/operators) covers day-two work. The [example frontend](https://github.com/berachain/guides/tree/main/apps/staking-pools/frontend) is a sample UI for end users.

Continue with:

* [Contract reference](/nodes/staking-pools/contracts)
* [Operator guide](/nodes/staking-pools/operators)
