Skip to content

Latest commit

 

History

History
59 lines (42 loc) · 1.7 KB

hosting.md

File metadata and controls

59 lines (42 loc) · 1.7 KB

☁️ Hosting OctoCat

We will be going over on how to host the bot by yourself on a VPS (Virtual Private Server).

Prerequisites

Note: I will not be going over the basics such as creating a server, logging in via ssh and the other basics. Feel free to research that on your own time!

  1. Familiarize yourself with Linux since this tutorial will be for Ubuntu 20.4
  2. Choose a good hosting provider. You can look up some for yourself but for this, I will be recommending Digital Ocean. You can use my referral code here to earn $100 for free for 60 days
    • The $5/mo plan would be plenty for OctoCat version 1.0.0
  3. Have SSH setup on the VPS for maximum protection and not use root user. Please check out this article if you're unsure how to create new users.

Update Repositories List

sudo apt update

Installing Node.js v12

curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -

sudo apt install nodejs

node --version

Run the last command to see if the latest update of Node.js version 12 is installed properly.

Getting OctoCat Code

Here, I will be downloading OctoCat to the /bin folder, but feel free to do it anywhere you like.

cd /bin

git clone https://github.com/tommyshelby9121/octocat.git

Installing Project Dependencies

cd octocat

npm install

# Start bot
npm start

# Turn bot off
ctrl+C

Setup PM2 process manager

sudo npm i pm2 -g

pm2 start src/index

# To make sure bot comes online when reboot
pm2 startup ubuntu

Having issues? Join the support discord!