Skip to content
Tomato6966 edited this page Nov 8, 2022 · 7 revisions

Preparation Information

Software you need:

In this guide you will see how to do all of that!

Installation Guide for Deezcord

This Guide is for debian and ubuntu based linux machines.

0. Install Essentials

apt-get -y install sudo
apt-get -y install git-all curl jq file unzip make gcc g++ python python-dev libtool build-essential wget zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev libbz2-dev htop nano

# Needed for pupetteer on linux
apt-get install ca-certificates fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils
cd /home
mkdir DeezCordProject
cd DeezCordProject
git clone https://github.com/Tomato6966/deezcord-music-bot

2. Install Nodejs v16

apt update -y
apt upgrade -y
apt install -y build-essential curl
curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
apt-get install -y nodejs

3. Install Java 18

wget https://download.java.net/openjdk/jdk18/ri/openjdk-18+36_linux-x64_bin.tar.gz
sudo mkdir -p /usr/lib/jvm
sudo tar zxvf openjdk-18+36_linux-x64_bin.tar.gz -C /usr/lib/jvm
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk-18/bin/java" 1
sudo update-alternatives --set java /usr/lib/jvm/jdk-18/bin/java
java -version

4. Install Lavalink

cd /home/DeezCordProject
mkdir Lavalink
cd Lavalink
wget https://github.com/freyacodes/Lavalink/releases/download/3.6.2/Lavalink.jar
wget https://raw.githubusercontent.com/Tomato6966/deezcord-music-bot/LavalinkServer/application.yml

5. Install Database

Original Resource: https://docs.citusdata.com/en/v11.1/installation/single_node_debian.html

# Add Citus repository for package manager
curl https://install.citusdata.com/community/deb.sh | sudo bash

# install the server and initialize db
sudo apt-get -y install postgresql-15-citus-11.1


# this user has access to sockets in /var/run/postgresql
sudo su - postgres

# include path to postgres binaries
export PATH=$PATH:/usr/lib/postgresql/15/bin

cd ~
mkdir citus
initdb -D citus


echo "shared_preload_libraries = 'citus'" >> citus/postgresql.conf


pg_ctl -D citus -o "-p 9700" -l citus_logfile start


psql -p 9700 -c "CREATE EXTENSION citus;"


psql -p 9700 -c "select citus_version();"

Now create a User and Password:

# connect to postgresql
psql -p 9700

CREATE USER deezcord PASSWORD 'deezcord';

ALTER ROLE deezcord SUPERUSER CREATEDB;

Press ctrl + a + d twice to go back to ur root user

The Connection URL is: postgres://<username>:<password>@<hostname>:<port>/<databasename> so it will be if you followed the example: postgres://deezcord:[email protected]:9700/deezcordDb

6. Install Process Manager

npm i -g pm2

7. Start Lavalink Server

cd /home/DeezCordProject/Lavalink
pm2 start --name Lavalink --max-memory-restart 3G java -- -jar Lavalink.jar

8. Install Bot Modules

cd /home/DeezCordProject/deezcord-music-bot
npm install

9. Adjust Bot:

Rename example.env to .env and then fill in everything inside of .env

10. Start the Bot:

pm2 start .

11. Manage Bot and Lavalink

pm2 ls
pm2 <start/restart/stop/delete/flush/log> [ID]