Discord Bot Hosting
Mamba Panel includes a complete Discord bot hosting solution that you can offer to your customers. This guide covers how to configure, manage, and support Discord bot hosting within your Mamba Panel deployment.
Overview
Section titled “Overview”Discord bot hosting in Mamba Panel provides:
- Multiple Runtimes: Node.js 18/20 and Python 3.11 support for Discord.js, discord.py, and other frameworks.
- Automatic Provisioning: Containers deploy in under two minutes via Pterodactyl integration.
- Customer Self-Service: Customers manage their bots through the portal with SFTP, file manager, and console access.
- Auto-Restart: Watchdog monitors processes and restarts on crash with configurable policies.
- Resource Management: CPU, RAM, and storage limits enforced per plan tier.
Setting Up Discord Bot Products
Section titled “Setting Up Discord Bot Products”Create Bot Hosting Plans
Section titled “Create Bot Hosting Plans”- Navigate to Products → Discord Bots → Create Plan.
- Configure the plan:
| Setting | Starter Example | Pro Example | Premium Example |
|---|---|---|---|
| RAM | 512 MB | 1 GB | 2 GB |
| CPU | 0.25 vCPU | 0.5 vCPU | 1.0 vCPU |
| Storage | 5 GB | 10 GB | 20 GB |
| Price | $1.99/mo | $5.49/mo | $9.49/mo |
- Select the Pterodactyl egg for Discord bots (Node.js or Python).
- Map to available nodes in your infrastructure.
- Configure features (MySQL add-on, scheduled tasks, etc.).
Plan Recommendations
Section titled “Plan Recommendations”| Plan | Best For |
|---|---|
| Starter | Lightweight moderation bots, webhook relays, slash-command utilities |
| Pro | Music bots, multi-module apps, sharded deployments (up to 2 shards) |
| Premium | AI-powered bots, ML inference, multiple concurrent bots, heavy API usage |
Feature Configuration
Section titled “Feature Configuration”Environment Variables
Section titled “Environment Variables”Customers store sensitive data securely:
- Discord tokens
- API keys (OpenAI, Stripe, etc.)
- Database credentials
- Webhook URLs
Variables are encrypted at rest and injected as process.env (Node.js) or os.getenv() (Python).
Scheduled Tasks
Section titled “Scheduled Tasks”Enable customers to automate:
- Daily/weekly restarts to clear memory
- Dependency updates
- Data exports and backups
- Cron-style script execution
Configure task frequency limits per plan tier in Products → [Plan] → Features.
Database Add-Ons
Section titled “Database Add-Ons”For bots requiring persistent storage:
- SQLite included by default
- MySQL/MariaDB available as add-on (Pro/Premium)
- Configure phpMyAdmin access for customer self-service
Auto-Restart Policies
Section titled “Auto-Restart Policies”Configure watchdog behavior:
- Restart on non-zero exit codes
- Configurable restart delays
- Maximum restart attempts before alerting
- Customer notification options
Customer Experience
Section titled “Customer Experience”What Customers See
Section titled “What Customers See”In their portal, customers can:
- View real-time console output
- Manage files via web interface or SFTP
- Edit environment variables
- Schedule restarts and tasks
- Monitor CPU/RAM usage graphs
- Download logs
- Trigger manual restarts
Onboarding Flow
Section titled “Onboarding Flow”- Customer purchases Discord bot hosting plan.
- Mamba Panel provisions container via Pterodactyl.
- Customer receives SFTP credentials and portal access.
- Customer uploads bot code and configures environment variables.
- Customer starts the bot and monitors via console.
Support Considerations
Section titled “Support Considerations”Common Customer Issues
Section titled “Common Customer Issues”| Issue | Likely Cause | Resolution |
|---|---|---|
| Bot won’t connect | Invalid token, missing intents | Verify token, check Discord Dev Portal intents |
| Out of memory | Insufficient plan resources | Recommend upgrade or code optimization |
| Bot keeps restarting | Code errors, missing dependencies | Review console logs, check package.json/requirements.txt |
| Slow command responses | Heavy processing, rate limits | Implement caching, defer replies |
Documentation for Customers
Section titled “Documentation for Customers”Provide customers with:
- Deployment Guide — Upload, dependencies, environment setup
- Operations Guide — Monitoring, scaling, backups
- Troubleshooting Guide — Common errors and fixes
Monitoring & Analytics
Section titled “Monitoring & Analytics”Admin Dashboard
Section titled “Admin Dashboard”Track across your customer base:
- Total active bot containers
- Resource utilization trends
- Popular plan tiers
- Revenue from Discord bot hosting
Customer Metrics
Section titled “Customer Metrics”Each customer sees:
- Real-time CPU/RAM graphs
- Historical uptime statistics
- Restart history
- Log downloads
Security Best Practices
Section titled “Security Best Practices”Educate customers on:
- Token security: Never commit tokens to Git; use environment variables.
- Dependency scanning: Run
npm auditorpip-auditbefore deploying. - Least privilege: Enable only required Discord intents.
- Regular rotation: Rotate tokens after staff changes or suspected leaks.
Integration with Pterodactyl
Section titled “Integration with Pterodactyl”Discord bot hosting uses Pterodactyl eggs:
- Generic Node.js: For Discord.js, Eris, Oceanic
- Generic Python: For discord.py, Nextcord, Py-cord, Disnake, Hikari
- Custom eggs: Create specialized eggs for specific frameworks
Configure egg mappings in Settings → Integrations → Pterodactyl → Eggs.
Pricing Strategy
Section titled “Pricing Strategy”Consider these factors when pricing:
- Resource costs per container
- Support overhead for bot troubleshooting
- Market rates ($1-10/mo typical range)
- Upsell opportunities (MySQL, premium support)
Mamba Panel’s flat-rate pricing means your margins improve as you scale.