Get your Astra Community Bot deployed and configured in minutes! This guide covers multiple installation methods to suit different hosting environments and technical expertise levels.
Prerequisites: Ensure you have a Discord application with bot token and have purchased Astra Community from BuiltByBit before beginning installation.
Your license key from your purchase (Make sure to run /get-license within our support server)
3
Hosting Environment
Choose from VPS, shared hosting, or local development environment
Important: You must join our Discord support server and run /get-license to retrieve your unique license key. This key is required for bot authentication and cannot be found in your BuiltByBit purchase email.
Best for: Users with full shell/terminal access (VPS, dedicated server, or local machine)
This is the recommended installation method as it provides full control over the environment and ensures optimal performance.
1
Download and Extract Files
Download your Astra Community files from the BuiltByBit resource page
Extract the archive to your desired directory:
Copy
# Extract the downloaded archiveunzip astra-community-v1.1.zipcd astra-community# Verify files are presentls -la
Make sure you have the latest version downloaded from your BuiltByBit account to ensure compatibility and security.
2
Run Automated Setup
Execute the included setup script that handles dependency installation and initial configuration:
Copy
# Make setup script executablechmod +x setup.sh# Run the automated setup./setup.sh
The setup script will:
Verify Node.js installation and version compatibility
Install Node.js dependencies automatically
Create necessary directories and database files
Set up the configuration template
Perform system requirement checks
If the setup script fails, ensure you have proper permissions and Node.js v18.0.0+ is correctly installed on your system. Check the console output for specific error messages.
3
Configure Bot Settings
Edit the configuration file with your credentials:
Copy
# Use nano (beginner-friendly)nano config.yml# Or use vim (advanced users)vim config.yml# Or any other text editor you prefergedit config.yml
Fill in the following required fields in config.yml:
Copy
# Discord Bot Configuration# Your Discord bot token (from Discord Developer Portal)token: "YOUR_BOT_TOKEN"# Your Discord application/client ID (from Discord Developer Portal)clientId: "YOUR_BOT_CLIENT_ID"# Your Discord user ID (for owner-only commands)ownerId: "YOUR_DISCORD_USER_ID"# Your license key for bot validationlicenseKey: "YOUR_LICENSE_KEY"# Additional settingsbot: # Bot status and activity status: "online" # online, idle, dnd, invisible activity: type: "WATCHING" # PLAYING, STREAMING, LISTENING, WATCHING name: "the community"# Command settingscommands: # Global command deployment (set to false for guild-only testing) global: true # Guild ID for testing (only used if global is false) testGuildId: "YOUR_TEST_GUILD_ID"
Finding Your Discord IDs: Enable Developer Mode in Discord (User Settings > Advanced > Developer Mode), then right-click on users, servers, or channels to copy their IDs.
4
Verify Configuration
Before starting the bot, verify your configuration is correct:
Copy
# Test configuration syntaxnode -e "console.log(require('js-yaml').load(require('fs').readFileSync('config.yml', 'utf8')))"# Check if all required fields are filledgrep -E "(token|clientId|ownerId|licenseKey)" config.yml
Ensure none of the values still contain placeholder text like “YOUR_BOT_TOKEN”.
Ensure your firewall allows outbound HTTPS connections for Discord API access:
Copy
# Ubuntu/Debian with UFWsudo ufw allow out 443/tcpsudo ufw allow out 80/tcpsudo ufw status# CentOS/RHEL with firewalldsudo firewall-cmd --permanent --add-service=httpssudo firewall-cmd --permanent --add-service=httpsudo firewall-cmd --reloadsudo firewall-cmd --list-services# Verify Discord API connectivitycurl -I https://discord.com/api/v10/gateway
System Service Setup
Create a systemd service for automatic startup without PM2:
Copy
# Create service filesudo nano /etc/systemd/system/astra-community.service
Add the following content (replace paths and username):
Copy
[Unit]Description=Astra Community Discord BotAfter=network.targetStartLimitIntervalSec=0[Service]Type=simpleRestart=alwaysRestartSec=10User=your-usernameWorkingDirectory=/path/to/astra-communityExecStart=/usr/bin/npm startEnvironment=NODE_ENV=production[Install]WantedBy=multi-user.target
Enable and start the service:
Copy
# Reload systemd configurationsudo systemctl daemon-reload# Enable service to start on bootsudo systemctl enable astra-community# Start the servicesudo systemctl start astra-community# Check service statussudo systemctl status astra-community# View service logssudo journalctl -u astra-community -f
Security Hardening
Secure your bot installation with these best practices:
Copy
# Create dedicated user for the botsudo useradd -m -s /bin/bash astrabotsudo chown -R astrabot:astrabot /path/to/astra-community# Restrict file permissionschmod 600 config.yml # Only owner can read/write configchmod 755 setup.sh # Make setup script executable# Set up log rotation for SQLite database backupssudo nano /etc/logrotate.d/astra-community
Use your hosting provider’s file manager, FTP, or SFTP client to upload files:Via File Manager (Web Interface):
Access your hosting provider’s control panel
Navigate to the file manager
Create a new directory for your bot
Upload all prepared files
Via SFTP/FTP:
Copy
# Using SCPscp -r astra-community/ user@hostname:/path/to/bot/directory/# Using rsyncrsync -avz --exclude='node_modules' astra-community/ user@hostname:/path/to/bot/
3
Create Configuration
Using your host’s file manager or web interface:
Copy the example configuration:
Duplicate config.example.yml and rename to config.yml
Edit config.yml with your credentials:
Copy
# Discord Bot Configuration# Your Discord bot token (from Discord Developer Portal)token: "YOUR_BOT_TOKEN"# Your Discord application/client ID (from Discord Developer Portal)clientId: "YOUR_BOT_CLIENT_ID"# Your Discord user ID (for owner-only commands)ownerId: "YOUR_DISCORD_USER_ID"# Your license key for bot validationlicenseKey: "YOUR_LICENSE_KEY"# Additional settingsbot: # Bot status and activity status: "online" # online, idle, dnd, invisible activity: type: "WATCHING" # PLAYING, STREAMING, LISTENING, WATCHING name: "the community"# Command settingscommands: # Global command deployment (set to false for guild-only testing) global: true # Guild ID for testing (only used if global is false) testGuildId: "YOUR_TEST_GUILD_ID"
The bot uses SQLite database by default, which will be automatically created in the data/ folder when the bot first starts.
4
Install Dependencies
Most shared hosting providers will automatically install dependencies, but if manual installation is required:
Copy
# If you have shell accessnpm install --only=production# If using hosting provider's interface# Look for "Install Dependencies" or "NPM Install" button
5
Start via Control Panel
Use your hosting provider’s control panel to start the bot:
Look for “Start Bot”, “Deploy”, “Run”, or similar button
Set the start command to: npm start or node index.js
Monitor the console output for any errors
Check that all dependencies install successfully
Each hosting provider has different interfaces. Common providers include Heroku, Railway, Replit, and DigitalOcean App Platform. Consult your host’s documentation for specific startup procedures.
6
Monitor and Verify
Ensure your bot is running correctly:
Check the hosting provider’s logs/console
Verify the bot appears online in Discord
Test basic commands like /ping
Confirm SQLite database is created in the data/ folder
Monitor memory and CPU usage through the hosting dashboard
Best for: Experienced users who want complete control over the installation process
This method provides maximum flexibility and is ideal for developers or system administrators who need custom configurations.
1
Download and Prepare Files
Download your Astra Community files from the BuiltByBit resource page
Extract to your desired location
Verify file integrity:
Copy
# Extract the filesunzip astra-community-v1.1.zipcd astra-community# Verify all files are presentls -la# Check package.json for correct versioncat package.json | grep version# Verify setup script permissionsls -l setup.sh
2
Install Dependencies Manually
Install required Node.js packages with full control:
Copy
# Clean any existing node_modulesrm -rf node_modules package-lock.json# Install production dependencies onlynpm install --only=production# Or install all dependencies (including development tools)npm install# Verify installation successnpm list --depth=0# Check for vulnerabilitiesnpm audit# Fix any vulnerabilitiesnpm audit fix
Alternative package managers:
Copy
# Using Yarnyarn install --production# Using pnpm (faster alternative)pnpm install --prod
3
Configuration Setup
Create and customize your configuration file:
Copy
# Copy the example configurationcp config.example.yml config.yml# Create backup of examplecp config.example.yml config.example.yml.backup# Edit with your preferred editornano config.yml
Complete Configuration Example:
Copy
# Discord Bot Configuration# Your Discord bot token (from Discord Developer Portal)token: "YOUR_BOT_TOKEN"# Your Discord application/client ID (from Discord Developer Portal)clientId: "YOUR_BOT_CLIENT_ID"# Your Discord user ID (for owner-only commands)ownerId: "YOUR_DISCORD_USER_ID"# Your license key for bot validationlicenseKey: "YOUR_LICENSE_KEY"# Additional settingsbot: # Bot status and activity status: "online" # online, idle, dnd, invisible activity: type: "WATCHING" # PLAYING, STREAMING, LISTENING, WATCHING name: "the community"# Command settingscommands: # Global command deployment (set to false for guild-only testing) global: true # Guild ID for testing (only used if global is false) testGuildId: "YOUR_TEST_GUILD_ID"
4
Environment Variables Setup (Optional)
For enhanced security, use environment variables for sensitive data:
Copy
# Create .env file for local developmenttouch .envchmod 600 .env # Restrict permissions# Add sensitive configuration to .envcat << EOF > .env# Discord ConfigurationDISCORD_TOKEN=your_actual_bot_token_hereDISCORD_CLIENT_ID=your_actual_client_id_hereDISCORD_OWNER_ID=your_actual_user_id_here# License ConfigurationLICENSE_KEY=your_actual_license_key_here# EnvironmentNODE_ENV=productionEOF
Update your configuration to use environment variables:
Copy
# Reference environment variables in config.ymltoken: ${DISCORD_TOKEN}clientId: ${DISCORD_CLIENT_ID}ownerId: ${DISCORD_OWNER_ID}licenseKey: ${LICENSE_KEY}
For production environments:
Copy
# Set system environment variablesexport DISCORD_TOKEN="your_token_here"export LICENSE_KEY="your_license_here"# Or add to system profileecho 'export DISCORD_TOKEN="your_token_here"' >> ~/.bashrcsource ~/.bashrc
5
SQLite Database Preparation
Set up the SQLite database directory and permissions:
Copy
# Create data directory for SQLite databasemkdir -p data logs# Set proper permissionschmod 755 data logschmod 700 data # Restrict database directory access# SQLite database will be created automatically on first run# The database file will be: data/astra.db
Astra Community uses SQLite as its database, which requires no additional setup or configuration. The database file will be automatically created when the bot first starts.
6
Launch with Custom Options
Start Astra Community with various launch options:
Copy
# Standard production startnpm start# Development mode with auto-restart on file changesnpm run dev# Debug mode with verbose loggingnpm run debug# Production mode with PM2 process managernpm run production# Custom start with specific Node.js optionsnode --max-old-space-size=1024 index.js# Start with environment fileNODE_ENV=production node index.js# Start with custom config fileCONFIG_FILE=./config.production.yml npm start
Click “New Application” and give it a descriptive name (e.g., “Astra Community - YourServer”)
Navigate to the “Bot” section in the left sidebar
Click “Add Bot” to create a bot user
Important: Save your Application ID (Client ID) from the General Information tab
2
Configure Bot Settings
In the Bot section, configure the following essential settings:Token Settings:
Copy the Bot Token (click “Reset Token” if needed, then copy immediately)
Keep this token completely secure - treat it like a password
Never share your token publicly or commit it to version control
Privileged Gateway Intents:
✅ Server Members Intent - Required for member management commands
✅ Message Content Intent - Required for message processing and moderation
⚠️ Presence Intent - Optional, only if you need presence-based features
Additional Bot Settings:
Set a recognizable username and avatar
Consider disabling “Public Bot” if you only want to use it on your servers
Enable “Require OAuth2 Code Grant” for additional security (optional)
3
Configure Bot Permissions
Calculate the exact permissions your bot needs:Essential Permissions for Full Functionality:
Copy
✅ Administrator (recommended for full functionality)OR for granular control:✅ View Channels✅ Send Messages✅ Send Messages in Threads✅ Embed Links✅ Attach Files✅ Read Message History✅ Use External Emojis✅ Add Reactions✅ Use Slash Commands✅ Manage Messages (for purge commands)✅ Kick Members (for moderation)✅ Ban Members (for moderation)✅ Manage Roles (for role commands)✅ Manage Channels (for slowmode)✅ View Audit Log (for logging)
The Administrator permission simplifies setup but grants full server access. For production environments, consider using granular permissions for better security.
4
Generate Invite Link
In the OAuth2 > URL Generator section:
Scopes: Select both checkboxes:
☑️ bot - Allows the bot to join servers
☑️ applications.commands - Enables slash commands
Bot Permissions: Select permissions based on your needs:
For easy setup: Check “Administrator”
For security: Select only the specific permissions listed above
Copy the generated URL - this is your bot invite link
Test the invite link by opening it in a new browser tab
5
Invite Bot to Server
Use the generated invite link to add Astra Community to your Discord server
Select the server from the dropdown (you must have “Manage Server” permission)
Review the permissions the bot is requesting
Click “Authorize” to complete the invitation
Complete any CAPTCHA verification if prompted
Verify the bot appears in your server’s member list (it will be offline until you start it)
6
Get Your Discord User ID
You’ll need your Discord User ID for the ownerId configuration:
Enable Developer Mode:
Open Discord Settings (gear icon)
Go to Advanced settings
Enable “Developer Mode”
Copy Your User ID:
Right-click on your username in any server
Click “Copy User ID”
This is the ID you’ll use in the ownerId field
The Owner ID gives you access to owner-only commands like bot management and debug commands. Only set this to your own Discord User ID.
Critical Step: You MUST obtain your license key from our Discord support server before the bot will function.
1
Join Support Server
Join our official Discord support server using the invite link provided in your BuiltByBit purchase confirmation or documentation.
2
Run License Command
In the support server, use the slash command:
Copy
/get-license
Requirements:
You must be in the support server
Your Discord account must be linked to your BuiltByBit account
You must have an active Astra Community purchase
3
Copy License Key
The bot will respond with your unique license key. Copy this key exactly as provided - it’s case-sensitive and must be entered precisely in your configuration file.
4
Verify License Key
Your license key should look similar to:
Copy
XXXX-XXXX-XXXX-XXXX
If your license key doesn’t follow this format or you encounter any issues, contact support in the Discord server.
After installation and Discord setup, complete the initial bot configuration:
Copy
# Discord Bot Configuration# Your Discord bot token (from Discord Developer Portal)token: "YOUR_BOT_TOKEN"# Your Discord application/client ID (from Discord Developer Portal)clientId: "YOUR_BOT_CLIENT_ID"# Your Discord user ID (for owner-only commands)ownerId: "YOUR_DISCORD_USER_ID"# Your license key for bot validationlicenseKey: "YOUR_LICENSE_KEY"# Additional settingsbot: # Bot status and activity status: "online" # online, idle, dnd, invisible activity: type: "WATCHING" # PLAYING, STREAMING, LISTENING, WATCHING name: "the community"# Command settingscommands: # Global command deployment (set to false for guild-only testing) global: true # Guild ID for testing (only used if global is false) testGuildId: "YOUR_TEST_GUILD_ID"
Verify the bot appears online in your Discord server and shows the correct status message.
2
Basic Slash Commands
Test these essential commands to verify functionality:
Copy
/ping # Should respond with latency information/help # Should display command list and categories/serverinfo # Should show server statistics and information/userinfo # Should display user profile information/version # Should show bot version and build info
Expected Results:
Commands should respond within 2-3 seconds
Responses should be properly formatted with embeds
No error messages or permission denials
3
Permission Verification
Test bot permissions with these moderation commands:
Copy
/slowmode 10s # Test channel management permissions/purge 5 # Test message management permissions/kick @testuser # Test member kick permissions (use carefully!)/warn @user test # Test warning system and database
Permission Checklist:
✅ Bot can modify channel settings (slowmode)
✅ Bot can delete messages (purge)
✅ Bot can kick members (if configured)
✅ Bot can add reactions and send embeds
Only test kick/ban commands with test accounts or in a test server to avoid accidentally removing real members.
4
Database Functionality
Verify SQLite database operations are working:
Copy
/warn @user test reason # Should create database entry/warnings @user # Should retrieve warning history/giveaway create # Should store giveaway data
Database Health Indicators:
Commands that store data complete successfully
Data retrieval commands show correct information
No database connection errors in console
SQLite database file is created in the data/ directory
Copy
# Check if database file existsls -la data/astra.db# Verify database is accessiblesqlite3 data/astra.db ".tables"
# Check current memory usageps aux | grep node# Monitor CPU usagetop -p $(pgrep -f "astra-community")# Watch memory usage over timewatch "ps aux | grep node | grep -v grep"
Response Time Testing:
Copy
/ping # Should typically be < 100ms# Test multiple rapid commands/serverinfo/userinfo/membercount/uptime
Expected Performance:
Memory usage: 50-150MB typical
CPU usage: < 5% when idle
Command response time: < 2 seconds
Discord API latency: < 300ms
SQLite Database Testing
Database Operations:
Copy
# Test database connectivitysqlite3 data/astra.db "SELECT name FROM sqlite_master WHERE type='table';"# Check database sizels -lh data/astra.db# Test database integritysqlite3 data/astra.db "PRAGMA integrity_check;"
Data Persistence Testing:
Copy
1. /warn @user Test warning message2. Restart the bot3. /warnings @user # Should still show the warning4. /giveaway create # Test giveaway data storage
Error Handling Tests
Test how the bot handles various error conditions:Permission Errors:
Copy
/kick @admin # Should gracefully handle permission denied/ban @server_owner # Should handle hierarchy conflicts/purge 99999 # Should handle invalid parameters
Invalid Input Tests:
Copy
/slowmode invalid # Should show proper error message/warn @nonexistent user # Should handle user not found/giveaway # Should show required parameters
Symptoms: Bot fails to launch, crashes immediately, or shows connection errorsDiagnostic Steps:
Copy
# Check Node.js versionnode --version # Should be 18.0.0+# Verify npm installationnpm --version# Check file permissionsls -la config.yml # Should be readablels -la setup.sh # Should be executable# Test configuration syntaxnode -e "console.log(require('js-yaml').load(require('fs').readFileSync('config.yml', 'utf8')))"
Common Solutions:
Invalid Configuration:
Copy
# Validate YAML syntaxpython3 -c "import yaml; yaml.safe_load(open('config.yml'))"# Check for missing quotes around IDsgrep -E "(token|clientId|ownerId|licenseKey)" config.yml
Need Help? If you encounter any issues during installation or setup:
Join our Discord support server for immediate assistance
Check the troubleshooting section above for common solutions
Review the configuration examples for proper syntax
Ensure you have the latest version of Astra Community from BuiltByBit
Quick Start Guide last updated: 2025-08-12 21:23:40 UTC | Astra Community v1.1 | Maintained by @braidenhxyz
Installation Complete! Your Astra Community Bot should now be running successfully with SQLite database. Use /help in Discord to see all available commands and begin exploring the features.