Dont do this if your already in sudo or else the script may have errors
sudo su -
apt update -y && curl -fsSL https://deb.nodesource.com/setup_17.x | sudo -E bash - && apt install -y nodejs
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get update
sudo apt-get install redis
redis-cli ping
set <>
get <>
mkdir bot
git clone https://github.com/yourname/yourrepo bot
Depending on how you make your bot, you may or maynot have a config file for it. Make sure to fill this out using nano
or vim
or something else then compile your bot (if ts).
npm i -g pm2
make sure your in the backend folder.
npm run build && pm2 start ./out/registry.js --name "bot"
remember you can change the 0
with your pm2 process id
lists all commands
pm2 list
shows the logs for our node process [0]
pm2 logs 0
restarts the node process
pm2 restart 0
stops the node process
pm2 stop 0
delete a file
rm <file-name>
By default, rm only deletes files, so you need to tell it to delete a directory using -d, like this:
rm -d <folder>
Delete a folder with sub folders
rm -dr <dir>
You may see this error:
It means your missing some c++ build tools on your os. Install them using this command:
sudo apt-get install build-essential libcairo2-dev libpango1.0-dev