---
name: setup-validator
description: Set up and verify a FLOP BABE/AlephBFT validator host using the repository's operator flow. Use when an operator asks an agent to bring a validator online; not for protocol changes.
---

# Set up a FLOP validator

Use the [public validator manual](../../../knowledge/public/how-it-works/run-validator.md) for the operator-facing sequence, [validator onboarding](../../../docs/onboarding/validator.md) for live stake and slash rules, and [devnet join runbook](../../../docs/runbooks/devnet-add-validator.md) for the currently executable path. Read the exact tracked compose file, `.env.example`, and `infra/devnet/operator.mjs` before changing a host. `scripts/setup-validator.sh` is retired. Do not infer a public production chain, image, bootnode, or admission path from old examples.

## One-pass workflow

1. Identify the target network and host, the operator's authorized scope, existing node/DA data, and whether the host joins a fresh disposable devnet or an existing network. Gather missing **non-secret** inputs together: host address, bootnode multiaddr, chain spec/image digest, reachable RPC/DA endpoints, and whether an authorized root will promote the account. Accept private endpoint values supplied by the operator only after checking the network/genesis they identify. If a production artifact or admission authority is missing, prepare the host and leave that step explicitly pending; never substitute a devnet value.
2. Inspect host CPU, storage, network, Docker/Compose, clock, firewall, and available ports without printing environment files. Validators need no GPU or TEE. Keep one running process per session key set. Preserve existing chain volumes; the new devnet preset requires fresh volumes and cannot be pointed at the older five-authority chain. Protect operator and DA seeds on the host in untracked, mode-restricted files or an approved secrets store. Never request a private key in chat, put it in a command transcript, or copy a seed into a repository file.
3. For a **fresh disposable devnet** with authorized join/funding, use `infra/devnet/docker-compose.yml` and `infra/devnet/.env.example`. Pin the same node image and `CHAIN` across hosts. Set reachable P2P and DA addresses, bootnode, and loopback RPC. For a joining operator, leave `GENESIS_SEED` empty and set `DA_VALIDATOR_SEED` locally; use that same seed as `OPERATOR_SEED` for the **applicant's local `join` only**. Install JS dependencies via `pnpm install --frozen-lockfile`. Check peers and advancing best/finalized heads before joining.
4. The single-admin disposable devnet runbook orders `fund`, `join`, `fund`, authorized root `promote`, then `verify`. Its current `infra/devnet/operator.mjs` requires `OPERATOR_SEED` for **every** action, including funding, promotion, and read-only verification. That coupling is unsuitable when the applicant and network admin have independent custody: never obtain or transfer the applicant's seed to run an admin action. In that case use only a separately verified, address-only funding/promotion transaction path with the admin's own signing key and public applicant address; otherwise stop that handoff pending [#2002](https://github.com/flop-labs/flop-core/issues/2002). The applicant runs `join` on their own host, obtaining owner-bound `babe`, `audi`, and `alp0` keys, submitting `session.setKeys`, and queuing `validators.register`. Registration alone does not activate a validator. Temporarily enable `RPC_METHODS=unsafe` **only** for the local join action with `RPC_BIND_IP=127.0.0.1`; restore safe RPC immediately afterward and read back the running process arguments. Do not store `unsafe` in `.env` or expose that RPC publicly. Check queue order before any one-account promotion; never silently promote another account. Run signed funding or root actions only within the operator's authorization.
5. In a single-admin disposable devnet, run the helper's `verify` through up to two session boundaries. With independent custody, use verified read-only RPC queries keyed by the public account instead of requesting its seed for the helper. Confirm the account in `session.validators`, its registered BABE key in `babe.authorities`, the registered Aleph `alp0` key in `AlephApi_authorities`/`authority_ids`, live peers, and an advancing finalized head. A healthy container, registration, queue entry, or `aleph.currentCommittee` snapshot alone does not prove the validator is active. Confirm DA endpoint announcements and custody prerequisites for any DA claim.

Report a compact receipt: network/genesis, pinned image, host and advertised addresses (redact private details as appropriate), key **public identifiers only**, signed action IDs and finality, safe-RPC readback, active session/BABE/Aleph evidence, finalized heights, DA status, and pending external gates. State clearly if the result is prepared, registered, active, or still blocked. Do not claim mainnet validation or rewards without live evidence; the public release bundle is tracked in [#2003](https://github.com/flop-labs/flop-core/issues/2003). For incidents after setup, use the `infra-ops` skill and `just incident-snapshot`.
