93 lines
3.3 KiB
Bash
93 lines
3.3 KiB
Bash
# --- server ---
|
|
# development locally; the NixOS module sets production (gates DRIVER_DEBUG).
|
|
NODE_ENV=development
|
|
PORT=3000
|
|
HOST=127.0.0.1
|
|
# ADMIN access key (plain). This is the admin account's key — it manages all
|
|
# other No-KYC accounts from the web UI (Accounts panel).
|
|
# Generate: openssl rand -base64 24
|
|
APP_PASSWORD=change-me
|
|
# Session TTL in hours (Bearer token stored in localStorage, no cookies)
|
|
SESSION_TTL_HOURS=720
|
|
# Data dir: holds kisassistant.db (SQLite: users, sessions, chats, shares)
|
|
DATA_DIR=./data
|
|
# Postgres fallback (typically a docker container). Empty = local SQLite.
|
|
# Example: POSTGRESQL_URL=postgres://kisassistant:secret@localhost:5432/kisassistant
|
|
POSTGRESQL_URL=
|
|
# Local file CDN (avatars). NixOS module points it under the state dir.
|
|
CDN_DIR=./cdn
|
|
# Local file CDN (avatars today, more namespaces tomorrow).
|
|
# Dev default is a folder next to the codebase; NixOS points it under state dir.
|
|
CDN_DIR=./cdn
|
|
|
|
# --- platform tools: OCR (tesseract binary) ---
|
|
# TESSERACT_BIN=/nix/store/…-tesseract-5.5.3/bin/tesseract
|
|
OCR_LANG=eng
|
|
OCR_MAX_CHARS=100000
|
|
|
|
# --- platform tools: neural TTS (first configured wins, TTS_PROVIDER forces one) ---
|
|
# ElevenLabs (most natural): https://elevenlabs.io/app/settings/api-keys
|
|
#ELEVENLABS_API_KEY=
|
|
#ELEVENLABS_VOICE=
|
|
# OpenAI (reuses the LLM key when set, tts-1 + alloy/echo/fable/onyx/nova/shimmer)
|
|
#OPENAI_API_KEY=
|
|
#TTS_VOICE=alloy
|
|
# Local piper (offline, like tesseract): PIPER_BIN + onnx model
|
|
#PIPER_BIN=piper
|
|
#PIPER_MODEL=/var/lib/kisassistant/piper/en_US-lessac-medium.onnx
|
|
# Test/development overrides (base URLs, default = api.elevenlabs.io / api.openai.com)
|
|
#ELEVENLABS_BASE_URL=
|
|
#OPENAI_BASE_URL=
|
|
#TTS_PROVIDER=auto
|
|
|
|
# Per-driver debug logging to stdout ([driver:name] lines).
|
|
DRIVER_DEBUG=true
|
|
|
|
# Public docs wiki (Gitea wiki pages of this repo). GET /wiki redirects here.
|
|
WIKI_URL=https://git.kisakay.com/k/chat/wiki
|
|
|
|
# --- key recovery via email (optional — empty SMTP_HOST disables it) ---
|
|
SMTP_HOST=
|
|
SMTP_PORT=587
|
|
SMTP_SECURE=false
|
|
SMTP_USER=
|
|
SMTP_PASS=
|
|
SMTP_FROM=KisAssistant <[email protected]>
|
|
APP_URL=http://localhost:3000
|
|
RESET_TTL_MIN=60
|
|
|
|
# --- rate limit on /api/auth/login (per IP, sliding window) ---
|
|
RATE_LIMIT_MAX=5
|
|
RATE_LIMIT_WINDOW_MIN=10
|
|
|
|
# --- drivers ---
|
|
# Priority (global): ollama -> mistral -> glm -> arcaic -> deepseek -> anthropic -> openai
|
|
OLLAMA_HOST=http://10.66.66.4:11434
|
|
OLLAMA_ENABLED=true
|
|
# Stubs below: leave empty to keep disabled. Implemented last per spec.
|
|
MISTRAL_API_KEY=
|
|
MISTRAL_ENABLED=false
|
|
# GLM (Zhipu AI, OpenAI-compatible). Key from https://z.ai ; mainland China
|
|
# users point GLM_BASE_URL at https://open.bigmodel.cn/api/paas/v4 instead.
|
|
GLM_API_KEY=
|
|
GLM_ENABLED=false
|
|
# GLM_BASE_URL=https://api.z.ai/api/paas/v4
|
|
DEEPSEEK_API_KEY=
|
|
DEEPSEEK_ENABLED=false
|
|
ANTHROPIC_API_KEY=
|
|
ANTHROPIC_ENABLED=false
|
|
OPENAI_API_KEY=
|
|
OPENAI_ENABLED=false
|
|
# Gemini (Google AI, OpenAI-compatible endpoint). Key from https://aistudio.google.com/apikey
|
|
GEMINI_API_KEY=
|
|
GEMINI_ENABLED=false
|
|
# Arcaic backend (headless browser, throwaway profile per process).
|
|
# Every process launch creates a throwaway Firefox profile (deleted on exit).
|
|
ARCAIC_ENABLED=false
|
|
ARCAIC_EXECUTABLE=firefox
|
|
# Headless by default; set to false to watch the window (debugging, or if a
|
|
# manual login is ever required).
|
|
ARCAIC_HEADLESS=true
|
|
ARCAIC_LOGIN_TIMEOUT_S=300
|
|
ARCAIC_RESPONSE_TIMEOUT_S=300
|