How to Build a Private Blockchain with Cosmos SDK
A private chain on Cosmos SDK has a closed validator set and permissioned modules, so a group of known organisations shares one ledger. Here is how to build it.
On this page
Short answer
A private blockchain built with Cosmos SDK is an application-specific chain whose validators are a closed group of known organisations, not the public. It uses the SDK's modules for accounts, tokens and governance, adds permission controls, and runs on CometBFT consensus so the group shares one ledger it controls.
What is a private blockchain built with Cosmos SDK?
A private blockchain built with Cosmos SDK is an application-specific chain whose validators are a closed group of known organisations. The chain is built with the Cosmos SDK framework, which gives you ready-made modules for accounts, tokens, staking and governance, and you add the rules that keep it private.
Private here means permissioned, not hidden. Every member can see the ledger and check it, but only approved organisations can validate blocks or join the network. That suits banks, suppliers or government bodies that need a shared record without opening it to the public.
The chain is application-specific because it is built for one job, such as settling payments between members or tracking goods. You keep only the modules that job needs, which keeps the chain simpler and easier to audit than a general-purpose platform.
Why use Cosmos SDK for a private chain?
Cosmos SDK fits private chains because it was built for application-specific chains from the start. The table below shows what each part of the stack gives a private network.
| What you need | What Cosmos SDK gives you | Why it matters for a private chain |
|---|---|---|
| Application logic | Ready-made and custom modules | Build only the functions your members need |
| Consensus | CometBFT, a proven engine | Fast finality with a known validator set |
| Validator control | Staking and governance modules | Admit or remove validators by vote |
| Privacy | Permissioned access rules | Only members read and write the ledger |
| Connections | IBC for cross-chain messages | Link to other chains when the group agrees |
The key point is control. A private chain needs to decide who validates, who joins and who can change the rules, and the SDK gives you those controls as modules rather than forcing you to build them from scratch.
How do you design the validator set?
You design the validator set by deciding which organisations run a node, how many there are and how many must agree for a block to be final. A common shape is one validator per member organisation, with a small number of extra nodes for resilience.
CometBFT finalises a block when more than two-thirds of the voting power agrees, so the set must be large enough that no single member can halt the chain and small enough that agreement stays fast. Four to seven validators is a common starting point for a private network.
Changes to the set should go through governance, not through a single operator. A member that leaves should be removed by vote, and a new member should be admitted the same way, so no one organisation can quietly change who controls the chain.
How do you add permissioned modules?
You add permissioned modules by writing custom modules on top of the SDK's standard ones, or by adding access checks to the modules you already use. The SDK's module system is built for this: each module owns a piece of state and the messages that change it.
A typical private chain adds a membership module that holds the list of approved organisations and their keys, and checks that list before any sensitive message is processed. It may also add an asset module that only lets approved issuers create tokens, and a settlement module that only lets members move value between accounts.
Keep the permissioned logic in as few modules as possible. Every custom module is code you must audit and maintain, so a small, clear set of rules is safer than a large web of checks spread across the chain.
How do you handle identity and access?
You handle identity and access by giving each member organisation a key pair and a role, and by checking both on every action. The key proves who is acting; the role decides what they may do.
Keys should live in hardware security modules or managed key services, not on a developer's laptop, because a stolen validator key lets an attacker sign blocks. Each organisation should hold its own keys and be able to rotate them without taking the chain down.
Access to read the chain is a separate question from access to write to it. Members usually read everything, while only validators write blocks and only approved accounts submit transactions. Decide both lists in the governance rules, not in code that nobody can change.
How to build it, step by step
You build a private Cosmos SDK chain in this order, so each decision rests on the one before it.
- Agree the members and the job. List the organisations, the job the chain does and the data it will hold, and write the governance rules down.
- Design the validator set. Decide who validates, how many validators there are and how the set changes.
- Scaffold the chain. Generate the chain skeleton with the SDK's tooling and keep only the modules the job needs.
- Write the permissioned modules. Add the membership, asset and settlement rules that make the chain private.
- Set up the test network. Run the chain with the real members on a test network and rehearse joining, leaving and voting.
- Audit and launch. Audit the custom modules, agree the launch procedure and start the chain with all members watching.
The general SDK workflow is the same whether the chain is public or private. How to implement Cosmos SDK step by step covers the scaffolding and module work in more detail.
For the platform choice on private chains in general, how to create a private blockchain covers the options beyond Cosmos SDK.
Example (hypothetical): a four-bank settlement network
Example (hypothetical): four banks agree to settle payments between themselves on a private Cosmos SDK chain. Each bank runs one validator, so the set has four validators, and a block is final when three of them agree.
The chain makes a block every 5 seconds, which is 12 blocks a minute and 720 blocks an hour. In a test week the banks settle 2,000 payments, and each payment is checked by the settlement module before it is written to the ledger.
The arithmetic: 12 blocks a minute times 60 minutes is 720 blocks an hour, and four validators with three needed to agree means one bank can be offline without stopping the chain. The network works because the rules, not trust, decide who may validate and who may settle.
What are the common mistakes?
The most common mistakes when building a private Cosmos SDK chain are copying a public chain design, writing too many custom modules and letting one member hold all the keys.
- Copying a public chain. A public chain assumes anyone may join; a private chain must decide membership, and that decision shapes the whole design.
- Too many custom modules. Each custom module is code to audit and maintain; keep the permissioned logic small and clear.
- One member holds the keys. If one organisation controls the validator keys, the chain is not really shared, whatever the design says.
- No governance process. Without a written process for admitting and removing members, the first dispute will stall the network.
- Skipping the audit. Custom modules handle money and access, so they need an independent audit before launch.
For the background on the framework itself, what is Cosmos SDK explains the modules and the architecture, and the SDK's own docs cover the current tooling.
Key takeaways
- A private chain has a closed validator set of known organisations
- Cosmos SDK gives you modules for accounts, tokens and governance
- Keep permissioned logic in a few small, auditable modules
- Governance decides who joins and who leaves, not one operator
- Rehearse member changes on a test network before launch
Frequently asked questions
What is the difference between a private and a public blockchain?
A public blockchain lets anyone join, validate and read the ledger, while a private blockchain limits those rights to approved organisations. A private chain still shares one ledger between its members, but membership, validation and access are decided by the group.
Do I need a token for a private chain?
Not necessarily. A private chain can settle in an existing asset or a simple internal unit, and many private chains have no public token at all. The token, if there is one, is a tool for the chain's job, not a product to sell.
How many validators should a private chain have?
Four to seven is a common starting point. That is enough that no single member can halt the chain, and small enough that blocks finalise quickly. The right number depends on how many member organisations there are and how much downtime the network must survive.
Can a private Cosmos SDK chain connect to other chains?
Yes, through IBC, the protocol Cosmos chains use to send messages to each other. The group decides which connections to open, so a private chain can link to a partner chain without opening itself to the public.
Is Cosmos SDK only for public chains?
No. The SDK builds application-specific chains, and whether the chain is public or private depends on the validator set and the access rules, not on the framework. Private chains use the same modules with permissioned controls added.
How long does it take to build a private chain?
A small private chain with a few modules can reach a test network in weeks, but governance, audits and member onboarding usually take longer. Plan the launch around the slowest member, not the fastest developer.