Skip to main content

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:

  1. Click Add Organization
  2. Set MSP ID: Org1MSP, Description: Manufacturing
  3. Repeat for Org2MSP (Logistics) and Org3MSP (Retail)

2.2 Create Nodes

Go to Nodes > Bulk Create for each org:

OrganizationPeersOrderers
Org1MSP23
Org2MSP10
Org3MSP10

2.3 Create the Channel

Go to Networks > Create Network > Fabric:

  1. Name: supply-chain
  2. Add Peer Organizations: Org1MSP, Org2MSP, Org3MSP
  3. Select peers for each org
  4. Add Orderer Organization: Org1MSP
  5. Select all 3 orderers
  6. Consensus: etcdraft
  7. 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

The chainlaunch fabric install command runs the full Fabric chaincode lifecycle (install on peers → approve for each org → commit when threshold is met) in one shot. Pass one network-config file per organization (or one file for all) and one user per organization:

chainlaunch fabric install \
--chaincode mycc \
--channel supply-chain \
--policy "OR('Org1MSP.member','Org2MSP.member','Org3MSP.member')" \
--config ./network-config-org1.yaml \
--config ./network-config-org2.yaml \
--config ./network-config-org3.yaml \
--organizations Org1MSP \
--organizations Org2MSP \
--organizations Org3MSP \
--users admin \
--users admin \
--users admin \
--chaincodeAddress localhost:9999

The command also handles re-installs and version bumps — it queries the committed definition and increments the sequence automatically when the chaincode bytes or policy change.

Via API or Web UI

See Deploy Chaincode for the API flow and the web UI Chaincode wizard, both of which expose the same install→approve→commit lifecycle as discrete steps.

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:

PolicyMeaningUse case
MAJORITY>50% of orgs must endorseDefault, good for most cases
AND('Org1MSP.peer', 'Org2MSP.peer')Specific orgs requiredWhen both parties must agree
OR('Org1MSP.peer', 'Org2MSP.peer')Any org can endorseLow-trust requirements
OutOf(2, 'Org1MSP.peer', 'Org2MSP.peer', 'Org3MSP.peer')N-of-M orgsFlexible quorum

Set the policy during chaincode approval.

Adding a New Organization Later

To add a 4th organization to an existing network:

  1. Create the organization
  2. Create peer nodes for the new org
  3. Update the channel to include the new org
  4. Have the new org's peers join the channel
  5. Install and approve chaincode for the new org

Next Steps