How to Install the OneLove DiscordIPFS Bot on Ubuntu 16.04

in #ipfs6 years ago (edited)

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

Install the bot

1.Clone into the repo

git clone https://github.com/techcoderx/DTube-IPFS-Bot.git

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.

Sort:  

Don't forget npm install as I've removed node_modules from the repo

cd DTube-IPFS-Bot && npm install

Ahh, My text file had that removed. Good catch! Thank you tech

Final step- set desk on fire, flip over desk
SUCCESS!

What if you don't have physical access to the server that is rack-mounted in a data center? There's no desk involved! 😂

That’s what the staples or office Max is for, walk in sit down.60854619-26C7-4FB0-AC7A-646C36A1A57B.jpeg

thanks for the tutorial. i'm doing something similar.

Coin Marketplace

STEEM 0.17
TRX 0.16
JST 0.029
BTC 74967.91
ETH 2823.87
USDT 1.00
SBD 2.51