Description: This commit introduces two main improvements to the SMB connector and LiteLLM configuration: Configuration Security & Flexibility: Refactored litellm-config.yaml to replace hardcoded API base URLs with the INFOMANIAK_BASE environment variable. Updated .env.example to include the new INFOMANIAK_BASE variable, ensuring a consistent and secure configuration management strategy. Added a new embedding model configuration (LivQwenEmbed) to the LiteLLM setup. Enhanced File Type Support: Extended the extract.py script to support a wider range of text-based IT file formats, including yaml, yml, json, xml, ini, conf, cfg, sh, bash, ps1, py, sql, log, dockerfile, properties, toml, rst, mjs, patch, and tsx.
356 lines
No EOL
14 KiB
Text
356 lines
No EOL
14 KiB
Text
# Copy this file to .env so it's picked up by the docker compose yaml files
|
|
# Uncomment the values you would like to set
|
|
# No edits necessary, works out of the box
|
|
|
|
|
|
################################################################################
|
|
## COMMONLY MODIFIED CONFIGURATIONS
|
|
################################################################################
|
|
## Version of Onyx to deploy, default is latest (main built nightly).
|
|
## Craft uses this same tag for the sandbox image; do not set a separate
|
|
## sandbox image for normal deployments.
|
|
IMAGE_TAG=latest
|
|
|
|
## Onyx Craft Configuration (off by default).
|
|
## When enabling Craft through install.sh --include-craft or by manually adding
|
|
## docker-compose.craft.yml, the sandbox image follows IMAGE_TAG above.
|
|
# ENABLE_CRAFT=true
|
|
#
|
|
## docker backend drives sandboxes via the host Docker socket (root-equivalent;
|
|
## trusted hosts only) and needs v4.0.6+ images. install.sh picks docker vs
|
|
## kubernetes by image tag.
|
|
# SANDBOX_BACKEND=docker
|
|
#
|
|
## SANDBOX_API_SERVER_URL must be a *public* HTTPS URL the sandbox can reach
|
|
## the same way any other Onyx client does — internal compose hostnames like
|
|
## "http://api_server:8080" do not resolve from inside the sandbox bridge.
|
|
# SANDBOX_API_SERVER_URL=https://onyx.your-org.example
|
|
#
|
|
## Sandbox bridge network. Created by install.sh (or manually:
|
|
## docker network create onyx_craft_sandbox
|
|
## Sandboxes join only this network — they cannot reach postgres, redis,
|
|
## minio, or any other compose service by name.
|
|
# SANDBOX_DOCKER_NETWORK=onyx_craft_sandbox
|
|
#
|
|
## Per-sandbox container resource limits. Defaults match K8s pod *requests*
|
|
## (1 CPU / 2Gi), not its limits (2 CPU / 10Gi), since single-VM compose
|
|
## deployments rarely have headroom to over-commit every sandbox.
|
|
# SANDBOX_DOCKER_MEMORY_LIMIT=2g
|
|
# SANDBOX_DOCKER_CPU_LIMIT=1.0
|
|
#
|
|
## EC2 IMDS note: on EC2 the Docker daemon's default bridge allows traffic to
|
|
## 169.254.169.254 (Instance Metadata Service), which can hand out IAM role
|
|
## credentials. The fix is a host-level DOCKER-USER iptables rule that drops
|
|
## bridge traffic to that address. install.sh --include-craft installs this
|
|
## rule automatically when it has sudo/iptables access, and prints manual
|
|
## instructions otherwise.
|
|
|
|
## Auth Settings
|
|
### https://docs.onyx.app/deployment/authentication
|
|
AUTH_TYPE=oidc
|
|
SESSION_EXPIRE_TIME_SECONDS=604800 # 7 days
|
|
AUTH_COOKIE_EXPIRE_TIME_SECONDS=604800 # 7 days
|
|
### Signs password reset, email verification, OAuth login state, and captcha cookies.
|
|
### REQUIRED: the API server refuses to start with an empty value (secure by default).
|
|
### If using install.sh this is auto-generated; if setting manually, run: openssl rand -hex 32
|
|
USER_AUTH_SECRET=$(openssl rand -hex 16)
|
|
### Recommend to set this for security
|
|
ENCRYPTION_KEY_SECRET=$(openssl rand -hex 32)
|
|
### Bearer token for the API server's /metrics endpoint. Auth is REQUIRED by
|
|
### default: scrapers must send `Authorization: Bearer <token>` (Prometheus
|
|
### scrape config: `authorization`). If you set neither this token nor
|
|
### DISABLE_METRICS_AUTH, /metrics is locked (returns 401).
|
|
METRICS_AUTH_TOKEN=$(openssl rand -hex 32)
|
|
### Set to "true" to expose /metrics with NO authentication (explicit opt-out).
|
|
# DISABLE_METRICS_AUTH=
|
|
### Set to "true" to expose the interactive API docs and schema (/openapi.json,
|
|
### /docs, /redoc) publicly with NO authentication. Off by default so the API
|
|
### surface is not exposed; when off these routes are not registered (404).
|
|
# ENABLE_PUBLIC_DOCS=
|
|
### Optional
|
|
# API_KEY_HASH_ROUNDS=
|
|
### You can add a comma separated list of domains like onyx.app, only those domains will be allowed to signup/log in
|
|
# VALID_EMAIL_DOMAINS=
|
|
### Set to "true" to restrict GET /users to admins. Non-admins can't enumerate
|
|
### accounts or share agents with individual users; group sharing still works.
|
|
# USER_DIRECTORY_ADMIN_ONLY=
|
|
|
|
## Chat Configuration
|
|
# HARD_DELETE_CHATS=
|
|
# MAX_ALLOWED_UPLOAD_SIZE_MB=250
|
|
# Default per-user upload size limit (MB) when no admin value is set.
|
|
# Automatically clamped to MAX_ALLOWED_UPLOAD_SIZE_MB at runtime.
|
|
# DEFAULT_USER_FILE_MAX_UPLOAD_SIZE_MB=100
|
|
|
|
## Base URL for redirects
|
|
WEB_DOMAIN=
|
|
FQDN=
|
|
## Set to false to let any origin embed Onyx in an <iframe>, disabling
|
|
## clickjacking protection. Protected by default.
|
|
# WEB_FRAME_PROTECTION_ENABLED=false
|
|
|
|
## Enterprise Features, requires a paid plan and licenses
|
|
ENABLE_PAID_ENTERPRISE_EDITION_FEATURES=false
|
|
|
|
|
|
################################################################################
|
|
## SERVICES CONFIGURATIONS
|
|
################################################################################
|
|
## Database Configuration
|
|
POSTGRES_USER=onyx-admin
|
|
POSTGRES_PASSWORD=$(openssl rand -hex 16)
|
|
POSTGRES_API_SERVER_POOL_SIZE=30 # Tune for your load
|
|
POSTGRES_API_SERVER_POOL_OVERFLOW=10
|
|
POSTGRES_TCP_KEEPALIVES=1 # Enable keepalives
|
|
POSTGRES_TCP_KEEPALIVES_IDLE=60 # 60 seconds idle
|
|
POSTGRES_TCP_KEEPALIVES_INTERVAL=10 # 10 seconds between probes
|
|
POSTGRES_TCP_KEEPALIVES_COUNT=5 # 5 probes before disconnect
|
|
# POSTGRES_DB=
|
|
# POSTGRES_DEFAULT_SCHEMA=
|
|
# POSTGRES_USE_NULL_POOL=
|
|
# POSTGRES_API_SERVER_POOL_SIZE=
|
|
# POSTGRES_API_SERVER_POOL_OVERFLOW
|
|
# POSTGRES_IDLE_SESSIONS_TIMEOUT=
|
|
# POSTGRES_POOL_RECYCLE=
|
|
# Client-side TCP keepalives for the sync engine (sent on idle sockets to
|
|
# stop PgBouncer / NLB from silently closing them). Enabled by default.
|
|
# POSTGRES_TCP_KEEPALIVES=
|
|
# POSTGRES_TCP_KEEPALIVES_IDLE=
|
|
# POSTGRES_TCP_KEEPALIVES_INTERVAL=
|
|
# POSTGRES_TCP_KEEPALIVES_COUNT=
|
|
# DB_READONLY_USER=
|
|
# DB_READONLY_PASSWORD=
|
|
|
|
## File Store Backend: "s3" (default, uses MinIO) or "postgres" (no extra services needed)
|
|
## COMPOSE_PROFILES activates the MinIO service. To use PostgreSQL file storage instead,
|
|
## remove s3-filestore from COMPOSE_PROFILES and set FILE_STORE_BACKEND=postgres.
|
|
COMPOSE_PROFILES=s3-filestore
|
|
FILE_STORE_BACKEND=s3
|
|
|
|
## MinIO/S3 Configuration (only needed when FILE_STORE_BACKEND=s3)
|
|
## SECURITY: minioadmin is a local-dev default. install.sh randomizes it; if you
|
|
## edit .env by hand, change all four values before production. Keep the S3_AWS_*
|
|
## pair identical to MINIO_ROOT_* (the app uses MinIO's root creds).
|
|
S3_ENDPOINT_URL=
|
|
S3_REGION=us-east-1
|
|
S3_AWS_ACCESS_KEY_ID=
|
|
S3_AWS_SECRET_ACCESS_KEY=
|
|
S3_FILE_STORE_BUCKET_NAME=
|
|
#MINIO_ROOT_USER=
|
|
#MINIO_ROOT_PASSWORD=
|
|
|
|
## GCS Configuration (only needed when FILE_STORE_BACKEND=gcs)
|
|
## No sidecar container needed — GCS is a managed service.
|
|
## Remove s3-filestore from COMPOSE_PROFILES when using FILE_STORE_BACKEND=gcs.
|
|
## By default, Application Default Credentials (ADC) are used, which supports
|
|
## GKE Workload Identity, Compute Engine instance SA, and gcloud CLI auth.
|
|
# FILE_STORE_BACKEND=gcs
|
|
# GCS_FILE_STORE_BUCKET_NAME=your-gcs-bucket-name
|
|
# GCS_FILE_STORE_PREFIX=onyx-files
|
|
# GCS_PROJECT_ID=your-gcp-project
|
|
# GCS_SERVICE_ACCOUNT_KEY_PATH=/path/to/service-account-key.json
|
|
# GCS_SERVICE_ACCOUNT_KEY_JSON=
|
|
|
|
## Nginx Proxy Timeout Configuration (in seconds)
|
|
## These settings control how long nginx waits for upstream servers (api_server/web_server)
|
|
## Increase these values if you experience timeout errors with long-running requests
|
|
NGINX_PROXY_CONNECT_TIMEOUT=600 # 10 minutes (complex AI queries)
|
|
NGINX_PROXY_SEND_TIMEOUT=600
|
|
NGINX_PROXY_READ_TIMEOUT=600
|
|
|
|
## MCP Server Configuration
|
|
## The MCP (Model Context Protocol) server allows external MCP clients to interact with Onyx
|
|
## Set to true to enable the MCP server (disabled by default)
|
|
# MCP_SERVER_ENABLED=false
|
|
## Port for the MCP server (defaults to 8090)
|
|
# MCP_SERVER_PORT=8090
|
|
## CORS origins for MCP clients (comma-separated list)
|
|
# MCP_SERVER_CORS_ORIGINS=
|
|
|
|
## Discord Bot Configuration
|
|
## The Discord bot allows users to interact with Onyx from Discord servers
|
|
## Bot token from Discord Developer Portal (required to enable the bot)
|
|
# DISCORD_BOT_TOKEN=
|
|
## Command prefix for bot commands (default: "!")
|
|
# DISCORD_BOT_INVOKE_CHAR=!
|
|
|
|
## Celery Configuration
|
|
CELERY_BROKER_POOL_LIMIT=0
|
|
CELERY_WORKER_DOCFETCHING_CONCURRENCY=2
|
|
CELERY_WORKER_DOCPROCESSING_CONCURRENCY=1
|
|
CELERY_WORKER_LIGHT_CONCURRENCY=4
|
|
CELERY_WORKER_LIGHT_PREFETCH_MULTIPLIER=1
|
|
|
|
## AWS Configuration
|
|
# AWS_ACCESS_KEY_ID=
|
|
# AWS_SECRET_ACCESS_KEY=
|
|
# AWS_REGION_NAME=
|
|
# Set to true when using IAM authentication for Postgres connections.
|
|
USE_IAM_AUTH=false
|
|
|
|
|
|
################################################################################
|
|
## DEVELOPER, DEBUGGING, AND LOGGING
|
|
################################################################################
|
|
## Logging and Telemetry
|
|
# LOG_LEVEL is the global knob for log verbosity across every Onyx process:
|
|
# api_server, web_server, model servers, slack/discord bots, AND all Celery
|
|
# workers (primary, light, heavy, docprocessing, docfetching, monitoring,
|
|
# scheduled_tasks, user_file_processing, beat). For per-worker overrides,
|
|
# explicitly add `--loglevel=<value>` to that worker's command in
|
|
# backend/supervisord.conf — an explicit CLI flag takes precedence over
|
|
# LOG_LEVEL inside the worker process.
|
|
LOG_LEVEL=info
|
|
LOG_ONYX_MODEL_INTERACTIONS=False
|
|
# LOG_VESPA_TIMING_INFORMATION=
|
|
# LOG_ENDPOINT_LATENCY=
|
|
# LOG_POSTGRES_LATENCY=
|
|
# LOG_POSTGRES_CONN_COUNTS=
|
|
DISABLE_TELEMETRY=true
|
|
|
|
## Feature Flags
|
|
SHOW_EXTRA_CONNECTORS=true
|
|
# DISABLE_MODEL_SERVER=false
|
|
|
|
## Analytics
|
|
# SENTRY_DSN=
|
|
|
|
## Demo/Testing
|
|
# MOCK_CONNECTOR_FILE_PATH=
|
|
|
|
|
|
################################################################################
|
|
## ADVANCED CONFIGURATIONS
|
|
################################################################################
|
|
## SlackBot Configuration
|
|
# ONYX_BOT_DISABLE_DOCS_ONLY_ANSWER=
|
|
# ONYX_BOT_FEEDBACK_VISIBILITY=
|
|
# ONYX_BOT_DISPLAY_ERROR_MSGS=
|
|
# NOTIFY_SLACKBOT_NO_ANSWER=
|
|
# ONYX_BOT_MAX_QPM=
|
|
# ONYX_BOT_MAX_WAIT_TIME=
|
|
|
|
## Advanced Auth Settings
|
|
# GOOGLE_OAUTH_CLIENT_ID=
|
|
# GOOGLE_OAUTH_CLIENT_SECRET=
|
|
# REQUIRE_EMAIL_VERIFICATION=
|
|
# SMTP_SERVER=
|
|
# SMTP_PORT=
|
|
# SMTP_USER= # Optional - omit for unauthenticated relays
|
|
# SMTP_PASS= # Optional - omit for unauthenticated relays
|
|
# SMTP_STARTTLS=true # Set to "false" for servers that don't support TLS
|
|
# ENABLE_EMAIL_INVITES=
|
|
# EMAIL_FROM= # Required when SMTP_USER is not set
|
|
# EMAIL_ARCHIVE_BCC_ADDRESSES= # Optional comma-separated BCC archive recipients for all emails
|
|
OAUTH_CLIENT_ID=
|
|
OAUTH_CLIENT_SECRET=
|
|
OPENID_CONFIG_URL=
|
|
OIDC_PKCE_ENABLED=true
|
|
TRACK_EXTERNAL_IDP_EXPIRY=true
|
|
OIDC_SCOPE_OVERRIDE=openid,email,profile,offline_access
|
|
# Comma-separated list of origins allowed to make cross-origin (CORS) requests,
|
|
# e.g. "https://onyx.example.com". When unset, all origins are allowed but
|
|
# credentialed (cookie-authenticated) cross-origin requests are disabled.
|
|
CORS_ALLOWED_ORIGIN=
|
|
# INTEGRATION_TESTS_MODE=
|
|
# JWT_PUBLIC_KEY_URL=
|
|
|
|
## Gen AI Settings
|
|
GEN_AI_MAX_TOKENS=250000
|
|
LLM_SOCKET_READ_TIMEOUT=600
|
|
# MAX_CHUNKS_FED_TO_CHAT=
|
|
DISABLE_LITELLM_STREAMING=false
|
|
# LITELLM_EXTRA_HEADERS=
|
|
# GEN_AI_API_KEY=
|
|
GENERATIVE_MODEL_ACCESS_CHECK_FREQ=300 # 5 minutes
|
|
LITELLM_CUSTOM_ERROR_MESSAGE_MAPPINGS={"RateLimitError":"Service is temporarily busy. Please try again in a moment.","Timeout":"Request took too long. Please try with a shorter query.","AuthenticationError":"AI service authentication failed. Contact your administrator.","Interna
|
|
|
|
|
|
## Query Options
|
|
# DOC_TIME_DECAY=
|
|
# HYBRID_ALPHA=
|
|
# EDIT_KEYWORD_QUERY=
|
|
# USE_SEMANTIC_KEYWORD_EXPANSIONS_BASIC_SEARCH=
|
|
|
|
## Model Configuration
|
|
# EMBEDDING_BATCH_SIZE=
|
|
# DOCUMENT_ENCODER_MODEL=
|
|
# DOC_EMBEDDING_DIM=
|
|
# NORMALIZE_EMBEDDINGS=
|
|
# ASYM_QUERY_PREFIX=
|
|
# ASYM_PASSAGE_PREFIX=
|
|
# DISABLE_RERANK_FOR_STREAMING=
|
|
# MODEL_SERVER_PORT=
|
|
# INDEX_BATCH_SIZE=
|
|
# MIN_THREADS_ML_MODELS=
|
|
# CLIENT_EMBEDDING_TIMEOUT=
|
|
|
|
## Indexing Configuration
|
|
# VESPA_SEARCHER_THREADS=
|
|
# ENABLED_CONNECTOR_TYPES=
|
|
# DISABLE_INDEX_UPDATE_ON_SWAP=
|
|
# CONTINUE_ON_CONNECTOR_FAILURE=
|
|
# CONFLUENCE_CONNECTOR_LABELS_TO_SKIP=
|
|
# JIRA_CONNECTOR_LABELS_TO_SKIP=
|
|
# JIRA_SERVER_API_VERSION=
|
|
# JIRA_CLOUD_API_VERSION=
|
|
# GONG_CONNECTOR_START_TIME=
|
|
# NOTION_CONNECTOR_ENABLE_RECURSIVE_PAGE_LOOKUP=
|
|
# GITHUB_CONNECTOR_BASE_URL=
|
|
# MAX_DOCUMENT_CHARS=
|
|
# MAX_FILE_SIZE_BYTES=
|
|
|
|
## OAuth Connector Configs
|
|
# EGNYTE_CLIENT_ID=
|
|
# EGNYTE_CLIENT_SECRET=
|
|
# EGNYTE_LOCALHOST_OVERRIDE=
|
|
# LINEAR_CLIENT_ID=
|
|
# LINEAR_CLIENT_SECRET=
|
|
|
|
## Miscellaneous
|
|
# ONYX_QUERY_HISTORY_TYPE=
|
|
# Hide the Query History page from the admin sidebar (visibility-only; the history
|
|
# APIs + recording keep working, unlike ONYX_QUERY_HISTORY_TYPE=disabled).
|
|
# HIDE_QUERY_HISTORY_FROM_ADMIN_PANEL=true
|
|
# CHECK_TTL_MANAGEMENT_TASK_FREQUENCY_IN_HOURS=
|
|
# VESPA_LANGUAGE_OVERRIDE=
|
|
|
|
## Frontend Configs
|
|
# THEME_IS_DARK=
|
|
# NEXT_PUBLIC_DISABLE_LOGOUT=
|
|
# NEXT_PUBLIC_FORGOT_PASSWORD_ENABLED=
|
|
# NEXT_PUBLIC_THEME=
|
|
# NEXT_PUBLIC_DO_NOT_USE_TOGGLE_OFF_DANSWER_POWERED=
|
|
# NEXT_PUBLIC_CUSTOM_REFRESH_URL=
|
|
|
|
## Pointer to services
|
|
POSTGRES_HOST=relational_db
|
|
REDIS_HOST=cache
|
|
MODEL_SERVER_HOST=inference_model_server
|
|
INDEXING_MODEL_SERVER_HOST=indexing_model_server
|
|
INTERNAL_URL=http://api_server:8080
|
|
ENABLE_CONTEXTUAL_RAG=true
|
|
|
|
# =============================================================================
|
|
# LiteLLM Proxy Settings
|
|
# =============================================================================
|
|
LITELLM_MASTER_KEY=sk-$(openssl rand -hex 32)
|
|
LITELLM_SALT_KEY=$(openssl rand -hex 32)
|
|
DATABASE_URL=postgresql://llmproxy:${POSTGRES_PASSWORD}@litellm-db:5432/litellm
|
|
POSTGRES_PASSWORD=$(openssl rand -hex 16)
|
|
INFOMANIAK_BASE=https://api.infomaniak.com/2/ai/XYZ/openai/v1
|
|
INFOMANIAK_API_KEY=
|
|
|
|
# =============================================================================
|
|
# DOCUMENT INGESTION CONFIGURATION
|
|
# =============================================================================
|
|
# Onyx Ingestion API Key (generate via Admin Panel -> Settings -> API Keys)
|
|
ONYX_INGESTION_API_KEY=your-api-key-here
|
|
# Connector Credential Pair ID (from Admin Panel -> Connectors)
|
|
# Get this from the URL: /admin/connector/<ID> -> cc_pair_id
|
|
ONYX_CC_PAIR_ID=243
|
|
# How often to check for new files (in seconds)
|
|
INGESTION_INTERVAL_SECONDS=300
|
|
# Host path to your SMB/network mount
|
|
# Example: /mnt/smb-share or /Volumes/network-drive
|
|
DOCUMENT_SOURCE_HOST_PATH=/opt/stacks/onyx/ingestion_data |