Techcoderx and myself both work to operate and maintain an IPFS/discord bot. In this guide I'd like to go over the basics of setting up the bot on a server or home computer. I've ran the bot on devices as small as an Android phone with specs as low as 2gb ram. Minimum requirements are dual core and 2GB of ram.
![ipfsdiscord.png](https://steemitimages.com/640x0/https://cdn.steemitimages.com/DQmNo5RctGKq4E1ivSaEERURwsUrPa3jFdGrd6DhyQwYrb5/ipfsdiscord.png)
Install the bot
1.Clone into the repo
2.Change into the application's directory
cd DTube-IPFS-Bot && npm install
3.Edit the auth.json file and add the discord token , you can find out how to create a discord application here. The action to find your token is shown at 0:33.
nano auth.json
4.Edit the config file to the specifications you need.
nano config.json
5.Install required libraries, nodejs, ipfs, and pm2.
sudo apt install nodejs
sudo apt install npm
sudo apt install build-essential
sudo npm install pm2@latest -g
sudo snap install ipfs
ipfs init
6.Modify the config file to use a higher port.
cd /home/username/snap/ipfs/699/.ipfs/
or
cd /home/username/.ipfs
then
nano config
Now find
"/ip4/0.0.0.0/tcp/4001",
"/ip6/::/tcp/4001"
And replace with (change port to a number you like in the high range)
"/ip4/0.0.0.0/tcp/51888",
"/ip6/::/tcp/51888"
How to start the bot
pm2 start bot.js
pm2 start "ipfs daemon --enable-gc"
If pinning large videos crashes the bot, start the bot with this instead
pm2 start bot.js --node-args="--max_old_space_size=15000"
How to stop the bot
pm2 stop bot.js
pm2 stop "ipfs daemon --enable-gc"
If you are stuck looking for the client ID, you can find it on the discord website's developer panel.
Don't forget
npm install
as I've removednode_modules
from the repocd DTube-IPFS-Bot && npm install
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Ahh, My text file had that removed. Good catch! Thank you tech
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Final step- set desk on fire, flip over desk
SUCCESS!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
What if you don't have physical access to the server that is rack-mounted in a data center? There's no desk involved! 😂
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
That’s what the staples or office Max is for, walk in sit down.![60854619-26C7-4FB0-AC7A-646C36A1A57B.jpeg](https://steemitimages.com/640x0/https://cdn.steemitimages.com/DQmS7pCBAwfnR3MqvDJQuPLjvuN2c88VP4TGynAB1Ng7mER/60854619-26C7-4FB0-AC7A-646C36A1A57B.jpeg)
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
thanks for the tutorial. i'm doing something similar.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit