Beginner’s Guide

Installation Guide

This guide gives an instruction on installing and running WeIdentity in simple ways.

1. Prerequisites and Check List

  • Please prepare a server with internet access. You may find more details from below check list.
NO. Type Entry Version/Configuration Remarks
1. Infrastructure Server Operation System Ubuntu(18.04.1 64bit) See more supported operation systems.
2. Infrastructure Server Configuration 1 virtual machine with 2 cores CPU,4G memory,50G data disk See more recommended configurations.
3. Infrastructure Network Configuration See Network Requirements below.
4. Dependency Software Installation Latest version of OPENJDK, 8+. Required by WeIdentity. See more supported JDK versions.
5. Dependency Software Installation Gradle v6.4 Required by WeIdentity JAVA SDK. Visit Gradle website for more details if needed.
6. Dependency Software Installation Mysql v5.7.30 Required by WeIdentity. Visit Mysql website for more details if needed.
7. Blockchain FISCO BCOS Installation FISCO BCOS v2.5
8. WeIdentity WeIdentity Installation Latest version of WeIdentity Web Tool, v1.0+ For WeIdentity Deployment
9. WeIdentity WeIdentity Deployment Latest version of WeIdentity, v1.6+. Including WeIdentity JAVA SDK and WeIdentity Contract.

Network Requirements:

  • Enable server to download related installation files from internet.
  • Enable your browser to visit WeIdentity Web Tool GUI via http.
  • Enable communication among WeIdentity and FISCO BCOS blockchain nodes.

2. Installation

1) Install Dependencies

  • Run below commands one by one to install Openssl,Curl,Git,Openjdk,Mysql,Sdkman and Gradle on the server.
sudo apt install -y openssl curl
sudo apt install -y git
sudo apt install -y default-jdk
sudo apt-get install mysql-server-5.7
sudo apt install -y unzip
sudo apt install -y zip
curl -s "" | bash
source "$HOME/.sdkman/bin/"
sdk install gradle 6.4
  • Run below commands to setup Mysql database.
sudo mysql -u root
create database weid;
GRANT ALL PRIVILEGES ON weid.* TO weid@"%" IDENTIFIED BY "password";
  • Run below commands to check if the depandencies have been installed successfully.
sdk version
java -version
gradle -v
sudo mysql -v

2) Install FISCO BCOS and WeIdentity

NO. Module Version Description
1. FISCO BCOS v2.5 Latest version by 2020.07
2. Web3SDK v2.4.1 Latest version by 2020.07
3. FISCO BCOS Console v1.0.9 Latest version by 2020.07
4. WeIdentity Contract v1.2.21 Latest version by 2020.07
5. WeIdentity JAVA SDK v1.6.4 Latest version by 2020.07
6. WeIdentity Web Tool v1.0.12 Latest version by 2020.07
  • Run below command to install FISCO BCOS and FISCO BCOS Console.
cd ~ && mkdir -p fisco && cd fisco &&
curl -LO && chmod u+x &&
bash -l "" -p 30300,20200,8545 -v 2.5.0 &&
bash nodes/ &&
cd ~/fisco && curl -LO && bash &&
cp -n console/conf/applicationContext-sample.xml console/conf/applicationContext.xml &&
cp nodes/* console/conf/
  • Run below commands one by one to check if FISCO BCOS has been installed successfully.
ps -ef | grep -v grep | grep fisco-bcos
tail -f ~/fisco/nodes/*  | grep connected
tail -f ~/fisco/nodes/*  | grep +++
  • Run below command to install WeIdentity Web Tool.
cd ~ && mkdir -p weid && cd weid &&
sudo apt install git &&
wget -c &&
chmod u+x &&
cd ~/weid && ./ -t en &&
cd weid-build-tools &&

There are two ways to deploy WeIdentity JAVA SDK and WeIdentity Contracts.

  • (Option 1) Use command line to deploy.
  • Update configurations in ~/weid/weid-build-tools/run.config as below.
  • Copy FISO BCOS blockchain key files
cd ~/weid/weid-build-tools &&
cp -f ~/fisco/nodes/ ~/weid/weid-build-tools/resources &&
cp -f ~/fisco/nodes/ ~/weid/weid-build-tools/resources &&
cp -f ~/fisco/nodes/ ~/weid/weid-build-tools/resources
  • Deploy WeIdentity JAVA SDK and WeIdentity Contract.
cd ~/weid/weid-build-tools &&
chmod +x &&
./ &&
chmod +x &&

The output should be similar to below.

contract is deployed with success.
weid contract address is 0x4ba81103afbd5fc203db14322c3a48cd1abb7770
cpt contract address is 0xb1f3f13f772f3fc04b27ad8c377def5bc0c94200
authority issuer contract address is 0xabb97b3042d0f50b87eef3c49ffc8447560faf76
evidence contract address is 0x8cc0de880394cbde18ca17f6ce2cf7af5c51891e
specificIssuer contract address is 0xca5fe4a67da7e25a24d76d24efbf955c475ab9ca
  • (Option 2) Use WeIdentity Web Tool for deployment (in Chinese language).
  • Open URL http://{public ip of the server}:6102/guide.html via browser and follow the guide shown on the web page. (You may copy the values from Option 1)
  • Choose a role “As a Committee Member”(recommended) or “As a non Committee Member”.
  • Setup FISCO BCOS.
  • Define main group id.
  • Setup Mysql (Optional).
  • Click button to generate admin account.
  • Click button to deploy WeIdentity Contracts and WeIdentity JAVA SDK as a Committee Member only.