Run a Stake Pool
A Cardano stake pool from the first server to daily operation, step by step, in the order that keeps keys safe.
New to all of this? CoinCashew's guide is the best first read.
Start the guide — one step at a time →
- Start hereThe picture, the economics, the keys5 steps
- IInstallMachines, a hardened Ubuntu, the node8 steps
- IIConfigureChain, topology, service, offline machine6 steps
- IIIRegisterKeys, stake address, the pool6 steps
- IVRunDaily check, KES, blocks, votes, upgrades11 steps
- VToolboxCommands, scripts, Mithril, Midnight8 steps
44 steps. Type a word to find one.
- Start here
- O-1Your pool at a glanceRelays face the world, the block producer hides behind them, the cold keys never go online.
- O-2How a pool earnsBlocks bring rewards; fixed cost and margin pay the operator, the rest goes to the delegators.
- O-3Keys and where they liveCold keys sign and stay offline; hot keys run the node; public files may go anywhere.
- O-4Before you startChecked versions, the era word, and two settings every online command uses.
- O-5The installer: Parts I and II in one goOrder a server, download one file, answer a few questions — a relay runs at the end, with a report.
- Part I — Install
- I-1What you needTwo kinds of server, one offline computer, and at least 505 ₳.
- I-2Your user and your SSH keyNever work as root: an own user with sudo, and a key pair instead of a password.
- I-3Lock down SSHKeys only, no root, another port — and keep one session open while you test.
- I-4A one-time code as second factorOptional: a password plus a six-digit code from your phone, for those who cannot keep a key.
- I-5Updates and fail2banSecurity updates install themselves; repeated bad logins get banned.
- I-6FirewallRelays open two ports to the world; the block producer opens them to your relays and to you only.
- I-7Time syncBlocks live in one-second slots; a drifting clock misses them.
- I-8Install cardano-node — and check itThe official release, verified by its SHA-256 before it runs.
- Part II — Configure
- II-1Folders and configurationA system user for the node, config in /etc/cardano, data in /var/lib/cardano.
- II-2Download the chain with MithrilA certified snapshot: hours instead of days.
- II-3TopologyRelays talk to the network and to your block producer; the block producer talks to your relays only.
- II-4Run the node as a servicesystemd starts it at boot and restarts it when it stops.
- II-5Watch it syncA first look at your node: the tip from the command line, the whole picture from gLiveView.
- II-6The air-gapped machineA computer that never connects — for the cold keys and every signature.
- Part III — Register
- III-1Payment and stake keysThe wallet that pays the deposits and receives the rewards.
- III-2Register the stake address2 ₳ deposit — build, sign, submit.
- III-3Pool keys and the operational certificateCold keys stay offline; the block producer gets three files.
- III-4Register the poolMetadata online, two certificates, the 500 ₳ deposit.
- III-5Check the registrationYour pool ID, its stake, and how an explorer sees you.
- III-6With a hardware walletOwner and rewards on a Ledger or Trezor; the cold keys stay on the air-gapped machine.
- Part IV — Run
- IV-1The daily checkFive numbers a day keep a pool healthy: sync, peers, KES days left, disk, memory.
- IV-2Renew the KES keyEvery 90 days at the latest — the certificate counter must fit the chain.
- IV-3Blocks and the leader scheduleThe slots your pool is due for, known 1.5 days before the epoch starts.
- IV-4Delegate your voteNeeded before rewards can be withdrawn.
- IV-5Withdraw the rewardsThe whole reward balance into your wallet.
- IV-6Vote as a poolHard forks, some parameters, no-confidence, committee changes — the operator's voice.
- IV-7Change pool parametersPledge, cost, margin, relays, metadata — no new deposit.
- IV-8Upgrade the nodeRelays first, the block producer last — right after one of your blocks.
- IV-9Back up and restoreWhat to save, how to encrypt it, and the restore test that makes a backup real.
- IV-10HousekeepingLogs, disk, memory, reboots — the small things that keep a node quiet.
- IV-11Retire the poolThe 500 ₳ deposit returns at the epoch you name.
- Part V — Toolbox
- V-1Useful commandsThe lines an operator types most, by situation.
- V-2Helper scriptsFour small scripts: the daily screen, the upgrade, the backup, the schedule — and the node as a container.
- V-3Send ADAA plain payment, here 10 ₳.
- V-4Move filesscp to the nodes, a USB stick to the air-gapped machine.
- V-5Add swapProtects a node with little RAM from memory peaks.
- V-6Sign for MithrilYour block producer can help certify the snapshots everyone syncs from.
- V-7Run a Midnight validatorA registered pool is the way in to Midnight's block production.
- V-8ChecklistThe habits that keep a pool safe.
Numbers to know
- Pool deposit
- 500 ₳, returned when the pool retires
- Stake address deposit
- 2 ₳, returned on deregistration
- Minimum fixed cost
- 170 ₳ per epoch
- Starting balance
- at least 505 ₳ for deposits and fees, plus your pledge
- Epoch
- 5 days
- KES key lifetime
- 62 periods of 36 hours, about 93 days — renew every 90
- Saturation
- about 1/500 of all staked ADA
- Metadata
- URL up to 64 characters, ticker 3 to 5 characters
- Relay port
- usually 3001 or 6000, the only port open to the world
Deposits, the minimum fixed cost and the saturation point are protocol parameters and can change by governance vote. The values above are the ones in force at the time of writing; with the live feed they read straight from the chain.
Official documentation
- Cardano Developer Portal — Operate a stake poolThe official walkthrough with hardware, keys and registration.
- Cardano Operations BookCurrent config files for every network and environment.
- Testnets and test ADAPreview and Preprod, and the faucet for free test ADA.
- cardano-node releasesRelease notes and binaries — upgrade from here only.
- Mithril documentationSnapshots for a fast sync, and how a pool signs them.
- CoinCashew's guideThe classic walkthrough many operators started with.
Sources and license
Text, pictures and order are BRIAN's. Commands for system setup, the firewall, Mithril and the service file are adapted from the Cardano Developer Portal; every cardano-cli command was written for and run against cardano-cli 11.2.3. The node's own documentation always takes precedence.
Developer Portal license (MIT) — Copyright (c) 2021 Cardano Foundation
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.