My App
Getting Started

Basic Setup Guide

How to host and install Cosmic Bot step by step.

Hosting Options

There is no such thing as absolutely free hosting!

Either your information is the payment, or your feature set is extremely limited! Be careful for scams, obscure hosting plans, or sneaky payment systems and plans!

Self Hosting

If you're looking to host a tiny instance, or something that's not critical to keep online all the time, you're more than welcome to run it on your local machine!

VPS/KVM/VDS Systems

There's many services that host systems that you could use for this! Hostinger, DigitalOcean, Contabo, etc.! These are much more in depth due to you needing knowledge of how to manage the system.

Pterodactyl Panel

The most "plug and play" out of them all! This is the most popular option since this panel lets you do anything from Console Management, File Management, and more! Something like Novacloud-Hosting comes to mind!

Configuration

This configuration happens in the common.json file stored at the root of the bot directory.

**You may need to enable **Developer Mode if you haven't already for this process!

To enable it, go to: Discord Settings > Advanced > Developer Mode

1. Get your License!

All customers need to have a license! This is to allow your bot to communicate with our API and support neat features like global bans, Lavalink services, and some other things! Plus, it helps us protect our product.

If you need a license, open a ticket in our Support Server!

2. FOR PTERODACTYL ONLY: Change your .json file format!

Pterodactyl does not support colored .json5 files within your editor. Due to this make sure to set json5 to false if your host is running pterodactyl.

3. Set your Bot Token!

For this, you'll have to look in the Discord Developer Portal!

For new bots, you need to create an Application, go to Bot, then press the Reset Token button to generate a new token.

For those with an older version of Athena, you can just copy over your current token into the new configuration file.

If you need help finding how to make one, I'll link that here!

4. Set your MongoDB URI!

This is what lets your bot save data! The process for that is here!

5. Set your Discord Bot ID!

Without this, your bot doesn't know which account to interface with.

You need to have Discord's Developer Mode enabled if you haven't yet! It's pretty simple to get it, just right click your bot user and 'Copy ID'.

6. Set your Discord Server ID!

This is the Server your bot is in! (Right-click your server icon to get it)

7. Set your server name!

This is for your bot's reference in regards to your server name in it's messages.

8. Set your server color!

This just makes your embeds correlate to the color you wanted to see the most, so choose whatever you want here.

9. Set your language!

This is the language the bot responds in on Discord.

  • English: en
  • German: de
  • Spanish: es
  • French: fr
  • Portugese: pt
  • Dutch: nl
  • Turkish: tr
  • Russian: ru
  • Polish: pl

10. Set your timezone!

This is the timezone the bot will use for time-based operations and logging. Use standard timezone identifiers (e.g., "Europe/Berlin", "America/New_York").

11. Dashboard!

The dashbard is currently in closed beta. Please do not enable the setting if you do not have beta access, the bot won't start otherwise. The setup guide for the dashboard can be found in our Discord server for now.


After everything is done, it should look something similar to below!

{
    "general": {
        "license": "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
        "json5": false,
        "lang": "en",
        "timezone": "Europe/Berlin"
    },
    "bot": {
        "mongodb_uri": "URI KEY HERE",
        "discord_bot_token": "BOT TOKEN HERE",
        "discord_bot_id": "BOT ID HERE",
        "discord_guild_id": "SERVER ID HERE",
        "server_name": "SERVER NAME HERE",
        "server_color": "YOUR FAVORITE COLOR IN HEX HERE"
    },
    "dashboard": {
        "enabled": false,
        "port": 3222,
        "disable_dashboard_configuration": false,
        "sync_dashboard_configs_to_file": false,
        "whitelisted_user_ids": [
            "USER_ID_HERE"
        ]
    },
    "console": {
        "logs_include_date": true,
        "logs_to_file": true,
        "logs_include_dashboard_output": true,
        "maximum_log_file_count": 20
    },
    "util": {
        "register_commands": true,
        "prevent_duplicated_message": false,
        "backup_configs_on_startup": false,
        "maximum_config_backup_count": 10,
        "auto_restart": true,
        "auto_restart_every": "7d",
        "debug": false,
        "developer_mode": false
    },
    "updater": {
        "auto_update": true,
        "create_system_backup_before_update": true,
        "maximum_backup_count": 10,
        "plugin_bypass": [],
        "delay_restart_in_seconds": 60,
        "dev_builds": false
    }
}

Congrats! You're all set on this part!

But we're not done yet!


Installing Dependencies

Pterodactyl Setup

The egg is available here! (or at the pterodactyl-eggs directory)

You need to install this with your admin panel!

WARNING: This egg is not compatible with all system setups. If you encounter any issues please consider using a different egg from the web that supports Node.js v22.

Make sure to install Node 22.21.0 (LTS Preferred) on your panel!

Self-Host/Non-Pterodactyl Setup

Linux (Ubuntu/Debian) Manual Installation

  • Open a terminal in your Athena bot folder.
  • Run sudo apt-get update
  • Run sudo apt-get install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev to install Canvas/native build requirements.
  • Run npm install to install Node packages.
  • Start the bot using node index.js

Windows Manual Installation

  • Open CMD or PowerShell in your Athena bot folder.
  • Run npm install to install Node packages.
  • If Canvas fails to install, install Visual Studio Build Tools (Desktop development with C++) and Python 3, then run npm install again.
  • Start the bot using node index.js

For Bot Persistence even after closing the CMD Prompt window:

Linux:

Install PM2 once with npm install pm2 -g, then use pm2 start index.js --name Athena to keep your bot alive.

And use pm2 stop Athena to turn it back off!

\ Windows:

PM2 is primarily documented here for Linux hosts. For Windows, use the startup batch script below (or Windows Task Scheduler) for persistence.

This script allows you to keep AthenaBot online even after restarts. This batch script was made by @.dodgeman (334154279029833728)

@echo off
chcp 65001 >nul
cls

REM CONFIGURATION FOR SCRIPT, SHOULD ONLY NEED TO CHANGE THIS SECTION, NOTHING BELOW.

REM This is set to the path wherever your bot resides.

set "ATHENA_PATH=C:\Users\myusername\Desktop\Athena Bot"

REM NOTHING BELOW HERE SHOULD NEED CHANGING UNLESS YOU NEED TO TWEAK OR ADD SOMETHING ELSE. WORKS AS IS.

set "RESTARTED=0"

:START
cls
if %RESTARTED% equ 0 (
    ECHO.      ╔════════════════════════════════════════╗
    ECHO.      ║                                        ║
    ECHO.      ║      Starting Athena Discord Bot       ║
    ECHO.      ║                                        ║
    ECHO.      ╚════════════════════════════════════════╝
) else (
    ECHO.      ╔════════════════════════════════════════╗
    ECHO.      ║                                        ║
    ECHO.      ║     RE-Starting Athena Discord Bot     ║
    ECHO.      ║                                        ║
    ECHO.      ╚════════════════════════════════════════╝
)

ECHO.
ECHO.

cd /d "%ATHENA_PATH%"
echo Starting AthenaBot...
ping -n 2 127.0.0.1 >nul
node index.js

ping -n 4 127.0.0.1 >nul

if %errorlevel% equ 2 exit

set "RESTARTED=1"
goto START

Finalizing Setup

If you edit Athena files locally in Visual Studio Code, install the JSON5 Syntax extension so your .json5 config files are color-highlighted and easier to read.

  • Start the Bot! This will create all necessary configuration files for you to edit!
  • Stop the Bot!
  • Configure everything! All configuration files can be found in your /configuration folder!
  • Restart the Bot!
  • Enjoy!

On this page