Skip to content

Installation on a Linux server

Darren edited this page Sep 26, 2021 · 9 revisions

Prerequisites

Create a Discord Application

  • go to the Discord Developer portal
  • create a new application + bot
  • create a bot invitelink using it's client id here
  • save the bot token for later

get a Spotify Client ID + Secret

  • login here and create an application

Install nodejs + npm

follow those instructions

Installation

Configuration

  • run git clone https://github.com/SudhanPlayz/Discord-MusicBot.git
  • go into the folder with cd Discord-MusicBot
  • edit the botconfig.js with the tokens from earlier

lavalink

use

host: "lava.link",
port: 80,
pass: "youshallnotpass"

or host your own

Final steps

  • run npm install
  • start the bot with node index.js

Dashboard setup.

You can do this in 2 ways, with a custom domain or with your vps/server ip.

Dashboard with custom domain

With Nginx

Create a new file in /etc/nginx/sites-available

you can use whatever your favorite text editor, but I'll be using vim cause I'm used to it Do vi /etc/nginx/sites-available/musicbot.conf Then enter this example config

server
{
    listen 80;
    listen [::]:80;
    server_name yourdomain.cynathans.com;
    location / {
          proxy_pass http://127.0.0.1:3000;
    }

        access_log /var/log/nginx/reverse-access.log;
        error_log /var/log/nginx/reverse-error.log;
}

Replace yourdomain.cynathans.com with your domain

[not done] With Apache

Dashboard with IP

  • open port 80, Then edit the botconfig.js and change the Port on line 5, change it to 80, Website line 18 to http://yourip.yes.number.only

BangExample

  • Go to the Discord Developer Portal under the OAuth2 tab. Then put your server ip in this format http://yourip.yes.number.only/api/callback

Exampletm

Clone this wiki locally