Multi-Organization Fabric Network
This tutorial walks through deploying a Fabric network with multiple organizations — the most common enterprise scenario.
What You'll Build
A 3-organization network with:
- Org1MSP — 2 peers, ordering service
- Org2MSP — 1 peer
- Org3MSP — 1 peer
- A shared channel (
supply-chain) with all 3 orgs - Chaincode deployed and approved by all orgs
Prerequisites
- ChainLaunch running at
http://localhost:8100 - Docker running with at least 8 GB RAM available
Step 1: Create the Network with CLI
The fastest way to create a multi-org network:
chainlaunch testnet fabric \
--name supply-chain \
--org "Org1MSP,Org2MSP,Org3MSP" \
--peerOrgs "Org1MSP,Org2MSP,Org3MSP" \
--ordererOrgs "Org1MSP" \
--channels supply-chain \
--peerCounts "Org1MSP=2,Org2MSP=1,Org3MSP=1" \
--ordererCounts "Org1MSP=3"
This creates everything in one command: organizations, nodes, channel, and joins all peers to the channel.
Step 2: Create Step-by-Step via UI
If you prefer the UI, follow these steps:
2.1 Create Organizations
Go to Organizations and create each one:
- Click Add Organization
- Set MSP ID:
Org1MSP, Description:Manufacturing - Repeat for
Org2MSP(Logistics) andOrg3MSP(Retail)
2.2 Create Nodes
Go to Nodes > Bulk Create for each org:
| Organization | Peers | Orderers |
|---|---|---|
| Org1MSP | 2 | 3 |
| Org2MSP | 1 | 0 |
| Org3MSP | 1 | 0 |
2.3 Create the Channel
Go to Networks > Create Network > Fabric:
- Name:
supply-chain - Add Peer Organizations: Org1MSP, Org2MSP, Org3MSP
- Select peers for each org
- Add Orderer Organization: Org1MSP
- Select all 3 orderers
- Consensus:
etcdraft - Click Create
2.4 Verify
Check that all peers have joined the channel:
curl http://localhost:8100/api/v1/networks | jq '.[].name'
Step 3: Deploy Shared Chaincode
All organizations must approve the chaincode before it's committed to the channel.
Via CLI
# Install on all peers
chainlaunch chaincode install --name mycc --version 1.0 --lang golang \
--path ./chaincode/mycc --peers peer0-org1,peer0-org2,peer0-org3
# Approve for each org
chainlaunch chaincode approve --name mycc --version 1.0 --sequence 1 \
--channel supply-chain --org Org1MSP
chainlaunch chaincode approve --name mycc --version 1.0 --sequence 1 \
--channel supply-chain --org Org2MSP
chainlaunch chaincode approve --name mycc --version 1.0 --sequence 1 \
--channel supply-chain --org Org3MSP
# Commit (needs majority approval)
chainlaunch chaincode commit --name mycc --version 1.0 --sequence 1 \
--channel supply-chain
Via API
See Deploy Chaincode for the full API flow.
Step 4: Test Cross-Org Transactions
Once chaincode is committed, any org can submit transactions and all peers will validate:
# Org1 invokes
curl -X POST http://localhost:8100/api/v1/networks/{networkId}/chaincode/invoke \
-H "Content-Type: application/json" \
-d '{
"chaincodeName": "mycc",
"channelName": "supply-chain",
"function": "CreateAsset",
"args": ["asset1", "Manufacturing plant A", "100"],
"organizationId": "Org1MSP"
}'
Endorsement Policies
By default, Fabric requires a majority of organizations to endorse a transaction. Common policies:
| Policy | Meaning | Use case |
|---|---|---|
MAJORITY | >50% of orgs must endorse | Default, good for most cases |
AND('Org1MSP.peer', 'Org2MSP.peer') | Specific orgs required | When both parties must agree |
OR('Org1MSP.peer', 'Org2MSP.peer') | Any org can endorse | Low-trust requirements |
OutOf(2, 'Org1MSP.peer', 'Org2MSP.peer', 'Org3MSP.peer') | N-of-M orgs | Flexible quorum |
Set the policy during chaincode approval.
Adding a New Organization Later
To add a 4th organization to an existing network:
- Create the organization
- Create peer nodes for the new org
- Update the channel to include the new org
- Have the new org's peers join the channel
- Install and approve chaincode for the new org
Next Steps
- Update Channel to modify the org set or policies
- Deploy Chaincode for chaincode lifecycle details
- Analytics to monitor cross-org transaction flows