Files
agent-desk-ng/.env.example

121 lines
5.2 KiB
Plaintext

# ==============================================================================
# AgentDesk Environment Variables Configuration
# Copy this file to .env and adjust the configuration values as needed.
# ==============================================================================
# Server Configuration
PORT=8083
COMPANY_NAME=
COMPANY_LOGO_URL=
# AGENT_DESK_SERVER_CORS_ALLOWEDORIGINS="http://localhost:3000,http://127.0.0.1:8083"
# Client IP resolution.
# Gin defaults to trusting every proxy, which makes X-Forwarded-For authoritative:
# any caller could then choose the IP recorded in the login credential log and in
# user.last_login_ip, and any IP-keyed rate limit or lockout would be bypassable.
# Unset, trustedProxies falls back to the loopback / RFC1918 / IPv6 unique-local /
# link-local ranges, which already covers a cloudflared sidecar on a compose
# network. Set trustedPlatform when an edge overwrites the header instead of
# appending to it - Cloudflare does, and CF-Connecting-IP is not client-forgeable.
# TRUSTED_PROXIES="10.0.0.0/8,172.16.0.0/12"
TRUSTED_PLATFORM=cloudflare
# Rate limiting for the public, unauthenticated endpoints (login, support
# registration, widget session exchange, message uploads, doc feedback). Enabled
# by default; the counters are per process. Channel webhooks, websockets and the
# authenticated dashboard are deliberately exempt.
# RATE_LIMIT_ENABLED=true
# RATE_LIMIT_WINDOW_SECONDS=60
# Database Configuration
# Driver options: sqlite, mysql, postgres
DB_TYPE=sqlite
DATABASE_URL=file:./data/app.db?_busy_timeout=5000
# MySQL example:
# DATABASE_URL="cs_ai_agent:cs_ai_agent_password@tcp(127.0.0.1:3306)/cs_ai_agent?charset=utf8mb4&parseTime=True&multiStatements=true&loc=Local"
# PostgreSQL example:
# DATABASE_URL="postgres://postgres:password@127.0.0.1:5432/cs_ai_agent?sslmode=disable"
# Auth & Security
PASSWORD_LOGIN_ENABLED=true
# AUTH_TOKEN_TTL_HOURS=12
# CUSTOMER_SESSION_SECRET=replace-with-a-random-secret-at-least-32-chars
# Widget visitor identity. Shared, deployment-wide secret a host platform uses to
# sign the external visitor ID it passes to the widget:
# signature = hex(HMAC-SHA256(secret, channelId + "\n" + externalId + "\n" + issuedAt))
# with issuedAt in unix seconds, sent as externalIdSignature +
# externalIdSignedAt (or X-External-Id-Signature + X-External-Id-Signed-At).
# Unset (the default) disables it: unsigned visitors are anonymous guests, which
# is the existing behaviour.
# IDENTITY_HMAC_SECRET=replace-with-a-random-secret-at-least-32-chars
# How long a signed identity stays acceptable, in minutes. Bounds replay of a
# leaked signature. Defaults to 1440 (24 hours).
# IDENTITY_SIGNATURE_MAX_AGE_MINUTES=1440
# How many not-yet-closed conversations one visitor may have at a time. Each open
# conversation is real agent work, and in human-only mode opening one dispatches
# an agent immediately, so this caps how much a single caller can queue. Unset or
# 0 means 3; use -1 for no cap.
# CONVERSATION_CUSTOMER_MAX_OPEN=3
# How long a chat still counts as being watched, in minutes. An email arriving
# during a live chat is appended to that chat instead of starting an email
# thread. Unset or 0 means 30.
# CONVERSATION_EMAIL_CHAT_LIVE_MINUTES=30
# Storage (local or oss)
STORAGE_DEFAULT=local
STORAGE_LOCAL_ROOT=data/storage
STORAGE_LOCAL_BASE_URL=/storage
# Vector Database (Qdrant)
VECTOR_DB_TYPE=qdrant
QDRANT_HOST=127.0.0.1
QDRANT_GRPC_PORT=6334
# QDRANT_API_KEY=
# Single Sign-On (OIDC / OAuth 2.0)
# OIDC_ENABLED=true
# OIDC_ISSUER=https://auth.example.com
# OIDC_CLIENT_ID=your-client-id
# OIDC_CLIENT_SECRET=your-client-secret
# OIDC_REDIRECT_URL=http://localhost:8083/api/auth/oidc_callback
# Webhook & Organization Sync
# ORG_SYNC_SECRET=your-webhook-hmac-secret
# Email Channel & Delivery (inbound webhook ingestion + outbound sending)
# System-level defaults, used when a channel does not carry its own provider settings.
# Provider options: smtp, brevo, sendgrid, resend, postmark, mailgun
# EMAIL_PROVIDER=brevo
# EMAIL_FROM=support@example.com
# EMAIL_FROM_NAME="Support Team"
# EMAIL_API_KEY=your-provider-api-key
# Inbound Webhook Authentication Secret (Header: X-Webhook-Secret)
# EMAIL_INBOUND_SECRET=your-inbound-webhook-secret
#
# Custom SMTP server (when EMAIL_PROVIDER=smtp):
# SMTP_HOST=smtp.example.com
# SMTP_PORT=587
# SMTP_USER=your-smtp-username
# SMTP_PASSWORD=your-smtp-password
# SMTP_USE_TLS=true
# Accept a self-signed certificate and skip opportunistic STARTTLS, so a channel can be
# bound to a local test SMTP server (Mailpit, MailHog). Weakens transport
# security: never enable it for a real mailbox.
# SMTP_ALLOW_INSECURE=false
# Discord Bot Channel
# Deployment-wide bot token, used when a Discord channel does not carry its own.
# DISCORD_BOT_TOKEN=your-discord-bot-token
# DISCORD_CLIENT_ID=your-discord-application-id
# DISCORD_CLIENT_SECRET=your-discord-client-secret
# DISCORD_PUBLIC_KEY=your-discord-application-public-key
# Slack deployment-wide app credentials. When a Slack channel leaves its bot
# token empty the deployment-wide one is used, so one shared app can serve
# every Slack workspace the desk supports.
# SLACK_CLIENT_ID=your-slack-client-id
# SLACK_CLIENT_SECRET=your-slack-client-secret
# SLACK_BOT_TOKEN=xoxb-your-slack-bot-token
# SLACK_SIGNING_SECRET=your-slack-signing-secret