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-envvia URL parameter - Method 2: Set the field 
$serviceme-next-custom-envvia browserlocalStorage 
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 Name | Type | Description | Default Value / Example | 
|---|---|---|---|
| CUSTOM_CSS | String Array | List of CSS files loaded during system initialization | [] | 
| CUSTOM_CSS_WEIXIN_WORK | String Array | CSS files dedicated to WeChat Work environment | [] | 
| BROWSER_TITLE | JSON String | Browser tab title and icon configuration | { "TITLE_DESKTOP": "SERVICEME", ... } | 
| ENTRY_MAINTENANCE | Number | Maintenance mode switch (1=on) | 0 | 
| CUSTOM_HOME_AI_APP | JSON String | AI app button configuration at the bottom of the homepage | [{"URL":"/app-ai-abstract","NAME":"next.home.ai.governance.item2.title"}] | 
| SSO_LOGIN_CONFIG | JSON String | Single sign-on frontend configuration | Refer to official SSO documentation | 
| SSO_LOGIN_SECRET | JSON String | Single sign-on backend secret configuration | Same as above | 
| CUSTOM_LOGIN_URL | String | Custom login page URL | /login | 
| DISABLE_LOGIN_WHEN_CUSTOM | Boolean | Whether to disable the system login page when using a custom login page | false | 
| BOT_FILE_ACCEPT | String Array | Allowed file types for assistant uploads | ['.pdf', '.xlsx', '.xls', '.csv'] | 
| ENABLE_TOUR | 1 or 0 | Whether to enable the newbie guide | 0 | 
| CHAT_TEXTAREA_MAX_LENGTH | Number | Maximum character count for chat input box | 8000 | 
| DISABLE_VOICE_INPUT | Boolean | Controls whether to hide the voice input button | true=hidden | 
| KNOWLEDGE_MAX_SYSTEM_UPLOAD_FILE_SIZE | Number | Maximum system upload file size (GB) | 1024 | 
| KNOWLEDGE_MAX_CONCURRENT_FILE_UPLOADS | Number | Maximum number of concurrent file uploads | 10 | 
| KNOWLEDGE_MAX_CONCURRENT_FILE_DOWNLOADS | Number | Maximum number of concurrent file downloads | 10 | 
| KNOWLEDGE_MAX_QNA_QUESTION_LENGTH | Number | Maximum length of QnA questions | 100 | 
| KNOWLEDGE_MAX_QNA_ANSWER_LENGTH | Number | Maximum length of QnA answers | 2000 | 
| KNOWLEDGE_MAX_FILE_STORAGE_QUOTA | Number | File storage quota (GB) | 1 | 
| KNOWLEDGE_MAX_META_OPTION_SCOUNT | Number | Maximum number of metadata options | 20 | 
| KNOWLEDGE_MAX_META_OPTIONS_VALUE_LENGTH | Number | Maximum length of metadata option content | 100 | 
| KNOWLEDGE_REPORT_MAX_QUERY_RANGE_DAYS | Number | Maximum days for report export | 7 | 
| KNOWLEDGE_DEFAULT_SUMMARY_PROMPT | String | Default knowledge summary prompt | "### Summarize the following..." | 
| MOBILE_ALLOWED_ROUTES | String Array | Allowed route list for mobile (full path match) | [] | 
| CUSTOM_KNOWLEDGE_SETTING_MENU | Object Array | Extended knowledge management page menu | [{"customUrl":"http://localhost:5173","label":"Custom Menu"}] | 
| CUSTOM_KNOWLEDGE_SETTING_SIDEBAR_MENU | Object Array | Extended knowledge sidebar menu (including permission code) | [{"customUrl":"http://localhost:5173","code":"Robot"}] | 
| CUSTOM_MONITOR_SETTING_MENU | Object Array | Extended monitoring management menu | Same as above | 
| DEBUG_MODE | Boolean | Whether to enable debug mode (automatically closes after refresh) | false | 
| logo | String | System top-left LOGO link address | See interface screenshot for example | 
| product_name | String | Product name at top-left | "SERVICEME" | 
| show_product_name | Boolean | Whether to display the product name | 1=show, 0=hide | 
| show_subscription_label | Boolean | Whether to display the version label | 1=show, 0=hide | 
| DEFAULT_MODEL_GROUP | String | Default model group ID | "15e36556-6ad6-4546-a639-e2096393b1c0" | 
| default_robot_ids | JSON String | System built-in assistant IDs | {"file_robot":"95db8ee2-...23d7f"} | 
| EMAIL_CONFIG | JSON String | SMTP email sending configuration | No default value | 
| FEEDBACK_EMAIL_TEMPLATE | String | Negative feedback email template | No default value | 
| file_type | JSON String Array | Assistant upload file type restrictions | Configured by feature | 
| mindmap_prompt | JSON String | Mind map generation prompt | Built-in system | 
| summary_prompt | JSON String | Content summary prompt | Built-in system | 
| need_ai_check_function | Boolean | Whether to enable code security check | 0 (off) / 1 (on) | 
| rag_config | JSON String | RAG (Retrieval-Augmented Generation) configuration items | No default value | 
| SKILL_DB_REF_MAX | Number | Maximum number of database skill linkage tables | 10 | 
| WS_PRIVATE_KEY | String | WebSocket Token encryption private key (auto-generated) | No management needed | 
| WS_PUBLIC_KEY | String | WebSocket Token encryption public key (auto-generated) | No management needed | 
| CUSTOM_HOME_FOOTER_MENU | String Array | Homepage bottom menu configuration | [{"name":"footer.menu.user.manual"}] | 
| USER_AGREEMENT | String | User notice (supports multiple languages) | "Welcome to SERVICEME..." | 
| CHAT_BUBBLE_WATERMARK | String | Chat 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.