Back to Lobehub

LobeHub Feature Flags Environment Variables Configuration Guide

docs/self-hosting/advanced/feature-flags.mdx

2.1.566.4 KB
Original Source

Feature Flags

In addition to basic environment variable configuration, LobeHub also offers feature flags to control whether a feature is enabled globally, or to enable or disable features for specific user groups or environments as needed.

Feature Flags Environment Variable FEATURE_FLAGS

  • Type: Optional
  • Description: Used to control LobeHub's feature functionalities. Supports multiple feature flags, using + to add a feature and - to disable a feature. Separate multiple feature flags with a comma , and enclose the entire value in quotes " to avoid parsing errors.
  • Default: -
  • Example: "-welcome_suggest"

All features are controlled by the FEATURE_FLAGS variable as the sole configuration variable.

You can achieve various feature combinations using the above configuration syntax. All feature flags are Boolean values, enabled with + and disabled with -.

<Callout type={'tip'}> Attention: Unlike the OPENAI_MODEL_LIST variable, the FEATURE_FLAGS variable does not support the all keyword. You need to manually control all feature flags (otherwise, they will adopt their default values). </Callout>

Configuration ItemDescriptionDefault Value
check_updatesAllows checking for updates.Enabled
pin_listControls pinned agent list display in sidebar.Disabled
language_model_settingsEnables language model settings.Enabled
provider_settingsControls model provider settings display.Enabled
openai_api_keyAllows users to customize the OpenAI API Key.Enabled
openai_proxy_urlAllows users to customize the OpenAI proxy URL.Enabled
api_key_manageControls access to API key management page (/profile/apikey).Disabled
create_sessionAllows users to create sessions.Enabled
edit_agentAllows users to edit assistants.Enabled
pluginsControls plugin functionality in chat and agent settings.Enabled
dalleEnables the DALL-E functionality.Enabled
ai_imageControls AI image generation feature and page (/image).Enabled
speech_to_textEnables speech-to-text functionality.Enabled
token_counterReserved for token counter display.Enabled
welcome_suggestDisplays welcome suggestions.Enabled
changelogControls changelog modal/page display.Enabled
marketEnables the assistant market functionality.Enabled
knowledge_baseEnables the knowledge base functionality.Enabled
rag_evalControls RAG evaluation feature (/repos/[id]/evals).Disabled
cloud_promotionControls cloud service promotion link display in user menu.Disabled
commercial_hide_githubHides GitHub-related links in settings footer (requires commercial license).Disabled
commercial_hide_docsHides documentation and help menu including changelog, docs, and feedback (requires commercial license).Disabled

You can always check the featureFlags to get the latest list of feature flags.

Standalone Feature Enable/Disable Variables

In addition to the FEATURE_FLAGS system above, LobeHub provides dedicated environment variables to enable or disable specific features that depend on external infrastructure. These are standalone variables (not part of FEATURE_FLAGS):

Environment VariableDefaultDescriptionRequires
ENABLED_ARTIFACTS1Enable the Artifacts panel (Claude-style code/SVG/React preview)
ENABLED_MCP1Enable the Model Context Protocol plugin system
ENABLED_UPLOAD1Enable file upload functionalityS3-compatible storage
ENABLED_KNOWLEDGE_BASE1Enable Knowledge Base and RAG featuresS3 storage + PostgreSQL
ENABLED_WEB_SEARCH1Enable web search integration (online search)Searxng or search plugin

Set to 0 to disable. For example, to disable file upload if you haven't configured S3:

bash
ENABLED_UPLOAD=0
ENABLED_KNOWLEDGE_BASE=0

<Callout type={'info'}> ENABLED_UPLOAD and ENABLED_KNOWLEDGE_BASE should be disabled if you haven't configured S3-compatible storage, as file operations will fail without it. </Callout>