Drako Development
  • 🤖Our Bots
    • Drako Bot
      • Getting Started
      • Addon System
      • Twitch Announcements
      • Ticket System
        • Getting Started
        • Dashboard
          • Dashboard Addons
          • Nginx Configuration
        • Priority System
        • Working Hours
      • Reaction Roles
      • Music
      • Custom Commands
  • 👾Misc
    • MongoDB Setup
    • Premium Addons
      • Product Panel
      • Sticky Messages
      • Application System
  • 📰Terms and Conditions
    • Terms and Conditions
    • Privacy Policy
Powered by GitBook
On this page
  • Prerequisites
  • 1. Create A Records
  • 2. Install NVM and Node.js 18.20.7
  • 3. Install Nginx
  • 4. Create Nginx Configuration
  • 5. Enable the Site and Restart Nginx
  • 6. Install SSL Certificate
  • 7. Edit the Bot Configuration
  • 8. Run the Dashboard
  1. Our Bots
  2. Drako Bot
  3. Ticket System
  4. Dashboard

Nginx Configuration

Want to use a domain on your dashboard? Here's the guide :)

PreviousDashboard AddonsNextPriority System

Last updated 2 months ago

Prerequisites

sudo mkdir -p /var/www
cd /var/www
git clone https://github.com/YouSeeMeRunning2/DrakoBot.git # You won't be able to use my repository
sudo mv /var/www/DrakoBot /var/www/drakobot # Ensure the folder is named drakobot

Hint: Run ls to verify the folder name before renaming. Important: You won't be able to use my git repository, it's just an example. Your folder may not be called DrakoBot to start with, update sudo mv to fit your needs.


1. Create A Records

Create the following DNS A records:

  • Host: dashboard

  • Value: <Server IP>


2. Install NVM and Node.js 18.20.7

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
\. "$HOME/.nvm/nvm.sh"
nvm install 18
node -v

Hint: Verify the installation by running node -v. It should output v18.x.x.


3. Install Nginx

sudo apt update
sudo apt install -y nginx

4. Create Nginx Configuration

Edit the Nginx configuration file:

sudo nano /etc/nginx/sites-available/dashboard.youseemerunning.com

Important: Ensure that your own domain, replace youseemerunning.com

Add the following configuration:

server {
    listen 80;
    server_name dashboard.youseemerunning.com;

    location / {
        root /var/www/drakobot/dashboard/dist;
        index index.html;
        try_files $uri $uri/ /index.html;
    }

    location /api {
        proxy_pass http://localhost:3001;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Content-Type-Options "nosniff";
    add_header Referrer-Policy "strict-origin-when-cross-origin";
}

Hint: Press CTRL + X, then Y, then Enter to save the file.

Important: Ensure that your own domain, replace youseemerunning.com


5. Enable the Site and Restart Nginx

sudo ln -s /etc/nginx/sites-available/dashboard.youseemerunning.com /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx

Hint: Run sudo nginx -t to test the configuration before restarting.

Important: Ensure that your own domain, replace youseemerunning.com


6. Install SSL Certificate

sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d dashboard.youseemerunning.com

Hint: Follow the prompts to complete the SSL setup.

Important: Ensure that your own domain, replace youseemerunning.com


7. Edit the Bot Configuration

Run the following commands

cd /var/www/drakobot
sudo nano config.yml

Update the bot settings with the following values:

  • URL: https://dashboard.youseemerunning.com

  • Redirect: https://dashboard.youseemerunning.com/api/auth/callback

Important: Ensure that your own domain, replace youseemerunning.com


8. Run the Dashboard

cd /var/www/drakobot
npm install
npm run start

Hint: Ensure all dependencies are installed before running npm run start.


Your Drako Bot dashboard should now be up and running!

🤖
Video example of the below guide