[GH-ISSUE #2901] [DOCS]: Update the docker/.env.example #1849

Closed
opened 2026-02-22 18:26:49 -05:00 by yindo · 1 comment
Owner

Originally created by @spencerthayer on GitHub (Dec 25, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2901

Originally assigned to: @shatfield4 on GitHub.

Description

The current .env.example file is missing several supported API keys and environment variables, and some existing variables lack detailed documentation. This makes it difficult for users to configure their AnythingLLM instances with all the supported LLM providers, integrations, and features. I propose updating the .env.example file to include all possible environment variables and improve the documentation for clarity.

Proposed Changes:

  1. Add Missing Environment Variables:

    • Deepseek API Key and Model Preference:

      # Deepseek
      DEEPSEEK_API_KEY=
      DEEPSEEK_MODEL_PREF=
      
    • GitHub API Key:

      # GitHub
      GITHUB_API_KEY=
      
    • xAI API Key and Model Preference:

      # xAI
      XAI_LLM_API_KEY=
      XAI_LLM_MODEL_PREF=
      
    • APIPie API Key and Model Preference:

      # APIPie
      APIPIE_LLM_API_KEY=
      APIPIE_LLM_MODEL_PREF=
      
    • Fireworks AI API Key and Model Preference:

      # Fireworks AI
      FIREWORKS_AI_LLM_API_KEY=
      FIREWORKS_AI_LLM_MODEL_PREF=
      
    • NVIDIA NIM API Key and Model Preference:

      # NVIDIA NIM
      NVIDIA_NIM_LLM_API_KEY=
      NVIDIA_NIM_LLM_MODEL_PREF=
      
    • Generic OpenAI Embedding API Key:

      # Generic OpenAI Embedding
      GENERIC_OPEN_AI_EMBEDDING_API_KEY=
      
    • Tavily API Key:

      # Tavily
      AGENT_TAVILY_API_KEY=
      
  2. Improve Documentation for Existing Variables:

    • Password Complexity Variables:

      # Password Complexity Settings
      # PASSWORDMINCHAR=8 # Minimum number of characters
      # PASSWORDMAXCHAR=250 # Maximum number of characters
      # PASSWORDLOWERCASE=1 # Minimum number of lowercase letters
      # PASSWORDUPPERCASE=1 # Minimum number of uppercase letters
      # PASSWORDNUMERIC=1 # Minimum number of numeric characters
      # PASSWORDSYMBOL=1 # Minimum number of symbols
      # PASSWORDREQUIREMENTS=4 # Minimum number of requirements to meet
      
    • Simple SSO Passthrough:

      # Enable simple SSO passthrough to pre-authenticate users from a third-party service.
      # See https://docs.anythingllm.com/configuration#simple-sso-passthrough for more information.
      # SIMPLE_SSO_ENABLED=1
      
    • LLM Provider Comments:
      Add detailed comments for each LLM provider (e.g., localai, ollama) to explain their usage.

    • Embedding Engine Comments:
      Add detailed comments for each embedding engine (e.g., litellm, generic-openai) to explain their usage.

    • Vector Database Comments:
      Add detailed comments for each vector database (e.g., qdrant, milvus) to explain their usage.

  3. Organize the File into Clear Sections:

    • Group related variables into sections (e.g., LLM Providers, Embedding Engines, Vector Databases, Agent Services) with clear headings and comments.

Benefits:

  • Users will have a complete reference for all supported environment variables.
  • Easier setup and configuration for new users.
  • Reduced confusion and support requests related to missing or undocumented environment variables.

Additional Notes:

  • This update should align with the existing codebase and documentation.
  • Consider adding a section in the main README or documentation that links to the .env.example file for easy reference.

Example of Updated .env.example File:

###########################################
######## General Configuration ############
###########################################
SERVER_PORT=3001
STORAGE_DIR="/app/server/storage"
UID='1000'
GID='1000'
# SIG_KEY='passphrase' # Please generate random string at least 32 chars long.
# SIG_SALT='salt' # Please generate random string at least 32 chars long.
# JWT_SECRET="my-random-string-for-seeding" # Only needed if AUTH_TOKEN is set. Please generate random string at least 12 chars long.

###########################################
######## LLM API Selection ################
###########################################
# OpenAI
# LLM_PROVIDER='openai'
# OPEN_AI_KEY=
# OPEN_MODEL_PREF='gpt-4o'

# Google Vertex AI
# LLM_PROVIDER='gemini'
# GEMINI_API_KEY=
# GEMINI_LLM_MODEL_PREF='gemini-pro'

# Azure OpenAI
# LLM_PROVIDER='azure'
# AZURE_OPENAI_ENDPOINT=
# AZURE_OPENAI_KEY=
# OPEN_MODEL_PREF='my-gpt35-deployment' # This is the "deployment" on Azure you want to use. Not the base model.
# EMBEDDING_MODEL_PREF='embedder-model' # This is the "deployment" on Azure you want to use for embeddings. Not the base model. Valid base model is text-embedding-ada-002

# Anthropic (Claude)
# LLM_PROVIDER='anthropic'
# ANTHROPIC_API_KEY=sk-ant-xxxx
# ANTHROPIC_MODEL_PREF='claude-2'

# Deepseek
# LLM_PROVIDER='deepseek'
# DEEPSEEK_API_KEY=
# DEEPSEEK_MODEL_PREF=

# xAI (Grok)
# LLM_PROVIDER='xai'
# XAI_LLM_API_KEY=
# XAI_LLM_MODEL_PREF=

# APIPie
# LLM_PROVIDER='apipie'
# APIPIE_LLM_API_KEY=
# APIPIE_LLM_MODEL_PREF=

# Fireworks AI
# LLM_PROVIDER='fireworksai'
# FIREWORKS_AI_LLM_API_KEY=
# FIREWORKS_AI_LLM_MODEL_PREF=

# NVIDIA NIM
# LLM_PROVIDER='nvidia-nim'
# NVIDIA_NIM_LLM_API_KEY=
# NVIDIA_NIM_LLM_MODEL_PREF=

# Other supported LLM providers (e.g., Cohere, Hugging Face, etc.)
# LLM_PROVIDER='cohere'
# COHERE_API_KEY=
# COHERE_MODEL_PREF='command-r'

# LLM_PROVIDER='huggingface'
# HUGGING_FACE_LLM_ENDPOINT=https://uuid-here.us-east-1.aws.endpoints.huggingface.cloud
# HUGGING_FACE_LLM_API_KEY=hf_xxxxxx
# HUGGING_FACE_LLM_TOKEN_LIMIT=8000

###########################################
######## Embedding API Selection ##########
###########################################
# OpenAI Embedding
# EMBEDDING_ENGINE='openai'
# OPEN_AI_KEY=sk-xxxx
# EMBEDDING_MODEL_PREF='text-embedding-ada-002'

# Azure OpenAI Embedding
# EMBEDDING_ENGINE='azure'
# AZURE_OPENAI_ENDPOINT=
# AZURE_OPENAI_KEY=
# EMBEDDING_MODEL_PREF='my-embedder-model' # This is the "deployment" on Azure you want to use for embeddings. Not the base model. Valid base model is text-embedding-ada-002

# Generic OpenAI Embedding
# EMBEDDING_ENGINE='generic-openai'
# GENERIC_OPEN_AI_EMBEDDING_API_KEY=
# EMBEDDING_MODEL_PREF='text-embedding-ada-002'
# EMBEDDING_MODEL_MAX_CHUNK_LENGTH=8192
# EMBEDDING_BASE_PATH='http://127.0.0.1:4000'
# GENERIC_OPEN_AI_EMBEDDING_MAX_CONCURRENT_CHUNKS=500

###########################################
######## Vector Database Selection ########
###########################################
# LanceDB
# VECTOR_DB="lancedb"

# Chroma
# VECTOR_DB="chroma"
# CHROMA_ENDPOINT='http://host.docker.internal:8000'
# CHROMA_API_HEADER="X-Api-Key"
# CHROMA_API_KEY="sk-123abc"

# Pinecone
# VECTOR_DB="pinecone"
# PINECONE_API_KEY=
# PINECONE_INDEX=

# Weaviate
# VECTOR_DB="weaviate"
# WEAVIATE_ENDPOINT="http://localhost:8080"
# WEAVIATE_API_KEY=

# Qdrant
# VECTOR_DB="qdrant"
# QDRANT_ENDPOINT="http://localhost:6333"
# QDRANT_API_KEY=

# Milvus
# VECTOR_DB="milvus"
# MILVUS_ADDRESS="http://localhost:19530"
# MILVUS_USERNAME=
# MILVUS_PASSWORD=

# Zilliz Cloud
# VECTOR_DB="zilliz"
# ZILLIZ_ENDPOINT="https://sample.api.gcp-us-west1.zillizcloud.com"
# ZILLIZ_API_TOKEN=api-token-here

# Astra DB
# VECTOR_DB="astra"
# ASTRA_DB_APPLICATION_TOKEN=
# ASTRA_DB_ENDPOINT=

###########################################
######## Agent Service Keys ###############
###########################################
# Google Search
# AGENT_GSE_KEY=
# AGENT_GSE_CTX=

# SearchApi.io
# AGENT_SEARCHAPI_API_KEY=
# AGENT_SEARCHAPI_ENGINE=google

# Serper.dev
# AGENT_SERPER_DEV_KEY=

# Bing Search
# AGENT_BING_SEARCH_API_KEY=

# Serply.io
# AGENT_SERPLY_API_KEY=

# SearXNG
# AGENT_SEARXNG_API_URL=

# Tavily
# AGENT_TAVILY_API_KEY=

###########################################
######## Other Configurations ############
###########################################
# Disable viewing chat history from the UI and frontend APIs.
# See https://docs.anythingllm.com/configuration#disable-view-chat-history for more information.
# DISABLE_VIEW_CHAT_HISTORY=1

# Enable simple SSO passthrough to pre-authenticate users from a third-party service.
# See https://docs.anythingllm.com/configuration#simple-sso-passthrough for more information.
# SIMPLE_SSO_ENABLED=1
Originally created by @spencerthayer on GitHub (Dec 25, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2901 Originally assigned to: @shatfield4 on GitHub. ### Description The current [.env.example](https://raw.githubusercontent.com/Mintplex-Labs/anything-llm/refs/heads/master/docker/.env.example) file is missing several supported API keys and environment variables, and some existing variables lack detailed documentation. This makes it difficult for users to configure their AnythingLLM instances with all the supported LLM providers, integrations, and features. I propose updating the [.env.example](https://raw.githubusercontent.com/Mintplex-Labs/anything-llm/refs/heads/master/docker/.env.example) file to include all possible environment variables and improve the documentation for clarity. **Proposed Changes:** 1. **Add Missing Environment Variables:** - **Deepseek API Key and Model Preference:** ```env # Deepseek DEEPSEEK_API_KEY= DEEPSEEK_MODEL_PREF= ``` - **GitHub API Key:** ```env # GitHub GITHUB_API_KEY= ``` - **xAI API Key and Model Preference:** ```env # xAI XAI_LLM_API_KEY= XAI_LLM_MODEL_PREF= ``` - **APIPie API Key and Model Preference:** ```env # APIPie APIPIE_LLM_API_KEY= APIPIE_LLM_MODEL_PREF= ``` - **Fireworks AI API Key and Model Preference:** ```env # Fireworks AI FIREWORKS_AI_LLM_API_KEY= FIREWORKS_AI_LLM_MODEL_PREF= ``` - **NVIDIA NIM API Key and Model Preference:** ```env # NVIDIA NIM NVIDIA_NIM_LLM_API_KEY= NVIDIA_NIM_LLM_MODEL_PREF= ``` - **Generic OpenAI Embedding API Key:** ```env # Generic OpenAI Embedding GENERIC_OPEN_AI_EMBEDDING_API_KEY= ``` - **Tavily API Key:** ```env # Tavily AGENT_TAVILY_API_KEY= ``` 2. **Improve Documentation for Existing Variables:** - **Password Complexity Variables:** ```env # Password Complexity Settings # PASSWORDMINCHAR=8 # Minimum number of characters # PASSWORDMAXCHAR=250 # Maximum number of characters # PASSWORDLOWERCASE=1 # Minimum number of lowercase letters # PASSWORDUPPERCASE=1 # Minimum number of uppercase letters # PASSWORDNUMERIC=1 # Minimum number of numeric characters # PASSWORDSYMBOL=1 # Minimum number of symbols # PASSWORDREQUIREMENTS=4 # Minimum number of requirements to meet ``` - **Simple SSO Passthrough:** ```env # Enable simple SSO passthrough to pre-authenticate users from a third-party service. # See https://docs.anythingllm.com/configuration#simple-sso-passthrough for more information. # SIMPLE_SSO_ENABLED=1 ``` - **LLM Provider Comments:** Add detailed comments for each LLM provider (e.g., `localai`, `ollama`) to explain their usage. - **Embedding Engine Comments:** Add detailed comments for each embedding engine (e.g., `litellm`, `generic-openai`) to explain their usage. - **Vector Database Comments:** Add detailed comments for each vector database (e.g., `qdrant`, `milvus`) to explain their usage. 3. **Organize the File into Clear Sections:** - Group related variables into sections (e.g., LLM Providers, Embedding Engines, Vector Databases, Agent Services) with clear headings and comments. **Benefits:** - Users will have a complete reference for all supported environment variables. - Easier setup and configuration for new users. - Reduced confusion and support requests related to missing or undocumented environment variables. **Additional Notes:** - This update should align with the existing codebase and documentation. - Consider adding a section in the main README or documentation that links to the `.env.example` file for easy reference. --- **Example of Updated `.env.example` File:** ```env ########################################### ######## General Configuration ############ ########################################### SERVER_PORT=3001 STORAGE_DIR="/app/server/storage" UID='1000' GID='1000' # SIG_KEY='passphrase' # Please generate random string at least 32 chars long. # SIG_SALT='salt' # Please generate random string at least 32 chars long. # JWT_SECRET="my-random-string-for-seeding" # Only needed if AUTH_TOKEN is set. Please generate random string at least 12 chars long. ########################################### ######## LLM API Selection ################ ########################################### # OpenAI # LLM_PROVIDER='openai' # OPEN_AI_KEY= # OPEN_MODEL_PREF='gpt-4o' # Google Vertex AI # LLM_PROVIDER='gemini' # GEMINI_API_KEY= # GEMINI_LLM_MODEL_PREF='gemini-pro' # Azure OpenAI # LLM_PROVIDER='azure' # AZURE_OPENAI_ENDPOINT= # AZURE_OPENAI_KEY= # OPEN_MODEL_PREF='my-gpt35-deployment' # This is the "deployment" on Azure you want to use. Not the base model. # EMBEDDING_MODEL_PREF='embedder-model' # This is the "deployment" on Azure you want to use for embeddings. Not the base model. Valid base model is text-embedding-ada-002 # Anthropic (Claude) # LLM_PROVIDER='anthropic' # ANTHROPIC_API_KEY=sk-ant-xxxx # ANTHROPIC_MODEL_PREF='claude-2' # Deepseek # LLM_PROVIDER='deepseek' # DEEPSEEK_API_KEY= # DEEPSEEK_MODEL_PREF= # xAI (Grok) # LLM_PROVIDER='xai' # XAI_LLM_API_KEY= # XAI_LLM_MODEL_PREF= # APIPie # LLM_PROVIDER='apipie' # APIPIE_LLM_API_KEY= # APIPIE_LLM_MODEL_PREF= # Fireworks AI # LLM_PROVIDER='fireworksai' # FIREWORKS_AI_LLM_API_KEY= # FIREWORKS_AI_LLM_MODEL_PREF= # NVIDIA NIM # LLM_PROVIDER='nvidia-nim' # NVIDIA_NIM_LLM_API_KEY= # NVIDIA_NIM_LLM_MODEL_PREF= # Other supported LLM providers (e.g., Cohere, Hugging Face, etc.) # LLM_PROVIDER='cohere' # COHERE_API_KEY= # COHERE_MODEL_PREF='command-r' # LLM_PROVIDER='huggingface' # HUGGING_FACE_LLM_ENDPOINT=https://uuid-here.us-east-1.aws.endpoints.huggingface.cloud # HUGGING_FACE_LLM_API_KEY=hf_xxxxxx # HUGGING_FACE_LLM_TOKEN_LIMIT=8000 ########################################### ######## Embedding API Selection ########## ########################################### # OpenAI Embedding # EMBEDDING_ENGINE='openai' # OPEN_AI_KEY=sk-xxxx # EMBEDDING_MODEL_PREF='text-embedding-ada-002' # Azure OpenAI Embedding # EMBEDDING_ENGINE='azure' # AZURE_OPENAI_ENDPOINT= # AZURE_OPENAI_KEY= # EMBEDDING_MODEL_PREF='my-embedder-model' # This is the "deployment" on Azure you want to use for embeddings. Not the base model. Valid base model is text-embedding-ada-002 # Generic OpenAI Embedding # EMBEDDING_ENGINE='generic-openai' # GENERIC_OPEN_AI_EMBEDDING_API_KEY= # EMBEDDING_MODEL_PREF='text-embedding-ada-002' # EMBEDDING_MODEL_MAX_CHUNK_LENGTH=8192 # EMBEDDING_BASE_PATH='http://127.0.0.1:4000' # GENERIC_OPEN_AI_EMBEDDING_MAX_CONCURRENT_CHUNKS=500 ########################################### ######## Vector Database Selection ######## ########################################### # LanceDB # VECTOR_DB="lancedb" # Chroma # VECTOR_DB="chroma" # CHROMA_ENDPOINT='http://host.docker.internal:8000' # CHROMA_API_HEADER="X-Api-Key" # CHROMA_API_KEY="sk-123abc" # Pinecone # VECTOR_DB="pinecone" # PINECONE_API_KEY= # PINECONE_INDEX= # Weaviate # VECTOR_DB="weaviate" # WEAVIATE_ENDPOINT="http://localhost:8080" # WEAVIATE_API_KEY= # Qdrant # VECTOR_DB="qdrant" # QDRANT_ENDPOINT="http://localhost:6333" # QDRANT_API_KEY= # Milvus # VECTOR_DB="milvus" # MILVUS_ADDRESS="http://localhost:19530" # MILVUS_USERNAME= # MILVUS_PASSWORD= # Zilliz Cloud # VECTOR_DB="zilliz" # ZILLIZ_ENDPOINT="https://sample.api.gcp-us-west1.zillizcloud.com" # ZILLIZ_API_TOKEN=api-token-here # Astra DB # VECTOR_DB="astra" # ASTRA_DB_APPLICATION_TOKEN= # ASTRA_DB_ENDPOINT= ########################################### ######## Agent Service Keys ############### ########################################### # Google Search # AGENT_GSE_KEY= # AGENT_GSE_CTX= # SearchApi.io # AGENT_SEARCHAPI_API_KEY= # AGENT_SEARCHAPI_ENGINE=google # Serper.dev # AGENT_SERPER_DEV_KEY= # Bing Search # AGENT_BING_SEARCH_API_KEY= # Serply.io # AGENT_SERPLY_API_KEY= # SearXNG # AGENT_SEARXNG_API_URL= # Tavily # AGENT_TAVILY_API_KEY= ########################################### ######## Other Configurations ############ ########################################### # Disable viewing chat history from the UI and frontend APIs. # See https://docs.anythingllm.com/configuration#disable-view-chat-history for more information. # DISABLE_VIEW_CHAT_HISTORY=1 # Enable simple SSO passthrough to pre-authenticate users from a third-party service. # See https://docs.anythingllm.com/configuration#simple-sso-passthrough for more information. # SIMPLE_SSO_ENABLED=1 ```
yindo added the documentation label 2026-02-22 18:26:49 -05:00
yindo closed this issue 2026-02-22 18:26:49 -05:00
Author
Owner

@shatfield4 commented on GitHub (Jan 2, 2025):

If this was written using AI please refrain from doing so in the future or at least proofread what the LLM returns before copy pasting it into an issue.

The only valid points in this issue were to add:

# Deepseek
# DEEPSEEK_API_KEY=
# DEEPSEEK_MODEL_PREF=

and

# Tavily
# AGENT_TAVILY_API_KEY=

I can tell this was probably written by AI because we do not even use this environment variable anywhere in AnythingLLM:

# GitHub
GITHUB_API_KEY=
@shatfield4 commented on GitHub (Jan 2, 2025): If this was written using AI please refrain from doing so in the future or at least proofread what the LLM returns before copy pasting it into an issue. The only valid points in this issue were to add: ``` # Deepseek # DEEPSEEK_API_KEY= # DEEPSEEK_MODEL_PREF= ``` and ``` # Tavily # AGENT_TAVILY_API_KEY= ``` I can tell this was probably written by AI because we do not even use this environment variable anywhere in AnythingLLM: ``` # GitHub GITHUB_API_KEY= ```
yindo changed title from [DOCS]: Update the `docker/.env.example` to [GH-ISSUE #2901] [DOCS]: Update the `docker/.env.example` 2026-06-05 14:43:02 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1849