> ## 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/`. Set the environment, run the script once, and read back the pool address and a receipt. The script uses Foundation-delegated funds when a DelegationHandler already exists 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, the 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, plus gas (for example, 0.1 BERA) for activation

A DelegationHandler is the Foundation contract that holds delegated capital for your validator. The Berachain Foundation creates it when they issue a delegation.

## 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           | Required | Purpose                                                                                            |
| ------------------ | -------- | -------------------------------------------------------------------------------------------------- |
| `EL_RPC_URL`       | Yes      | Execution-layer JSON-RPC. Network (`mainnet` or `bepolia`) is read from `eth_chainId` on this URL. |
| `CL_NODE_API_URL`  | Yes      | Beacon Kit Node API base URL.                                                                      |
| `PRIVATE_KEY`      | No       | Signs `cast send` on this host when set.                                                           |
| `VALIDATOR_PUBKEY` | No       | Validator pubkey default.                                                                          |
| `FUNDING_ADDRESS`  | No       | Funding wallet on the self-funded path. Ignored when `PRIVATE_KEY` is set.                         |
| `OPERATOR_ADDRESS` | No       | Operator on the self-funded path.                                                                  |
| `SHARES_RECIPIENT` | No       | Shares recipient on the self-funded path.                                                          |

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

## Run install.sh

The script deploys and activates one pool and doesn't resume. Run it once per pool:

```bash theme={null}
./install.sh
```

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

On success, the script prints the staking pool address. Confirmed transactions append to `staking-pool-receipts.jsonl`.

Call the pool with `cast` for staker operations. 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.

## What's next

Continue with:

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