Environment Variables
Kowalski's configurable environment variables
Important
Take care of your .env file, as it is so much important and needs to be secret (like your passwords), as anyone can do whatever they want to the bot with this token!
Bot
General
| Variable | Required? | Description |
|---|---|---|
botSource | Yes | Put the link to your bot source code. |
botPrivacy | Yes | Put the link to your bot privacy policy. |
maxRetries | Yes | Maximum number of retries for a failing command on Kowalski. Default is 5. If the limit is hit, the bot will crash past this number. |
botToken | Yes | Put your bot token that you created at @BotFather. |
longerLogs | Yes | Set to true to enable verbose logging whenever possible. |
botAdmins | Yes | Put the ID of the people responsible for managing the bot. They can use some administrative + exclusive commands on any group. |
AI Features (optional)
| Variable | Required? | Description |
|---|---|---|
ollamaEnabled | No | Enables/disables AI features |
ollamaApi | No | Ollama API endpoint for various AI features, will be disabled if not set |
handlerTimeout | No | How long handlers will wait before timing out. Set this high if using large AI models. |
flashModel | No | Which model will be used for /ask |
thinkingModel | No | Which model will be used for /think |
updateEveryChars | No | The amount of characters until message update triggers (for streaming response) |
Data + Persistence
| Variable | Required? | Description |
|---|---|---|
databaseUrl | Yes | Database server configuration (see .env.example) |
valkeyBaseUrl | Yes | The hostname of your Valkey instance. |
valkeyPort | Yes | The port of your Valkey instance. |
API Keys
| Variable | Required? | Description |
|---|---|---|
lastKey | Yes | Last.fm API key, for use on lastfm.js functions, like see who is listening to what song and etc. |
weatherKey | Yes | Weather.com API key, used for the /weather command. |
Note
Further, advanced fine-tuning and configuration can be done in TypeScript with the files in the /config folder. See the Configuration Files page for more information.
WebUI
| Variable | Required? | Description |
|---|---|---|
botApiUrl | Yes | Likely will stay the same, but changes the API that the bot exposes |
databaseUrl | Yes | Database server configuration (see .env.example). Should match .env |
valkeyBaseUrl | Yes | The hostname of your Valkey instance. Should match .env |
valkeyPort | Yes | The port of your Valkey instance. Should match .env |
ratelimitSalt | Yes | The salt used for hashing IP addresses in Valkey. This should be changed in production. |
longerLogs | Yes | Set to true to enable verbose logging whenever possible. |