Self Hosting Guide
Vör is open-source software that you can host on your own infrastructure. This guide covers everything you need to know about running your own instance of Vör.
Why Self-Host?
Benefits
- Full Control: Complete control over your bot instance
- Customization: Modify code and features as needed
- Privacy: Keep all data on your own servers
- No Dependencies: Not reliant on external hosting services
- Cost Effective: Pay only for your infrastructure
Considerations
- Technical Knowledge: Requires server administration skills
- Maintenance: You’ll need to handle updates and security
- Infrastructure: Need reliable hosting with good uptime
- Support: Community support only (no official SLA)
Prerequisites
Hardware Requirements
- CPU: 1+ core (2+ recommended)
- RAM: 512MB minimum (1GB+ recommended)
- Storage: 1GB+ for bot files and databases
- Network: Stable internet connection
Software Requirements
- Operating System: Linux, Windows, or macOS
- Python: Version 3.13 (recommended) or 3.12+
- Git: For cloning the repository
- SQLite: Included with Python (no separate installation needed)
Network Requirements
- Outbound HTTPS: For API calls (Discord, VirusTotal, etc.)
- Inbound TCP: Port for your web dashboard (optional)
- Discord Gateway: WebSocket connection to Discord
Quick Setup
1. Clone the Repository
git clone https://gitlab.com/vor-discord-bot/vor.git
cd vor
2. Set Up Python Environment
# Create virtual environment
python -m venv venv
# Activate virtual environment
# Windows:
venv\Scripts\activate
# Linux/macOS:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
3. Configure Environment
# Copy example environment file
cp bot_config/example_env bot_config/.env
# Edit with your settings
nano bot_config/.env # or your preferred editor
4. Start the Bot
python main.py
Detailed Configuration
Discord Bot Setup
- Create Discord Application
- Go to Discord Developer Portal
- Create a new application
- Navigate to the “Bot” section
- Configure Bot Permissions
- Enable required intents:
- ✅ Message Content Intent
- ✅ Server Members Intent
- Set bot permissions for your invite link
- Enable required intents:
- Get Bot Token
- Copy the bot token from the “Bot” section
- Add to your
.envfile:DISCORD_TOKEN=your_token_here
Environment Variables
Required Settings
# Discord bot token
DISCORD_TOKEN=your_bot_token_here
# Bot owner IDs (comma-separated)
BOT_OWNERS=123456789012345678,987654321098765432
# Bot prefix (default: !)
BOT_PREFIX=!
Optional Settings
# Debug mode
DEBUG_MODE=false
# Logging level
LOG_LEVEL=INFO
# Dashboard URL (if hosting web interface)
VOR_DASHBOARD_URL=https://your-domain.com
API Keys (as needed)
# Currency conversion
CB_API_KEY=your_currencybeacon_key
# Virus scanning
VT_API_KEY=your_virustotal_key
# Error logging webhook
WEBHOOK_ERROR=https://discord.com/api/webhooks/your/webhook
Database Setup
Vör uses SQLite databases that are created automatically. No manual setup required.
Database Files
vor.db- Main bot datavor_modlogs.db- Moderation logsvor_economy.db- Economy datavor_notes.db- User notesvor_reputation.db- Reputation datavor_tiers.db- XP/levels data
Backup Strategy
# Create backup script
#!/bin/bash
DATE=$(date +%Y%m%d_%H%M%S)
mkdir -p backups
cp *.db backups/
cp bot_config/.env backups/
tar -czf backups/vor_backup_$DATE.tar.gz backups/*.db backups/.env
Web Dashboard (Optional)
Requirements
- Web Server: Nginx, Apache, or similar
- SSL Certificate: For HTTPS (Let’s Encrypt recommended)
- Domain: Pointed to your server
Setup Steps
- Configure dashboard URL in
.env - Set up reverse proxy
- Obtain SSL certificate
- Start dashboard service
Example Nginx Configuration
server {
listen 80;
server_name your-domain.com;
location / {
proxy_pass http://localhost:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
Production Deployment
Process Management
# Using systemd
sudo nano /etc/systemd/system/vor.service
[Unit]
Description=Vör Discord Bot
After=network.target
[Service]
Type=simple
User=vor
WorkingDirectory=/path/to/vor
ExecStart=/path/to/vor/venv/bin/python main.py
Restart=always
[Install]
WantedBy=multi-user.target
sudo systemctl enable vor
sudo systemctl start vor
Monitoring
- Logs: Check systemd logs with
journalctl -u vor - Health Checks: Monitor bot status via Discord
- Resource Usage: Monitor CPU/memory with
htoportop
Updates
# Stop the bot
sudo systemctl stop vor
# Update code
git pull origin main
# Update dependencies
source venv/bin/activate
pip install -r requirements.txt
# Restart
sudo systemctl start vor
Security Best Practices
Bot Token Security
- Never commit tokens to version control
- Use environment variables, not config files
- Rotate tokens regularly
- Limit token permissions
Server Security
- Keep system updated:
apt update && apt upgrade - Use firewall:
ufw enable - Set up SSH key authentication
- Disable root login
Data Protection
- Regular database backups
- Encrypt sensitive data
- Secure API keys
- Monitor for unauthorized access
Troubleshooting
Bot Won’t Start
# Check Python version
python --version
# Check virtual environment
which python
# Check dependencies
pip list
# Check .env file
cat bot_config/.env
Connection Issues
- Verify Discord token is correct
- Check internet connectivity
- Review firewall settings
- Check Discord status page
Database Errors
- Ensure write permissions on database directory
- Check available disk space
- Verify SQLite installation
Performance Issues
- Monitor resource usage
- Check for memory leaks
- Review log files for errors
- Consider upgrading hardware
Getting Help
Community Resources
- Documentation: Full Documentation
- Discord Server: Join Support Server
- GitLab Issues: Report bugs and request features
Developer Setup
For development and advanced configuration:
This guide covers environment setup, dependency management, and development workflow.
Support & Maintenance
Regular Maintenance
- Weekly: Check logs for errors
- Monthly: Update dependencies and system packages
- Quarterly: Review security settings and backups
Community Support
- Join our Discord server for help
- Check documentation for common issues
- Contribute to the project on GitLab
Professional Services
For enterprise deployments or custom development, contact the development team.
Legal Notice
Self-hosting Vör is subject to the same license terms as the official distribution. Ensure compliance with Discord’s Terms of Service and applicable laws in your jurisdiction.
Bot Administration
The Bot Admin cog provides administrative tools for managing your Vör bot instance. This section covers the commands and features available for bot owners and authorized administrators.
Features
Bot Management
- Restart Command: Remotely restart the bot
- Update System: Pull latest changes from Git repository
- Status Monitoring: Check bot health and performance
- Cog Management: Load, unload, or reload individual cogs
Git Integration
- Repository Operations: Fetch, pull, and check repository status
- Commit Analysis: View changes in recent commits
- Branch Management: Switch between branches
Access Control
- Authorized Users: Configurable list of users who can use bot admin commands
- Authorized Servers: Restrict bot admin commands to specific servers
- Permission Validation: Multi-layer permission checking
System Tools
- File Operations: Backup and restore configuration files
- Log Management: Access and rotate log files
- Database Maintenance: Database backup and integrity checks
Commands
| Command | Description | Access Level |
|---|---|---|
/botadmin restart | Restart the bot | Bot Admin |
/botadmin update | Update bot from repository | Bot Admin |
/botadmin status | Check bot status | Bot Admin |
/botadmin cogs | Manage loaded cogs | Bot Admin |
Configuration
- Allowed User IDs: List of Discord user IDs with bot admin access
- Allowed Server IDs: List of server IDs where bot admin commands can be used
Security
This cog contains powerful commands that can affect bot operation. Access is strictly controlled and logged. Only configure trusted users as bot administrators.
Usage Notes
- Commands are restricted to prevent unauthorized access
- All actions are logged for audit purposes
- Use with caution as some operations can disrupt bot service