Skip to main content

Quick Start Guide

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.

Before You Begin

System Requirements

Minimum Requirements

  • Node.js: v18.0.0 or higher
  • RAM: 512MB minimum
  • Storage: 200MB free space
  • Network: Stable internet connection

Recommended Setup

  • Node.js: v20.0.0 or higher
  • RAM: 1GB or more
  • Storage: 500MB free space
  • OS: Ubuntu 20.04+ or equivalent

What You’ll Need

1

Discord Bot Application

Create a new application at Discord Developer Portal and generate a bot token
2

Astra Community License

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.

Installation Methods

Choose the installation method that best fits your hosting environment and technical comfort level:
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

  1. Download your Astra Community files from the BuiltByBit resource page
  2. Extract the archive to your desired directory:
# Extract the downloaded archive
unzip astra-community-v1.1.zip
cd astra-community

# Verify files are present
ls -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:
# Make setup script executable
chmod +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:
# Use nano (beginner-friendly)
nano config.yml

# Or use vim (advanced users)
vim config.yml

# Or any other text editor you prefer
gedit config.yml
Fill in the following required fields in config.yml:
# 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 validation
licenseKey: "YOUR_LICENSE_KEY"

# Additional settings
bot:
  # Bot status and activity
  status: "online"  # online, idle, dnd, invisible
  activity:
    type: "WATCHING"  # PLAYING, STREAMING, LISTENING, WATCHING
    name: "the community"

# Command settings
commands:
  # 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:
# Test configuration syntax
node -e "console.log(require('js-yaml').load(require('fs').readFileSync('config.yml', 'utf8')))"

# Check if all required fields are filled
grep -E "(token|clientId|ownerId|licenseKey)" config.yml
Ensure none of the values still contain placeholder text like “YOUR_BOT_TOKEN”.
5

Start the Bot

Launch Astra Community using the start command:
# Start the bot
npm start
You should see output similar to:
[2025-08-12 21:23:08] [INFO] Astra Community v1.1 starting...
[2025-08-12 21:23:09] [INFO] License verification successful
[2025-08-12 21:23:10] [INFO] SQLite database connected successfully  
[2025-08-12 21:23:11] [INFO] Logged in as Astra Community#1234
[2025-08-12 21:23:12] [INFO] Commands registered successfully
[2025-08-12 21:23:13] [INFO] Ready! Serving 1 guild(s)
If you see “Ready! Serving X guild(s)”, your bot is successfully online and operational!
6

Enable Auto-Start (Recommended)

Set up a process manager to automatically restart the bot if it crashes:
# Install PM2 globally
npm install -g pm2

# Start bot with PM2
pm2 start npm --name "astra-community" -- start

# Save PM2 configuration for automatic startup
pm2 save

# Configure PM2 to start on system boot
pm2 startup

# View bot status
pm2 status

# View bot logs
pm2 logs astra-community
PM2 will automatically restart your bot if it crashes and can start it automatically when your server boots up.

Post-Installation VPS Setup

Ensure your firewall allows outbound HTTPS connections for Discord API access:
# Ubuntu/Debian with UFW
sudo ufw allow out 443/tcp
sudo ufw allow out 80/tcp
sudo ufw status

# CentOS/RHEL with firewalld
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --reload
sudo firewall-cmd --list-services

# Verify Discord API connectivity
curl -I https://discord.com/api/v10/gateway
Create a systemd service for automatic startup without PM2:
# Create service file
sudo nano /etc/systemd/system/astra-community.service
Add the following content (replace paths and username):
[Unit]
Description=Astra Community Discord Bot
After=network.target
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=always
RestartSec=10
User=your-username
WorkingDirectory=/path/to/astra-community
ExecStart=/usr/bin/npm start
Environment=NODE_ENV=production

[Install]
WantedBy=multi-user.target
Enable and start the service:
# Reload systemd configuration
sudo systemctl daemon-reload

# Enable service to start on boot
sudo systemctl enable astra-community

# Start the service
sudo systemctl start astra-community

# Check service status
sudo systemctl status astra-community

# View service logs
sudo journalctl -u astra-community -f
Secure your bot installation with these best practices:
# Create dedicated user for the bot
sudo useradd -m -s /bin/bash astrabot
sudo chown -R astrabot:astrabot /path/to/astra-community

# Restrict file permissions
chmod 600 config.yml  # Only owner can read/write config
chmod 755 setup.sh    # Make setup script executable

# Set up log rotation for SQLite database backups
sudo nano /etc/logrotate.d/astra-community
Add to logrotate configuration:
/path/to/astra-community/logs/*.log {
    daily
    missingok
    rotate 7
    compress
    delaycompress
    notifempty
    copytruncate
}

Discord Bot Setup

Regardless of your installation method, you’ll need to properly configure your Discord application:
1

Create Discord Application

  1. Visit the Discord Developer Portal
  2. Click “New Application” and give it a descriptive name (e.g., “Astra Community - YourServer”)
  3. Navigate to the “Bot” section in the left sidebar
  4. Click “Add Bot” to create a bot user
  5. 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:
✅ 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:
  1. Scopes: Select both checkboxes:
    • ☑️ bot - Allows the bot to join servers
    • ☑️ applications.commands - Enables slash commands
  2. Bot Permissions: Select permissions based on your needs:
    • For easy setup: Check “Administrator”
    • For security: Select only the specific permissions listed above
  3. Copy the generated URL - this is your bot invite link
  4. Test the invite link by opening it in a new browser tab
5

Invite Bot to Server

  1. Use the generated invite link to add Astra Community to your Discord server
  2. Select the server from the dropdown (you must have “Manage Server” permission)
  3. Review the permissions the bot is requesting
  4. Click “Authorize” to complete the invitation
  5. Complete any CAPTCHA verification if prompted
  6. 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:
  1. Enable Developer Mode:
    • Open Discord Settings (gear icon)
    • Go to Advanced settings
    • Enable “Developer Mode”
  2. 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.

Get Your License Key

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:
/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:
XXXX-XXXX-XXXX-XXXX
If your license key doesn’t follow this format or you encounter any issues, contact support in the Discord server.

Initial Configuration

After installation and Discord setup, complete the initial bot configuration:
# 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 validation
licenseKey: "YOUR_LICENSE_KEY"

# Additional settings
bot:
  # Bot status and activity
  status: "online"  # online, idle, dnd, invisible
  activity:
    type: "WATCHING"  # PLAYING, STREAMING, LISTENING, WATCHING
    name: "the community"

# Command settings
commands:
  # 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"

Verification & Testing

Ensure your bot is working correctly with these verification steps:

Essential Functionality Tests

1

Bot Online Status

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:
/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:
/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:
/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
# Check if database file exists
ls -la data/astra.db

# Verify database is accessible
sqlite3 data/astra.db ".tables"

Troubleshooting

Common issues and their solutions:
Symptoms: Bot fails to launch, crashes immediately, or shows connection errorsDiagnostic Steps:
# Check Node.js version
node --version  # Should be 18.0.0+

# Verify npm installation
npm --version

# Check file permissions
ls -la config.yml  # Should be readable
ls -la setup.sh    # Should be executable

# Test configuration syntax
node -e "console.log(require('js-yaml').load(require('fs').readFileSync('config.yml', 'utf8')))"
Common Solutions:
  1. Invalid Configuration:
    # Validate YAML syntax
    python3 -c "import yaml; yaml.safe_load(open('config.yml'))"
    
    # Check for missing quotes around IDs
    grep -E "(token|clientId|ownerId|licenseKey)" config.yml
    
  2. Dependency Issues:
    # Clear npm cache and reinstall
    rm -rf node_modules package-lock.json
    npm cache clean --force
    npm install
    
  3. Permission Problems:
    # Fix file permissions
    chmod 600 config.yml
    chmod +x setup.sh
    chmod -R 755 src/
    
  4. Token/License Issues:
    • Verify bot token in Discord Developer Portal
    • Regenerate token if necessary
    • Confirm license key from /get-license command
    • Check for extra spaces or characters in credentials
Symptoms: Slash commands don’t appear, don’t respond, or show as “Application did not respond”Solutions by Scenario:Commands Not Appearing:
  1. Missing Scope:
    • Re-invite bot with applications.commands scope
    • Ensure bot has proper OAuth2 permissions
  2. Command Registration Issues:
    # Force command refresh in config.yml
    commands:
      global: false
      testGuildId: "YOUR_GUILD_ID"
    
  3. Global Command Delay:
    • Global commands can take up to 1 hour to sync
    • Use guild-specific commands for testing
    • Check Discord API status
Commands Not Responding:
  1. Permission Issues:
    Required Bot Permissions:
    ✓ Send Messages
    ✓ Use Slash Commands  
    ✓ View Channels
    ✓ Embed Links
    
  2. Bot Role Position:
    • Ensure bot role is positioned correctly
    • Bot cannot moderate users with higher roles
    • Check channel-specific permissions
Symptoms: Database commands fail, data not persisting, SQLite errorsSQLite Troubleshooting:
# Check if database file exists and is accessible
ls -la data/astra.db

# Test SQLite database
sqlite3 data/astra.db ".tables"
sqlite3 data/astra.db ".schema"

# Check database file permissions
chmod 664 data/astra.db

# Verify data directory permissions
chmod 755 data/

# Test database integrity
sqlite3 data/astra.db "PRAGMA integrity_check;"
Common SQLite Fixes:
  1. Permission Issues:
    # Ensure bot can write to data directory
    chown -R $(whoami):$(whoami) data/
    chmod 755 data/
    chmod 644 data/astra.db  # If database exists
    
  2. Disk Space:
    # Check available disk space
    df -h .
    
    # Check database size
    du -h data/astra.db
    
  3. Database Corruption:
    # Backup existing database
    cp data/astra.db data/astra.db.backup
    
    # Test database recovery
    sqlite3 data/astra.db ".recover" > recovered.sql
    
Symptoms: Bot responds with permission errors, can’t moderate certain users, hierarchy conflictsDiscord Permission Hierarchy:
Server Owner (highest)

Administrator Roles

Bot Role Position ← Bot can only manage roles/users below this

Other Roles

@everyone (lowest)
Solutions:
  1. Role Position Issues:
    • Move bot role higher in server settings
    • Ensure bot role is above roles it needs to manage
    • Check that bot role has necessary permissions
  2. Required Permissions Checklist:
    Essential Permissions:
    ✓ View Channels
    ✓ Send Messages  
    ✓ Send Messages in Threads
    ✓ Embed Links
    ✓ Attach Files
    ✓ Read Message History
    ✓ Use External Emojis
    ✓ Add Reactions
    ✓ Use Slash Commands
    
    Moderation Permissions:
    ✓ Manage Messages (for purge)
    ✓ Kick Members (for kick command)
    ✓ Ban Members (for ban command)
    ✓ Moderate Members (for timeout)
    ✓ Manage Roles (for role commands)
    ✓ Manage Channels (for slowmode)
    ✓ View Audit Log (for logging)
    
Symptoms: License verification failures, authentication errors, “Invalid license” messagesLicense Troubleshooting:
  1. Verify License Key Format:
    Correct format: AC-XXXX-XXXX-XXXX-XXXX
    Common issues:
    - Extra spaces or newlines
    - Wrong case (should be uppercase)
    - Missing hyphens
    - Partial key copied
    
  2. Get Fresh License Key:
    1. Join the Discord support server
    2. Run: /get-license
    3. Copy the EXACT key provided
    4. Ensure no extra characters
    
  3. Configuration Verification:
    # Check license key in config
    grep licenseKey config.yml
    
    # Ensure proper format
    # Should be: licenseKey: "AC-XXXX-XXXX-XXXX-XXXX"
    

Next Steps

Server Configuration

Set up server-specific settings:
  • Configure welcome and goodbye messages
  • Set up moderation log channels
  • Create custom server roles and permissions
  • Test all bot features in your server

Command Customization

Customize bot behavior:
  • Configure command permissions per role
  • Set up custom command cooldowns
  • Test moderation features thoroughly
  • Enable/disable features as needed

Moderation Setup

Advanced moderation configuration:
  • Set up punishment escalation systems
  • Test all moderation commands
  • Configure audit logging
  • Create moderation workflows

Community Features

Enhance community engagement:
  • Set up giveaway systems
  • Test welcome message systems
  • Configure member roles
  • Enable community statistics
1

Basic Setup Verification

Ensure bot is online and responding to basic commands like /ping and /help
2

Permission Configuration

Set up proper bot permissions and role hierarchy in your Discord server
3

Database Testing

Test SQLite database functionality with commands that store and retrieve data
4

Feature Testing

Test core features like moderation, giveaways, and information commands
5

Production Deployment

Set up monitoring, logging, and backup systems for production use

Support Resources

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.