How to deploy a Digibyte node with your 3bot in 5 Steps?

image

Dear Friends,

This post is intended for friends at DigiByte :slightly_smiling_face:. Both ThreeFold and DigiByte share common values and there is an enormous potential that can be exploited together, especially when it comes to leveraging ThreeFold’s peer to peer cloud network .

We will quickly demonstrate how to setup a DigiByte node on the ThreeFold Grid . The purpose here is to get people started. The configuration can be tweaked to perfection with other experts in the community.

What we will do ?

  1. Setup your 3bot and install the 3sdk
  2. Log in and create your Network
  3. Get your wallet loaded :slightly_smiling_face: , don’t worry, we have FreeTFTs
  4. Deploy your DigiByte container
  5. Access your DigiByte container
  6. Verify your DigiByte deployment

Before you start, we have 2 networks publicly available

  1. Mainnet @ https://explorer.grid.tf
  2. Testnet @ https://explorer.testnet.grid.tf

Our Recommendation : *Start deploying on testnet as ThreeFold gives free nodes to deploy and play around with. Mainnet is production and paid for. Therefore, from settings in the 3sdk menu, switch to TESTNET *

Step 1 - Setup the 3sdk

The 3sdk is a tool that allows you to setup your 3bot and give you access to the ThreeFold Grid for your deployments (containers, virtual machines, S3 storage and so on). The wiki provides detailed instructions on how to set up the 3sdk .

If this part is done, rest should be extremely easy as management is done via web interface.

To access the 3sdk admin interface, in your browser use the following link,

http://YOUR_IP_HERE:7000 or https://YOUR_IP_HERE:4000

7000 is the http port and 4000 is the https port

If you installed locally on your machine, you can use http://localhost:7000

Step 2 - Log in and Create your Network for Deployment

From the previous step, http://YOUR_IP_HERE:7000

Log in here with your 3bot. Make sure you open the 3bot connect app first!

Once you log in, Go to Solutions and then go to Network . The interface is user-friendly and it should be easy. Few things to note,

  • Use IPv4 network unless you are sure you have IPv6. You can test IPv6 connectivity here
  • It is better to have the chat bot configure the network for you unless you have specific requirements
  • Ideally start with FreeTFT as your network currency

Note : The wizard will ask you to download your Wireguard configuration. This is important as you won’t be able to access your network without it. This serves as an entry point to your private network.

Step 3 : Get your wallet loaded - Get some FreeTFTs :slightly_smiling_face:

First things first, create a wallet from the Wallet Manager. It is pretty easy actually,

The next step is to get your wallet funded, there are 2 ways,

To get FreeTFTs for testnet, use this link => https://getfreetft.testnet.threefold.io

Login with your 3botID which you created in the 1st step and provide the wallet address. You get 1000 FreeTFTs per wallet. This should be adequate ! The stellar address is the simply the wallet address. Our transaction layer is on stellar.

To get FreeTFTs for Mainnet, use this request form => https://www.getfreetft.threefold.io

Step 4 - Create your DigiByte container - It’s showtime

Under Solutions, go to Generic flists, the wizard will guide you accordingly.

  1. Select the network name which you created. Your container is going to be deployed in this network.
  2. Enter the container name, size in terms of CPU and memory. Ideally start with 2 CPUs and 2048 MB memory.
  3. The flist link you have to use is => https://hub.grid.tf/arehman/v2-dgb-1-1.flist
  4. Would you like access to your container through the web browser (coreX)? Select NO
  5. The container entry_point should be set to /start_dgb.sh
  6. Under environment variables, use pub_key=your_public_key_here. This would allow to SSH into the container once it is deployed.
  7. Set the IP address from the drop down list.

flists are like docker images used for containerizing applications. You can convert your docker images to flists here

Note : Container mount points for persistent storage are not available at the time of this writing. They would be available soon in the chat flow. The rootfs <= 250 MB, anything over should be mounted with a persistent volume/disk

If all goes well, this is how it should look like in the end. The main part is done !

Step 5 - Access your Digibyte Container

To access the container,

For Linux, wg-quick up path_to_wireguard_conf_file. For example, wg-quick up /my-wg/net-1.conf

For windows, Import the downloaded wireguard configuration from Step 1,

Once the wireguard tunnel is up, you can test connectivity by doing a ping test for your container IP address. Access the container with ssh using your private key.

ssh -i path_to_your_privatekey root@container_ip_address, For example ssh -i /opt/mykey root@172.20.10.5

The public key should be provisioned during the container deployment.

Step 6 - Verify your Deployment

From the left side navigation panel, go to Deployed Solutions. You should see the name of your container

Inside the container, do a ps aux, you should see the digibyte daemon running,

The digibyte container will start syncing with the network. By default, digibyte configuration runs under the home directory of the user. In our case, it was root, so

root@zosv2tst-1:~# cd /root/.digibyte/
root@zosv2tst-1:~/.digibyte# ls
banlist.dat  blocks  chainstate  debug.log  digibyted.pid  fee_estimates.dat  mempool.dat  peers.dat  wallets

That should be it :slightly_smiling_face: ! You can configure digibyte and add persistent storage to the container as per your requirements. Custom configuration for Digibyte can be done here

Digibyte binaries could be found in the /opt/digibyte directory of the container

Sources for Digibyte

https://github.com/digibyte/digibyte/tree/master/doc
https://medium.com/@muakyurt/how-to-run-a-digibyte-core-wallet-full-node-in-15-minutes-fdbf7ff00ca4

image

9 Likes

Awesome! Thanks for sharing Abdul!

1 Like