-
Notifications
You must be signed in to change notification settings - Fork 21
Installation Guide
The purpose of this guide is to help BrightID users install and run a new BrightID-Node.
wget https://github.com/BrightID/BrightID-Node/archive/docker.tar.gztar -xvf docker.tar.gz
cd BrightID-Node-dockernano config.envBN_WS_IP is the node's public IP and will be automatically retrieved from an online service if left blank.
BN_CONSENSUS_PRIVATE_KEY is the private key for an IDChain address. Make sure the address has enough Eidi for gas to write operations to IDChain. An easy way to create an ethereum address and retrieve its private key is through the Vanity-ETH web interface.
BN_WS_PUBLIC_KEY and BN_WS_PRIVATE_KEY are an EdDSA keypair used to sign verifications. There are several ways to generate an EdDSA key pair. An easy way is to use the random button on the TweetNaCl.js sign test interface.
BN_WS_ETH_PRIVATE_KEY is the private key for an Ethereum address that is used to sign verifications for ethereum smart contracts. An easy way to create an ethereum address and retrieve its private key is through the Vanity-ETH web interface.
BN_UPDATER_SP_INFURA_URL is an infura API url and should be set to wss://mainnet.infura.io/ws/v3/{INFURA_PROJECT_ID} where INFURA_PROJECT_ID is an Infura ethereum project id. If you create an Infura account, and an Ethereum project under that account, you can find the project id under settings tab of the project.
To be able to use docker pull you should have an account on docker.com. After creating account and logging in, go to here and create a new access token. Then use the docker login --username <username> and enter your access token as password. If you got Error saving credentials error, you may be able to solve that by sudo apt install gnupg2 pass. You can start pulling BrightID containers after logging in.
docker-compose pull
INIT_BRIGHTID_DB=1 docker-compose up -dINIT_BRIGHTID_DB=1 should only be used first time you are initializing the node as it preload the database by the latest backup of the official node. To upgrade the node when newer version released, you should only stop the node and start it again (without initializing database) using following commands:
docker-compose pull
docker-compose stop
docker-compose up -dPort 80 needs to be exposed for clients. Ports 8529 and 3000 are used internally by BrightID-Node, but should not be exposed.
Consider running
sudo sysctl -w vm.max_map_count=4096000
on a Linux host system. ArangoDB makes extensive use of memory mapped files. More tuning settings for ArangoDB on Linux.
BrightID data can be explored and settings can be configured through ArangoDB's web interface.
If you installed the node locally, you can access the web interface from localhost:8529, and if you installed on a server, you can create an SSH tunnel as described bellow to access it.
Create a tunnel to any port you like. This example uses port 3333.
On your local machine that has SSH access to the server, run
ssh -nNTL 3333:localhost:8529 <your-server-address> &
Now open a browser with the following address:
http://localhost:3333/
- "Collections" - shows all of the collections in the db
- "Queries" - explore the graph and other collections with queries and visualizations
- "Services"
- API - shows the API endpoints for the BrightID web service
- Settings - configure settings for the BrightID web service (Can also be edited as constants in config.env)
- Logs - view warnings and errors