Setup Guide
Follow these steps to install, configure, and launch Kythia in your own environment.
This guide will walk you through the process of getting Kythia up and running on your own server. Whether you're setting up for development or production, we've got you covered.
Prerequisites
Before you start, make sure your environment meets these requirements:
- Node.js: v22.0.0 or higher. We highly recommend using the LTS version.
- Package Manager:
npm,pnpm, orbun. - Database: A MySQL or PostgreSQL database instance.
- Git: Required for cloning the repository.
Installation Steps
Grab the source code from GitHub.
git clone https://github.com/XXXXXX/XXXXXX.git kythia-bot
cd kythia-bot
Use your preferred package manager to install the required libraries.
bun install
npm install
pnpm install
Copy the example environment file and fill in your details.
cp example.env .env
Open the .env file and fill in all your details. Read more about each variable in the Environment Variables.
Initialize your main configuration file.
cp example.kythia.config.js kythia.config.js
Check out the Settings Guide for a deep dive into customization options.
Prepare your database schema and seed initial data.
npx kythia db seed
Register your commands with Discord so they appear in the slash menu.
npx kythia deploy
Starting the Bot
Once everything is configured, you can launch Kythia.
Runs the bot with automatic reloading.
npm run dev
Recommended for 24/7 hosting using PM2.
npm run pm2:startup
# Managed via the Kythia CLI
npx kythia pm2 start
Troubleshooting
If you encounter issues during setup:
- Double-check your
.envvalues (especially the database connection). - Ensure your Discord Bot has the necessary Intents enabled in the Developer Portal.
- Join our Discord Support Server for help.