Get your own instance of Niko up and running in a few straightforward steps. Because Niko is fully self-hosted, you own every piece of the setup — your token, your AI provider, your data. The steps below take you from a fresh machine to an active bot in your Discord server.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/developer51709/Niko/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before you begin, make sure you have the following ready:
- Python 3.10 or higher installed on your machine. Verify with
python --version. - A Discord account and a bot application created in the Discord Developer Portal.
- A bot token copied from your application’s Bot page.
| Intent | Why Niko needs it |
|---|---|
| Message Content Intent | Read message text for prefix commands and AI mentions |
| Server Members Intent | Track joins/leaves for onboarding, leveling, and logging |
| Presence Intent | Display accurate member presence information |
Install Dependencies
Install all required Python packages from the lockfile:Key packages that will be installed:
| Package | Purpose |
|---|---|
discord.py>=2.7.1 | Discord gateway and slash-command framework |
wavelink | Lavalink client for music streaming |
openai | OpenAI-compatible AI chat and image generation |
pillow | PIL image card rendering (economy, casino, music) |
flask | Static web server for the landing page |
aiosqlite | Async SQLite for giveaway data |
deep-translator | Automatic EN / DE / ES translation |
spotipy | Spotify metadata resolution |
Configure Environment
Copy the example environment file to create your local configuration:Open The following variables are optional but let you enable or customise features:
src/.env and fill in at minimum the one required variable:Required variables
Optional variables
Run the Bot
Start Niko from the repository root:On the first run, Niko will:
- Connect to the Discord gateway using your token.
- Automatically discover and load all cogs from
src/cogs/. - Sync all 76 slash commands globally — this can take up to an hour to propagate across Discord’s infrastructure, though it is usually much faster.
Invite Niko to Your Server
Generate an invite URL from the Discord Developer Portal:
- Open your application → OAuth2 → URL Generator.
- Under Scopes, check
botandapplications.commands. - Under Bot Permissions, select the permissions your server needs (at minimum: Send Messages, Embed Links, Read Message History, Use Slash Commands, Connect, Speak for music).
- Copy the generated URL, open it in a browser, and select your server.
Verify It Works
Once Niko is online in your server, confirm everything is working:
- Type
/helpto open the interactive help panel — this confirms slash commands synced correctly. @mentionNiko in any channel to start an AI conversation — this confirms your AI credentials are valid.- Run
!levelpanelto open the leveling configuration dashboard for your server. - Run
!automodto open the AutoMod setup panel and configure filters per-guild.
Music requires a Lavalink node. The
/play command and all other music features connect to an external Lavalink server via wavelink. You will need to run your own Lavalink instance (or use a public node) and configure its host, port, and password before music commands will work.