Skip to main content

System Built-in Environment Variable Configuration

This document introduces the system built-in environment variable configuration, which allows configurations to take effect quickly by refreshing the page without restarting the system.
The corresponding configuration page can be viewed in the system management backend (e.g., /settings/system/environment).

⚠️ Note: The environment variables described in this document are not Docker environment variables (env), but a set of frontend configuration mechanisms maintained by the system itself.


Custom env Configuration Sources

When navigating to the product frontend, additional env configurations can be specified in the following two ways.
The value of this configuration item is a link (which must be encoded with encodeURIComponent).

  • Method 1: Pass the field sm-env via URL parameter
  • Method 2: Set the field $serviceme-next-custom-env via browser localStorage

The system will request this link and merge the configuration content into the system built-in env configuration. For example:

https://next.serviceme.com (system address)/?sm-env=%2fstatic%2fenv.json

At this time, it will request https://next.serviceme.com (system address)/static/env.json to obtain additional configuration.

The configuration priority is as follows: extra parameters specified by localStorage > extra parameters specified by sm-env > parameters configured in the system > frontend default parameters


Environment Variable Description

Environment Variable NameTypeDescriptionDefault Value / Example
CUSTOM_CSSString ArrayList of CSS files loaded during system initialization[]
CUSTOM_CSS_WEIXIN_WORKString ArrayCSS files dedicated to WeChat Work environment[]
BROWSER_TITLEJSON StringBrowser tab title and icon configuration{ "TITLE_DESKTOP": "SERVICEME", ... }
ENTRY_MAINTENANCENumberMaintenance mode switch (1=on)0
CUSTOM_HOME_AI_APPJSON StringAI app button configuration at the bottom of the homepage[{"URL":"/app-ai-abstract","NAME":"next.home.ai.governance.item2.title"}]
SSO_LOGIN_CONFIGJSON StringSingle sign-on frontend configurationRefer to official SSO documentation
SSO_LOGIN_SECRETJSON StringSingle sign-on backend secret configurationSame as above
CUSTOM_LOGIN_URLStringCustom login page URL/login
DISABLE_LOGIN_WHEN_CUSTOMBooleanWhether to disable the system login page when using a custom login pagefalse
BOT_FILE_ACCEPTString ArrayAllowed file types for assistant uploads['.pdf', '.xlsx', '.xls', '.csv']
ENABLE_TOUR1 or 0Whether to enable the newbie guide0
CHAT_TEXTAREA_MAX_LENGTHNumberMaximum character count for chat input box8000
DISABLE_VOICE_INPUTBooleanControls whether to hide the voice input buttontrue=hidden
KNOWLEDGE_MAX_SYSTEM_UPLOAD_FILE_SIZENumberMaximum system upload file size (GB)1024
KNOWLEDGE_MAX_CONCURRENT_FILE_UPLOADSNumberMaximum number of concurrent file uploads10
KNOWLEDGE_MAX_CONCURRENT_FILE_DOWNLOADSNumberMaximum number of concurrent file downloads10
KNOWLEDGE_MAX_QNA_QUESTION_LENGTHNumberMaximum length of QnA questions100
KNOWLEDGE_MAX_QNA_ANSWER_LENGTHNumberMaximum length of QnA answers2000
KNOWLEDGE_MAX_FILE_STORAGE_QUOTANumberFile storage quota (GB)1
KNOWLEDGE_MAX_META_OPTION_SCOUNTNumberMaximum number of metadata options20
KNOWLEDGE_MAX_META_OPTIONS_VALUE_LENGTHNumberMaximum length of metadata option content100
KNOWLEDGE_REPORT_MAX_QUERY_RANGE_DAYSNumberMaximum days for report export7
KNOWLEDGE_DEFAULT_SUMMARY_PROMPTStringDefault knowledge summary prompt"### Summarize the following..."
MOBILE_ALLOWED_ROUTESString ArrayAllowed route list for mobile (full path match)[]
CUSTOM_KNOWLEDGE_SETTING_MENUObject ArrayExtended knowledge management page menu[{"customUrl":"http://localhost:5173","label":"Custom Menu"}]
CUSTOM_KNOWLEDGE_SETTING_SIDEBAR_MENUObject ArrayExtended knowledge sidebar menu (including permission code)[{"customUrl":"http://localhost:5173","code":"Robot"}]
CUSTOM_MONITOR_SETTING_MENUObject ArrayExtended monitoring management menuSame as above
DEBUG_MODEBooleanWhether to enable debug mode (automatically closes after refresh)false
logoStringSystem top-left LOGO link addressSee interface screenshot for example
product_nameStringProduct name at top-left"SERVICEME"
show_product_nameBooleanWhether to display the product name1=show, 0=hide
show_subscription_labelBooleanWhether to display the version label1=show, 0=hide
DEFAULT_MODEL_GROUPStringDefault model group ID"15e36556-6ad6-4546-a639-e2096393b1c0"
default_robot_idsJSON StringSystem built-in assistant IDs{"file_robot":"95db8ee2-...23d7f"}
EMAIL_CONFIGJSON StringSMTP email sending configurationNo default value
FEEDBACK_EMAIL_TEMPLATEStringNegative feedback email templateNo default value
file_typeJSON String ArrayAssistant upload file type restrictionsConfigured by feature
mindmap_promptJSON StringMind map generation promptBuilt-in system
summary_promptJSON StringContent summary promptBuilt-in system
need_ai_check_functionBooleanWhether to enable code security check0 (off) / 1 (on)
rag_configJSON StringRAG (Retrieval-Augmented Generation) configuration itemsNo default value
SKILL_DB_REF_MAXNumberMaximum number of database skill linkage tables10
WS_PRIVATE_KEYStringWebSocket Token encryption private key (auto-generated)No management needed
WS_PUBLIC_KEYStringWebSocket Token encryption public key (auto-generated)No management needed
CUSTOM_HOME_FOOTER_MENUString ArrayHomepage bottom menu configuration[{"name":"footer.menu.user.manual"}]
USER_AGREEMENTStringUser notice (supports multiple languages)"Welcome to SERVICEME..."
CHAT_BUBBLE_WATERMARKStringChat bubble watermark configuration key"chat.bubble.watermark"

Tips:

  • If the address contains https://next.serviceme.com, please be sure to replace it with your own system access domain.
  • After modifying the configuration, no system restart is required; simply refresh the page to take effect.