Introduction
NexusHost provides free 24/7 Discord bot hosting with GitHub integration. Deploy your bot in seconds with support for Python, Node.js, Java, and more.
24/7 Uptime
Your bot stays online around the clock
GitHub Deploy
Push to deploy automatically
1 Free Server
Every user gets a free server
Getting Started
Get your Discord bot online in under 5 minutes. Follow these simple steps.
1. Create an Account
Sign up for free at NexusHost. Every account includes one free server with 0.5GB RAM.
2. Create a Server
From your dashboard, click "Create Server" and choose your programming language:
- Python (discord.py, Pycord, hikari)
- Node.js (discord.js, Eris)
- Java (JDA)
- Go (discordgo)
3. Connect GitHub
Link your GitHub repository containing your bot code. We'll automatically detect your language and dependencies.
4. Add Environment Variables
Add your Discord bot token and any other secrets in the Settings tab:
DISCORD_TOKEN=your_bot_token_here
PREFIX=!
DATABASE_URL=optional_database_url5. Start Your Bot
Click the Start button in the Console tab. Your bot will install dependencies and come online!
Project Structure
Your bot project should follow these conventions for automatic detection.
Python (discord.py)
my-bot/
├── main.py # Entry point (or bot.py)
├── requirements.txt # Dependencies
├── cogs/ # Optional: command modules
│ └── music.py
└── .env # Local development onlyNode.js (discord.js)
my-bot/
├── index.js # Entry point
├── package.json # Dependencies
├── commands/ # Optional: slash commands
│ └── ping.js
└── events/ # Optional: event handlers
└── ready.jsGitHub Integration
Connect your GitHub repository for automatic deployments on every push.
Connecting Your Repository
- Go to Settings > GitHub in your server management panel
- Click "Connect GitHub Account"
- Authorize NexusHost to access your repositories
- Select the repository containing your bot
- Choose the branch to deploy (default: main)
Auto-Deploy
Once connected, every push to your selected branch triggers an automatic redeploy:
git add .
git commit -m "Update commands"
git push origin main
# Bot automatically restarts with new code!Environment Variables
Store sensitive data like bot tokens securely using environment variables.
Security Warning: Never commit your bot token to GitHub. Always use environment variables.
Adding Variables
Add environment variables in Settings > Environment Variables:
# Required
DISCORD_TOKEN=MTIzNDU2Nzg5...
# Optional examples
PREFIX=!
MONGODB_URI=mongodb+srv://...
OPENAI_API_KEY=sk-...Accessing in Code
# Python
import os
token = os.environ.get('DISCORD_TOKEN')
# or using python-dotenv for local dev
from dotenv import load_dotenv
load_dotenv()
token = os.getenv('DISCORD_TOKEN')// Node.js const token = process.env.DISCORD_TOKEN; // or using dotenv for local dev require('dotenv').config(); const token = process.env.DISCORD_TOKEN;
Console Commands
Use the console to interact with your server and debug issues.
Server Controls
- Start - Install dependencies and start your bot
- Restart - Restart without reinstalling dependencies
- Stop - Gracefully stop your bot
- Kill - Force stop (use if bot is unresponsive)
Console Input
Type commands directly in the console input to run them on your server:
# Check Python version
python --version
# List files
ls -la
# Check installed packages
pip list # Python
npm list # Node.jsFile Manager
Browse, edit, and manage your bot files directly from the dashboard.
Features
- Create File/Folder - Add new files and directories
- Upload Files - Upload files up to 50MB
- Edit Files - Built-in code editor with syntax highlighting
- Download - Download individual files or folders
- Delete - Remove files and directories
File Path
Your bot files are located at /home/container/
Startup Configuration
Configure how your bot starts and which file to run.
Entry Point
Specify the main file that starts your bot:
# Python
python main.py
python bot.py
python -m mybot
# Node.js
node index.js
node src/bot.js
npm startAdditional Packages
Add extra packages that aren't in your requirements.txt or package.json:
# Python packages (space-separated)
discord.py pynacl python-dotenv
# Node.js packages (space-separated)
discord.js @discordjs/voice dotenvLogs
View real-time logs and debug your bot issues.
Log Features
- Real-time streaming - See logs as they happen
- Timestamps - Every log entry includes time
- Copy/Download - Export logs for debugging
- Clear - Clear the log display
Debug Logging
Add logging to your bot for easier debugging:
# Python
import logging
logging.basicConfig(level=logging.INFO)
@bot.event
async def on_ready():
logging.info(f'Bot is ready: {bot.user}')// Node.js client.on('ready', () => { console.log(`Bot is ready: ${client.user.tag}`); });
Troubleshooting
Common issues and how to fix them.
Bot Won't Start
- Check that DISCORD_TOKEN is set in environment variables
- Verify your token is valid in the Discord Developer Portal
- Check logs for error messages
- Ensure your entry point file exists
Dependencies Not Installing
- Verify requirements.txt or package.json exists
- Check for typos in package names
- Try adding packages manually in Startup settings
Bot Goes Offline
- Check for unhandled exceptions in your code
- Add error handling for Discord events
- Review memory usage - you may need to upgrade
Resource Limits
Each tier has different resource allocations.
| Tier | RAM | Storage | CPU |
|---|---|---|---|
| Free | 0.5GB | 4GB | Shared |
| Tier 1 | 0.5GB | 8GB | Shared |
| Tier 2 | 2GB | 12GB | Dedicated |
| Tier 3 | 4GB | 16GB | Dedicated |
| Tier 4 | 6GB | 24GB | Dedicated |
| Tier 5 | 8GB | 32GB | Dedicated |
Need help?
Contact our support team