I have never posted on Steem. I have been in the community for quite awhile, peering from the shadows. Finally I have decided to start an IPFS node to support content on DTube. This guide will show you how to install IPFS alongside @techcoderx's Discord bot. This bot enables user backups of DTube videos, as well as backing up Dsound. It will also explain to you how to forward ports in a VM. Pre-requisite, How to use NANO and How to navigate in the Linux terminal
We deployed this on the Lubuntu 18.04 Linux Distribution.
Create a user name
Sudo the user.
usermod -aG username
Step Two: Install Node
curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -
sudo apt-get install nodejs
Step Three: Install Git, Clone Github Repo
git clone https://github.com/techcoderx/DTube-IPFS-Bot.git
Step Four: Install the Discord Bot
Step Five: Install IPFS
tar xvfz go-ipfs_v0.4.19_linux-amd64.tar.gz
Step Six: Configure IPFS
Edit your config file with
Disable mDNS discovery
ipfs config --json Discovery.MDNS.Enabled false
Filter out local network addresses
ipfs config --json Swarm.AddrFilters '[
Step Seven: Edit Your Configuration File
Write down your port, and forward your local router or firewalls (if needed) for proper connection on said port. I suggest using high ports. 45,000+. Say your .ipfs folder is in your home directory you can bring up and edit your configuration file with a program called nano. See the commands below.
Here is a screenshot of it in my configuration file for reference.
You may want to adjust high water and low water to suit your computers performance.
An example for lower end computers, put high water at 65 and the low water at 25.
For you reference the port configuration is under swarm.
Step Eight Create/Configure/Find Discord Bot Token
Choose a good name for your bot.
Here you will see your client ID, this is very important. Make sure to copy it and save it for the time being. Take the client ID and create your invite link.
Next you will want to add your bot.
Here you will see how to get your bot token. You will need this to make your invite link.
Enter the token you got from the discord developers section into the "auth.json" file in the DTube-IPFS-Bot directory
Step Nine: Configure the settings for the discord bot in config.json
Step Ten: Invite the bot to the discord you would like (by creating an invite link)
Right after client_id=, the zeroes represent where you need to put your client id. Which you can find in the discord developers section. This is how you make your invite link.
Step Eleven: Install pm2 software
sudo npm install pm2@latest -g
Step Tweleve:Node Start
This command starts your nodejs bot
pm2 start bot.js
This command starts your IPFS daemon
pm2 start "ipfs daemon --enable-gc"
Step Thirteen: Test to see if your bot is responding with a !ping command.
If successful, then test to see if the bot pins DTube/Dsound content.
Step Fourteen:Portr Forward in VM
This website was very helpful in helping me forward my Virtual machine port.
With the port you have selected, go into you router settings. If you do not know how to, you should have documentation on how to, or call you ISP. Input the IP address you obtained from your VM for the port forwarding IP.
A video explaining how to port forward.
To forward your port in your Virtual Machine, first you need to click on your connection.
As it states in the picture you only need the IP address and the port you have chosen to forward.
In the picture, where it says guest IP, input the IP from your VM. For host leave blank. The host port and guest port will be the port you have chosen to forward.
Congratulations, you have successfully set up an IPFS node in a vm!!
Without @gray00's help none of this would have been possible.