How to Run a Shield Server
Before installing a shield server, one needs to have NodeJS and Git installed on the system.
The first step is to clone Muon’s repository hosted on Github. This is done through the following git command:
git clone git@github.com:muon-protocol/light-shield-node.gitCopy your Muon app's JS file to the root of the
muon-appsdirectory.Rename the
.env.examplefile to.envand then open it and set the values forSIGN_WALLET_ADDRESSandSIGN_WALLET_PRIVATE_KEYvariables.Install required node modules in the root of the cloned repository by using
npm installFor development, run the shield server by
nodejs server.jsFor production, run the shield server using
pm2 startNB1: It is recommended that projects use more than one Shield Server to prevent the halting of the system as a result of downing the Shield server.
NB2: A security risk that threatens MuonApps is that trusted 3rd party RPCs such as Infura, Ankr or The Graph may be vulnerable to hacks. To address this issue, Shield servers had better not depend on such RPCs for their input. Rather, they ought to run their own Ethereum, sidechains, and graph nodes.
Last updated