1
2
3
4
5
Step 1 of 5

Create Your Discord Application

You need a Discord Developer Application to get your bot token and OAuth2 credentials. Fill in the fields below as you grab each value.

1

Open Discord Developer Portal

Go to discord.com/developers/applications and click New Application. Give it a name (e.g. NexusBot).

2

Copy your Client ID & Client Secret

In OAuth2 → General, copy both values and paste them here:

Found in OAuth2 → General → Client ID
Found in OAuth2 → General → Client Secret (click Reset)
3

Add a Bot & Copy Token

Go to the Bot tab → click Add Bot. Enable Server Members Intent, Message Content Intent, and Presence Intent. Then copy the token:

Bot tab → Reset Token → Copy
4

Enter your website domain

This is your Namecheap domain where the website will be hosted:

Include https:// — no trailing slash

Add this as a Redirect URI in OAuth2 → General:

https://yourdomain.com/callback.html
5

Optional: Lock to one server (faster slash commands)

Leave blank to register commands globally (takes up to 1 hour) or enter a Guild ID to register instantly to one server:

Right-click your server icon → Copy Server ID (Developer Mode must be on)
Step 2 of 5

Set Up MySQL Database

NexusBot stores all server settings, economy data, levels, and warnings in MySQL. Fill in your database credentials below — they'll be added to your generated config automatically.

Where to create the MySQL database?

The database must be on the same host as the bot (your VPS/Railway/Render), NOT on Namecheap. Your Namecheap hosting is only for the static website files.

Railway.appHas built-in MySQL plugin
PlanetScaleFree MySQL cloud DB
Clever CloudFree MySQL addon
DigitalOceanManaged DB $15/mo
1

Create a database named nexusbot

In your host's control panel or MySQL dashboard, create a new database. Name it nexusbot (or anything you like — just match it below).

2

Enter your MySQL credentials

Fill in all fields — these will be added directly into your generated .env file:

Usually localhost if bot and DB are on the same server
Default MySQL port is 3306
The database you just created
The MySQL user with access to this database
The password for the MySQL user above
3

Tables are created automatically ✅

You don't need to run any SQL. When the bot starts for the first time, it automatically creates all required tables:

guild_config user_economy user_levels giveaways warnings
Step 3 of 5

Configure & Run the Bot

Fill in the remaining settings below — your complete .env file is generated live at the bottom. Just copy and paste it!

Bot needs a Node.js host — NOT Namecheap

Namecheap shared hosting cannot run Node.js bots. Use one of these — including your own Pterodactyl panel:

1

Bot API & Dashboard Settings

The bot runs a small REST API so the dashboard can talk to it. Enter the port and a secret key:

Port the bot's API listens on (default: 3001)
A random secret used to secure the API
2

Bot Host URL

This is the public address the website uses to reach your bot's API. Enter your server's IP and the port you allocated in Pterodactyl:

Using Pterodactyl Panel?
  1. Go to your Pterodactyl panel → click your bot server
  2. Click the Network tab on the left
  3. You'll see your server's IP address and one or more allocated ports
  4. Pick any free port (e.g. 3001) — if it's not listed, ask your panel admin to allocate it
  5. Use that IP + port below — e.g. http://123.45.67.89:3001
  6. Also set API_PORT above to match that same port number
Found in Pterodactyl → your server → Network tab
The allocated port in Pterodactyl for the bot API
This is what the website will use to contact your bot — include http:// and port, no trailing slash
3

Your generated .env file

This is auto-generated from everything you've entered. Once complete, copy this and save it as .env inside your bot/ folder:

Fill in the fields above to generate your .env file
# ── Discord ────────────────────────────────
DISCORD_TOKEN=
CLIENT_ID=
GUILD_ID=

# ── Database ───────────────────────────────
DB_HOST=localhost
DB_PORT=3306
DB_NAME=nexusbot
DB_USER=
DB_PASS=

# ── API ────────────────────────────────────
API_PORT=3001
API_SECRET=

# ── Dashboard ──────────────────────────────
DISCORD_CLIENT_SECRET=
DASHBOARD_URL=
4

Build & Upload to Pterodactyl

Pterodactyl auto-starts the bot — you can't run commands manually

That's fine! You just need to compile TypeScript on your computer first, then upload the compiled files. Pterodactyl will call node dist/index.js automatically.

Step A — On your computer (VS Code terminal):

Open the bot/ folder in VS Code, open the terminal (Ctrl+`) and run:

npm install
npm run build

This creates a dist/ folder with compiled JavaScript files.

Step B — Upload these files to Pterodactyl (via SFTP or panel file manager):

(your Pterodactyl bot folder)
dist/ ✅ upload this
index.js
commands/ ...
events/ ...
package.json ✅ upload this
.env ✅ create & upload
start.js ✅ upload this
node_modules/ ❌ do NOT upload
src/ ❌ not needed

Step C — Also upload start.js (it's in the bot/ folder). This is a helper file that auto-installs dependencies and starts the bot for you.

Step D — In Pterodactyl, set the startup command to:

node start.js

👆 start.js will automatically run npm install if needed, check that dist/ exists, then launch the bot. Check the console for "✅ NexusBot is online".

If Pterodactyl forces node index.js

Some panels lock the startup command. In that case, upload start.js and rename it to index.js — it will behave the same way and auto-launch the bot from dist/.

Step 4 of 5

Upload Website to Namecheap

The website is 100% static HTML/CSS/JS — no Node.js needed. Upload it through cPanel or FTP and your site is live instantly.

1

Edit website/js/config.js first

This file tells the website where your bot API is and your Discord credentials. Based on what you entered, here's your generated config — copy it into config.js:

// ⚠️ Fill in steps 1–3 first to auto-generate this
window.NEXUS_CONFIG = {
  API_URL: '',
  CLIENT_ID: '',
  REDIRECT_URI: '',
  BOT_INVITE: ''
};
2

Option A – cPanel File Manager (easiest)

  1. Log in to Namecheap → cPanel
  2. Open File Manager
  3. Navigate to public_html/
  4. Click Upload → upload a .zip of the website/ folder contents
  5. Right-click the zip → Extract
  6. Make sure files are directly inside public_html/, not in a subfolder
3

Option B – FTP with FileZilla

  1. Download FileZilla (free FTP client)
  2. In Namecheap cPanel → FTP Accounts → copy your FTP credentials
  3. In FileZilla: enter Host, Username, Password, Port 21 → Quickconnect
  4. On the right panel, navigate to public_html/
  5. On the left panel, find your website/ folder
  6. Select all files inside website/ and drag them to the right panel
4

Enable Free HTTPS (required for Discord OAuth2)

Discord OAuth2 only works over HTTPS. Enable it for free in Namecheap cPanel:

  1. In cPanel → scroll to Security section
  2. Click SSL/TLS Status
  3. Click Run AutoSSL — it installs a free Let's Encrypt certificate
  4. Wait 2–5 minutes, then visit https://yourdomain.com
5

Verify your file structure in public_html/

After uploading, your public_html/ should look exactly like this:

public_html/
index.html
login.html
callback.html
dashboard.html
install.html
css/
style.css
dashboard.css
install.css
js/
config.js Edit this!
main.js
auth.js
callback.js
dashboard.js
install.js
Step 5 of 5

You're Ready to Go Live! 🚀

Tick off every item below before you launch. All items must be checked for NexusBot to work correctly.

All done!

Visit your website, click Login with Discord, select your server, and start managing NexusBot from the dashboard!