I use stellar-core for the run an own private network. I have a private network setup with 2 nodes running (self-validating) and one REST server running.
But on running Horizon API(http://localhost:8000/
) it doesn't show a history of the ledger. it shows a 0 value and it's not updating. Using this reference, I was created a Private net.
Node 1:
# What port stellar-core listens for commands on. This is for Horizon server.
HTTP_PORT=11626
PUBLIC_HTTP_PORT=false
# If it is true, It prevents you from trying to connect to other peers
RUN_STANDALONE=false
# A phrase for your network. All nodes should have the same network phrase.
NETWORK_PASSPHRASE="Standalone Network ; DEC 2018"
# The seed used for generating the public key this node will be identified within SCP.
NODE_SEED="SCKWWAH6W3AFRGZZGAWFLC5FGKUEB7YWOHAQY5XSWO7R3HTPU4GQ3Q4F self"
# Only nodes that want to participate in SCP should set NODE_IS_VALIDATOR=true.
# Most instances should operate in observer mode with NODE_IS_VALIDATOR=false.
NODE_IS_VALIDATOR=true
# Comma separated peers list
KNOWN_PEERS=["127.0.0.1:11635"]
# Postgres DB URL
DATABASE="postgresql://dbname=stellar_node01_db host=localhost user=abc password=abc"
# The port other instances of stellar-core can connect to you on.
PEER_PORT=11625
# Log level setup
COMMANDS=["ll?level=trace"]
FAILURE_SAFETY=0
UNSAFE_QUORUM=true
#The public keys of the Stellar servers
[QUORUM_SET]
THRESHOLD_PERCENT=100
# comma sepearted validator list
VALIDATORS=["$self"]
[HISTORY.vs]
get="cp /tmp/stellar-core/history/vs/{0} {1}"
put="cp {0} /tmp/stellar-core/history/vs/{1}"
mkdir="mkdir -p /tmp/stellar-core/history/vs/{0}"
Node 2:
# What port stellar-core listens for commands on. This is for Horizon server.
HTTP_PORT=11636
PUBLIC_HTTP_PORT=false
# If it is true, It prevents you from trying to connect to other peers
RUN_STANDALONE=false
# A phrase for your network. All nodes should have the same network phrase.
NETWORK_PASSPHRASE="Standalone Network ; DEC 2018"
# The seed used for generating the public key this node will be identified within SCP.
NODE_SEED="SCKWWAH6W3AFRGZZGAWFLC5FGKUEB7YWOHAQY5XSWO7R3HTPU4GQ3Q4F self"
# Only nodes that want to participate in SCP should set NODE_IS_VALIDATOR=true.
# Most instances should operate in observer mode with NODE_IS_VALIDATOR=false.
NODE_IS_VALIDATOR=true
# Comma separated peers list
KNOWN_PEERS=["127.0.0.1:11625"]
# Postgres DB URL
DATABASE="postgresql://dbname=stellar_node02_db host=localhost user=abc password=abc"
# The port other instances of stellar-core can connect to you on.
PEER_PORT=11635
# Log level setup
COMMANDS=["ll?level=trace"]
FAILURE_SAFETY=0
UNSAFE_QUORUM=true
#The public keys of the Stellar servers
[QUORUM_SET]
THRESHOLD_PERCENT=100
# comma sepearted validator list
VALIDATORS=["$self"]
[HISTORY.vs]
get="cp /tmp/stellar-core/history/vs/{0} {1}"
put="cp {0} /tmp/stellar-core/history/vs/{1}"
mkdir="mkdir -p /tmp/stellar-core/history/vs/{0}"
Output of Horizon Api: