CORE_PEER_* Environment Variables on BYFN CLI


What is the default peer and how to change it on the BYFN CLI container?



On the BYFN CLI container, you can manage other peer nodes with the "peer" command.

When you run a "peer" command, it will connect to the default peer node define by these environment variables:

  • - Specify the default peer address and port number.
  • CORE_PEER_LOCALMSPID=Org1MSP - Specify the MSP ID of the peer organization.
  • CORE_PEER_MSPCONFIGPATH=.../ / - Specify the MSP (Membership Service Providers) directory for the administrator user private key and public certificate.
  • CORE_PEER_TLS_ROOTCERT_FILE=.../ - Specify the root CA certificate of the peer organization.

1. Connect the FYBN CLI container:

$ docker exec -it cli bash

2. Verify environment variables for the default peer:

bash-4.4# echo $CORE_PEER_ADDRESS

bash-4.4# echo $CORE_PEER_LOCALMSPID



3. Check status of the default peer:

bash-4.4# peer node status

4. List channels the default peer has joined:

bash-4.4# peer channel list
[channelCmd] InitCmdFactory -> INFO 001 Endorser and orderer connections initialized
Channels peers has joined:

The default peer,, has not joined to any channels yet.


Join Peer to BYFN Network Channel

BYFN Error - "unable to bootstrap orderer"

BYFN (Build Your First Network)

⇑⇑ Hyperledger Tutorials

2020-09-30, 1015🔥, 0💬