How to Become a Midnight Block Producer
Are you ready to extend your Cardano stake pool skills into the Midnight Network ecosystem? Midnight is a confidential‐computing sidechain to Cardano. Block producer called Midnight Validator generate blocks, keep the network synchronized and secure. This guide uses the latest documentation (August 2025) to walk you through the journey from Cardano Stake Pool Operator (SPO) to Midnight Validator (block producer).
Why Midnight validators matter
Validators are the beating heart of Midnight. They produce new blocks, uphold the chain’s integrity and enable secure, private smart‑contract execution. Becoming a block producer is more than running software: it’s joining a pioneering community exploring confidential computing. The more independent operators who join the validator committee, the stronger and more decentralised the Midnight network becomes.
Prerequisites
Before starting, make sure you have the right skills and gear. According to Midnight’s official documentation:
- 
Must have skills: Comfortable running and monitoring blockchain nodes, proficient with command‑line tools and system administration, and experienced with Cardano stake pool operations.
 - 
Must have gear: A reliable internet connection (≥ 50 Mb/s) and adequate hardware to run a full node. Backup power and redundant connectivity are “nice to have” to ensure high availability.
 - 
There is no slashing if your validator goes offline; the only cost is missing block rewards opportunities.
 - 
Hardware requirements: Running Midnight node requires some hardware depending on whether you’re on testnet or mainnet. Here’s the updated table with the versions filled in:
Service Quantity CPU testnetCPU mainnetMemory testnetMemory mainnetStorage testnetStorage mainnetCardano DB Sync 1 4 VCPU 4 VCPU 32 GB RAM 32 GB RAM 20 GB free 320 GB free Cardano Node 2 2 VCPU 4 VCPU 4 GB RAM 16 GB RAM 20 GB free 250 GB free PostgreSQL 1 0.5 VCPU 1 VCPU 1 GB RAM 1 GB RAM - - Midnight Node 1 4 VCPU 8 VCPU 16 GB RAM 32 GB RAM 40 GB free TBD Ogmios 1 0.5 VCPU 1 VCPU 1 GB RAM 2 GB RAM - -  - 
Familiarity with Linux, networking and security practices is highly recommended.
 - 
Check the network compability matrix also for the version (Ogmios, cardano-node, Midnight node, etc.)
 
In addition to technical skills, you’ll need to operate on the Cardano Preview Testnet; Midnight testnet‑02 block producers run on Preview and will later transition to mainnet.
You can follow the official video tutorial playlist from Midnight Network, on “Introduction to Midnight Block Production”
Step 1: Operate a Cardano Stake Pool
Source: Step 1. Begin operating a Cardano Stake Pool
Midnight is a partner chain to Cardano. Every Midnight block producer must first be a Cardano Stake Pool Operator (SPO). The “Begin operating a Cardano stake pool” page explains why.
Midnight serves as a partner‑chain to Cardano, presenting a distinctive opportunity for SPOs to uphold the decentralization and security of Midnight. To embark on the path of becoming a Midnight Validator, one must either be, or become, a Cardano SPO.
Supported environment
Midnight’s testnet‑02 only accepts SPOs on the Cardano Preview testnet; Pre‑prod and mainnet environments are not yet supported.
Requirements
The stake pool operation guide lists several prerequisites:
- 
Cardano node version 10.1.4: run this version for compatibility with Midnight.
 - 
500 tADA (for deposit) plus stake pool pledge fee.
 - 
A UTXO for the Midnight validator registration fee and its associated
payment.skey. - 
The SPO cold signing key (
cold.skey) will be needed during Midnight registration. - 
An air‑gapped device for secure key handling (optional on testnets).
 
Useful resources
Running a Cardano SPO can be daunting, but there are community tool kits:
- 
Cardano Handbook: comprehensive guide covering node setup and stake pool management → Module 5. Creating a stake pool | cardano course
 - 
Guild Operators SPO Toolkit: scripts to expedite pool setup and management → Basics - Guild Operators
 - 
Cardano Developer Portal – introduces stake pool operations and emphasizes the importance of server management, security and networking. It lists key resources such as CNTools, Topology Updater and Coin Cashew guides → Operate a Stake Pool | Cardano Developer Portal
 
Once your stake pool is running on the Preview testnet, obtain the required keys and UTXO and keep them safe (ideally on an air‑gapped machine). Now you’re ready to prepare the partner‑chain environment.
Step 2: Configure Partner‑Chain Dependencies
Source: Step 2. Configure Partner-Chains Dependencies
Midnight validators rely on several Cardano services. The official guide lists four key components:
- 
cardano‑node: downloads and syncs the Cardano blockchain.
 - 
cardano‑db‑sync & PostgreSQL: indexes the Cardano chain into a Postgres database so the Midnight node can follow it.
 - 
Ogmios: WebSocket API used by the partner‑chain CLI to submit transactions.
 - 
A Midnight node running in validator mode (set up later).
 
The docs recommend using the compose‑partner‑chains.yml file with Docker Compose to launch these services. Before starting, ensure:
- 
Your system meets hardware requirements (see Step 1) and you have root or sudo access.
 - 
Docker and Docker Compose are installed and running in rootless mode.
 - 
Firewall rules are configured so Docker doesn’t bypass
ufw→ set"iptables": falsein/etc/docker/daemon.jsonand restart Docker. 
Set up with Docker Compose
Follow these steps to configure partner‑chain dependencies:
- 
Install direnv – Use
sudo apt install direnvand hook it into your shell (eval "$(direnv hook bash)"). - 
Clone the midnight‑node‑docker repository:
git clone git@github.com:midnightntwrk/midnight-node-docker.git - 
Configure environment variables: The
.envrcfile sets Postgres credentials forcardano-db-sync. You generally don’t need to change them; a random password is generated automatically. - 
Start services: Launch cardano‑node, cardano‑db‑sync, PostgreSQL and Ogmios in detached mode:
docker compose -f compose-partner-chains.yml up -dOn older Docker versions use
docker-composeinstead ofdocker compose. Synchronization with the Cardano network may take several hours; be patient and ensure the database is fully synced before proceeding. 
Monitor the services
To verify container status and troubleshoot:
- 
List running containers with
docker container list. - 
View logs for each container using
docker logs <container>. - 
Access Ogmios dashboard at
http://localhost:1337/(or substitute the host’s IP address). - 
Query database sync progress with PostgreSQL and SQL queries (see Step 2 docs for commands).
 
If you encounter a PostgreSQL authentication error, stop all services, remove the postgres-data volume, and restart to regenerate credentials.
Once cardano‑node and cardano-db‑sync are fully synced, you’re ready to register as a Midnight block producer.
Step 3: Register your SPO as a candidate in the block producer committee
Source: Step 3. Register SPO as a candidate in the block producer committee
Registration is handled via Midnight’s partner‑chain CLI wizards. After your SPO is running and the partner‑chain dependencies are synchronized, you can register your stake pool as a candidate. The official blog summarizes the process:
Register your SPO as a committee candidate using the partner‑chain CLI. The process is a three step sequence streamlined by the Midnight node’s CLI wizards:
Initiate registration: Select a UTXO from your Cardano address to establish context.
Prepare registration signature: On a secure machine, use your SPO cold key to generate signatures proving ownership.
Submit registration: Provide the signatures and keys to finalize registration
Behind the scenes, the CLI wizards wrap several commands exposed by midnight-node.  The available wizards that we will use are: generate-keys, register1, register2, register3, and deregister.  Registration is split into three commands to allow you to use cold keys on an air‑gapped machine.
Generate partner‑chain keys
Before registering, you must generate validator keys inside the midnight container.  The wizard produces:
- 
sidechain key
 - 
grandpa key
 - 
aura key
 
These keys are stored in your node’s keystore folder. Run the following inside the container:
./midnight-node wizards generate-keys 
The wizard will prompt you through key generation and save them to ./data/chains/partner_chains_template/keystore/ in your midnight container.
Registration commands
After generating keys:
- 
register1: Initiates registration by selecting the UTXO and generating the transaction context.
 - 
register2: Performed on your cold machine using your SPO cold key to sign the registration transaction.
 - 
register3: Finalises registration on your main machine and submits the transaction.
 
If you ever wish to stop producing blocks, use the deregister command to remove your SPO from the validator committee.
After your registration transaction is submitted, your SPO will enter the committee rotation in N + 2 Cardano epochs (where N is the epoch of registration).  You will be eligible to produce Midnight blocks when your node becomes part of the active committee.
Step 4: Run a Midnight node in validator mode
Source: Step 4. Run a Midnight node in Validator Mode
With your SPO registered and partner‑chain dependencies synchronized, you can start your Midnight node in validator mode.
The official docs provides a practical guide:
- 
Ensure the Postgres port is accessible and that
cardano-db-synchas fully synced. - 
Edit
.envrcin yourmidnight-node-dockerdirectory. Append the--validatorflag toAPPEND_ARGSso your node starts in validator mode. An example configuration:export APPEND_ARGS="--allow-private-ip --validator --pool-limit 10 \ --trie-cache-size 0 --prometheus-external --unsafe-rpc-external --rpc-cors all" - 
Start the Midnight node via Docker:
docker compose up -d - 
The node will begin syncing with testnet‑02. Syncing takes several hours; the logs will show progress (e.g.,
Syncing 2.6 bps, target=#474962). 
Once the node is synced and keys are loaded, you will be eligible to produce blocks starting N + 2 epochs after registration.  When your node begins forging, logs will contain messages like “Prepared block for proposing”, “Pre‑sealed block for proposal”, and “Imported” →  these indicate that your blocks are being proposed and accepted.
Monitoring your validator
LiveView.sh → terminal dashboard
GitHub repository: GitHub - Midnight-Scripts/Midnight-Live-View: Ment to display help full info about midnight validator node
A lightweight way to monitor your validator is LiveView.sh, an open‑source script inspired by CNTools gLiveView. The script displays:
- 
Node version, server uptime and container start time
 - 
Partially masked node key and port
 - 
Key and registration status
 - 
Block count since Docker restart, epoch number and sync status
 - 
Peer count and hardware resources
 
To enable external RPC access and Prometheus metrics, modify the APPEND_ARGS line in .envrc:
export APPEND_ARGS="--validator --allow-private-ip --pool-limit 10 \ --trie-cache-size 0 --prometheus-external --unsafe-rpc-external \ --rpc-methods=Unsafe --rpc-cors all" 
Then download and run the script:
wget -O LiveView.sh https://raw.githubusercontent.com/Midnight-Scripts/Midnight-Live-View/refs/heads/main/LiveView.sh sudo chmod +x LiveView.sh ./LiveView.sh 
If you change the container name or port, update the variables in the script (CONTAINER_NAME and PORT).  Note that logs are not persisted when the Docker container restarts, so the block count will reset.  You can test metrics by curling the Prometheus endpoint at http://127.0.0.1:9615/metrics.
Midnight Validator Dashboard – web‑based monitoring
GitHub repository: GitHub - luislucena16/midnight-validator-dashboard: Professional dashboard to monitor validator nodes and explore data on the Midnight blockchain. Includes real-time metrics, RPC access, system monitoring, and block explorer. by @luislucena
For a richer experience, use the Midnight Validator Monitor, a web dashboard built with React and Next.js. According to the project’s README, it provides real‑time validator monitoring, a block explorer and system resource charts. Features include:
- 
Real‑time validator status and performance with automatic refresh every 30 seconds.
 - 
Interactive block explorer and blockchain synchronisation visuals.
 - 
System resource usage (CPU, memory, disk) and network status.
 - 
RPC method access and key management.
 
Local setup for testnet
- 
Clone the repository and install dependencies:
git clone https://github.com/luislucena16/midnight-validator-dashboard.git - 
Set up testnet infrastructure using the provided
testnet.yml, which launchesproof-server, anindexer, a Midnight node (with Prometheus metrics) andnode-exporter. Run:docker compose -f testnet.yml up -d - 
Start the dashboard locally:
npm run dev 
The interface will be available at http://localhost:3000.
Server deployment
To monitor your production validator, deploy the dashboard on your server:
- 
Expose ports
9944,9615and9100. - 
Configure the Midnight node with flags
--rpc-port=9944,--rpc-external,--prometheus-externaland--prometheus-port=9615. - 
Add a
node-exportercontainer to expose system metrics. 
Restart the services and run npm run dev to launch the dashboard.  The README also suggests deploying to providers like Vercel or Netlify for a publicly accessible dashboard.
Additional tips and resources
- 
Committee rotation and incentives: After registration, your node becomes eligible for block production after
N+2epochs. Consult the tokenomics and incentives whitepaper for details on rewards. - 
Stay secure: Running a validator is a long‑term commitment. Follow security best practices (firewall rules, cold storage, monitoring) as emphasized in the Cardano developer portal.
 - 
Learn continuously: The Cardano and Midnight communities produce tutorials, diaries and video walkthroughs. The July 2025 blog post includes a video playlist walking through each step.
 - 
Join the Midnight community: For questions and camaraderie, join the Midnight Discord server and chat with fellow SPOs and developers → Midnight Network
 
Conclusion
Becoming a Midnight block producer isn’t a simple stuff; it’s a journey through Cardano stake pool operations, Docker‑based infrastructure and CLI wizards. Yet, the process is rewarding: you’ll help secure Midnight’s confidential computing network and gain pioneer experience in a new era of privacy‑preserving blockchains. With the resources above, a bit of patience and a dash of curiosity, you’ll be forging Midnight blocks before long. See you on testnet‑02!
