#
Dashboard Setup Guide
The Razor Web Dashboard is a powerful plugin that provides a stunning, full-stack graphical interface to manage your bot and Discord server. Follow these precise steps to properly install and configure it with your source code.
#
1. 📦 Extracting the Dashboard Files
When you purchased the dashboard add-on (or if it came in a separate bundle), you likely received a .zip file (for example, Razor Bot Dashboard Nebula v2.zip).
- Locate the ZIP file containing the dashboard.
- Extract/Unzip the contents of the archive. Inside, you will find a folder named
Dashboard. - Copy the entire
Dashboardfolder.
#
2. 📂 Merging with the Source Code
You must insert the Dashboard folder directly into your main bot environment.
- Open the folder where your Razor Source Code is located (the folder containing
index.js,package.json, andconfig.js). - Paste the
Dashboardfolder directly into this root directory.
Your directory structure should now look exactly like this:
Razor Source Code/
├── Commands/
├── Dashboard/ <-- Paste it exactly here!
├── Events/
├── config.js
├── index.js
└── package.json
#
3. ⚙️ Configuring config.js
Now that the files are in place, you must tell the bot how to run the web server.
Open your config.js file and locate the Dashboard Configuration section. Update the variables as shown below:
// Dashboard Configuration //
dashboard: {
enabled: true, // Set this to true to turn on the dashboard
port: 5500, // The port the web server will run on (default is 5500)
domain: "http://localhost:5500", // The public URL of your dashboard
sessionSecret: "razor-super-secret-key-change-this", // Change this to a random secure string!
},
Tip
Hosting on a VPS? Change the domain to your server's public IP address (e.g., http://192.168.1.100:5500) or your attached domain name (e.g., https://dashboard.yourdomain.com).
#
4. 🔑 Setting Up the Discord OAuth2 Callback
To allow users to log in to your dashboard securely via Discord, you absolutely must whitelist your callback URL in the Discord Developer Portal.
- Select your Razor Bot application.
- On the left sidebar, click OAuth2 -> General.
- Scroll down to the Redirects section.
- Click Add Redirect and enter your domain followed by
/auth/callback.- Example (Local):
http://localhost:5500/auth/callback - Example (Live Domain):
https://dashboard.yourdomain.com/auth/callback
- Example (Local):
- Click Save Changes.
#
5. 🚀 Launch the Dashboard
You're done! Now, simply run the bot as usual in your terminal:
npm start
Watch your console logs. You should see a success message indicating that the Razor Dashboard is locked, loaded, and running successfully on your specified port!