Using Systemd
Install Requirements
In addition to using the Docker image, there are ways to run nodes with the Linux system daemon as a Systemd service. The service will work on most Linux operating systems. However, Debian/Ubuntu is the only environment in which all tests have been completed, and the manual has been written based on this environment.
First, create a service account to run the node service.
adduser BIFROST_SERVICE --system --no-create-homeNext, create a local directory to store the chain data of the Bifrost Network. This directory contains the node binary and block information collected from the genesis block to the present.
# Add sudo at the beginning if it doesn't work (i.e. Permission Denied)
mkdir -p /var/lib/bifrost-dataThen, download the latest node execution binary and chain specification JSON file from our Github releases. You can check the latest releases by going to our GitHub repository under the releases page.
wget "https://github.com/bifrost-platform/bifrost-node/releases/latest/download/bifrost-node"
wget "https://github.com/bifrost-platform/bifrost-node/releases/latest/download/bifrost-testnet.json"wget "https://github.com/bifrost-platform/bifrost-node/releases/latest/download/bifrost-node"
wget "https://github.com/bifrost-platform/bifrost-node/releases/latest/download/bifrost-mainnet.json"At last, grant an execution permission to the node binary and move it to your chain data directory.
chmod +x bifrost-node
mv bifrost-node bifrost-testnet.json /var/lib/bifrost-datachmod +x bifrost-node
mv bifrost-node bifrost-mainnet.json /var/lib/bifrost-dataGenerate Peer Key
Every node running on the Bifrost Network requires a peer key to connect to the P2P network. To generate a new peer key and insert it into your chain data automatically, simply run the following command.
Run the Node Service
First, set ownership permission to your chain data directory to the service account.
Next, you need to create a Systemd configuration file. In the example below, change YOUR_NODE_NAME to the desired name of your node service, and save the file in the following directory.
Conversely, to run an endpoint node with non-archive mode enabled, it is necessary to determine the maximum number of past blocks to be indexed, and the number of blocks may be specified after the --state-pruning option.
Now, with the two lines of the command below, the node service will run in the background.
Check Logs
To check your running bifrost-node service logs, execute the command below.
If the node service has successfully been executed, the chain information will be shown as the following.
Since chain data needs to be synced starting from the genesis block, the information that it is currently syncing will be shown as the following output. You can proceed to the next steps only when the sync is complete, and it may take up to several days at most.
When the chain data is completely synchronized, newly generated blocks will start to synchronize one by one at every block time as follows.
Update Node Client
As Bifrost Network development continues, it will sometimes be necessary to upgrade your node client. Node operators will be notified on our Discord channel or by personal contacts when upgrades are available and whether they are necessary (some client upgrades are optional).
Before upgrading your node client, please keep a backup file of your chain data to prevent any further data, keys, or credential losses.
Last updated