Skip to content

Installation guide

Mstiekema edited this page Feb 11, 2017 · 28 revisions

How to install Yucibot

Step 1: Make a folder for the bot

You can make it wherever you want it to be, just don't lose track of it.

Step 2: Fetch the repository

You can download it from the main repo page, or you can use the command line if you are on a VPS. Just make sure you put all the files into your project directory

git clone https://github.com/Mstiekema/Yucibot.git .

Step 3: Install node.js

Go to Node.js website and follow the installation process. After you finish installing, open up your cmd, go to your project folder and type the following code to install all the npm packages.

npm install

Step 4: Install mysql

Linux:

sudo apt-get install mysql-server
mysql -u root -p
CREATE DATABASE yucibot CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
exit

Windows:

Go to the Mysql installation page and download the installer. Go through the installation process and install the mysql-server. If this doesn't work I recommend you to install XAMPP

mysql -u root -p
CREATE DATABASE yucibot CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
exit

Step 5: Installation

Open the example.config.js file and fill in your data. Don't forget to change the file name to config.js. After this you should run the installation file

node install.js

Step 6: Run the bot

Start the bot and website by typing

node app.js

Step 6.5: Install PM2

You can run the app with node app.js if you wanted to, but I've made the bot so it kills the process at certain errors. I've also implemented ways to quit the bot and it's always nice if it restarts after shutting down. That's why I highly recommend installing PM2.

npm install pm2 -g
pm2 start app.js --name="Yucibot"
pm2 monit