Built-in System Environment Variable Configuration
This document introduces the built-in environment variable configuration in the system. The corresponding configuration page is at https://{your-host}/admin/system/environment-variables.
Notes:
your-hostis the environment domain you want to configure, for example, the Stage environment isstaging.example.com.- This document does not describe docker env environment variables, but a set of built-in system configuration items. These are used to enable configuration changes without restarting the system—just refresh the page to apply changes quickly.
- If you cannot find the corresponding variable in the environment, you can create it directly.
Custom env Configuration Sources
When redirecting to the product frontend, you can specify additional env configurations in the following two ways. The value should be a link (needs to be encodeURIComponent).
- Method 1: Pass a parameter named
sm-envin the address bar. - Method 2: Set a field named
$serviceme-next-custom-envinlocalstorage.
The product will request this link and merge the configuration into the system's env configuration. For example:
https://app.example.com/?sm-env=%2fstatic%2fenv.json
At this point, it will read https://app.example.com/static/env.json to obtain additional configuration.
Configuration Priority: Extra parameters specified in localstorage > Extra parameters specified by sm-env > Parameters configured in the system > Frontend default parameters.
CUSTOM_CSS
- Type: Array of strings
- Description: Each string in the array is a link to a CSS file. All CSS files in this array will be loaded during system initialization.
- Default value:
[]
CUSTOM_CSS_WEIXIN_WORK
- Type: Array of strings
- Description: Same as
CUSTOM_CSS, but the CSS files in this array only take effect in the WeCom (Weixin Work) environment. - Default value:
[]
THEME_LIST
- Type: JSON string
- Description: Used to configure the themes users can choose from.
nameI18nKeyis the i18n key for the theme display text (needs to be maintained in the "International Content Management" page),codeshould correspond one-to-one with the theme code uploaded in the first step, andcoloris the colored dot before the text when selecting. - Reference value:
SERVICEME style:
[
{"nameI18nKey":"theme.form.color.purple","code":"purple","color":"#722ed1"},
{"nameI18nKey":"theme.form.color.blue","code":"blue","color":"#1677ff"}
]
OneAI style:
[
{"nameI18nKey":"swo","code":"swo","color":"#472aff"}
]
BROWSER_TITLE
- Type: JSON string
- Description: Used to configure the icon and name displayed in the browser tab. PC and H5 can be configured separately, and it also supports configuring the icon and name in WeCom.
- Reference value:
{
"TITLE_DESKTOP": "System Name",
"TITLE_MOBILE": "System Name",
"TITLE_WX_WORK": "System Name",
"ICON_DESKTOP": "./favicon.svg",
"ICON_MOBILE": "./favicon.svg",
"ICON_WX_WORK": "./favicon.svg"
}
ENTRY_MAINTENANCE
- Type: Number
- Description: When this value is
1, all users will be forcibly redirected to the "Under Maintenance" page. - Maintenance Channel: Maintenance personnel who need to bypass this restriction should configure the field in F12's
localstorage: key is$serviceme-next-skip-maintenance, value istrue. - Default value:
0
CUSTOM_HOME_AI_APP
- Type: JSON string
- Description: Used to configure the AI app buttons at the bottom of the homepage.
URL: Specifies the target link to jump to.NAME: The title to display (supports i18n key).IMG: The image path to display.BG_COLOR: The background color.
- Reference value:
[
{
"URL": "/app-markmap-gen",
"NAME": "next.home.ai.governance.item1.title",
"IMG": "./images/home/home-mindmap.png"
},
{
"URL": "/app-ai-abstract",
"NAME": "next.home.ai.governance.item2.title",
"IMG": "./images/home/home-summary.png"
},
{
"URL": "/app-ai-translate-v2",
"NAME": "next.home.ai.governance.item3.title",
"IMG": "./images/home/home-translate.png",
"BG_COLOR": "linear-gradient(176deg, rgba(255,255,255,0.4) 0%, #ECFDF3 100%)"
}
]
SSO_LOGIN_CONFIG
- Type: JSON string
- Description: Used to configure the built-in SSO (Single Sign-On) functionality.
- Documentation: Please refer to the [SSO Custom Configuration Guide] in the internal Wiki.
SSO_LOGIN_SECRET
- Type: JSON string
- Description: Used for the backend's corresponding SSO processing logic (sensitive configuration).
CUSTOM_LOGIN_URL
- Type: String
- Description: A URL used to customize the page to redirect to when not logged in.
- Default value:
/login
DISABLE_LOGIN_WHEN_CUSTOM
- Type: Boolean
- Description: When customizing the login page, whether to disable the built-in login page. If
true, accessing/loginwill automatically redirect toCUSTOM_LOGIN_URL. - Default value:
false
BOT_FILE_ACCEPT
- Type: Array of strings
- Description: Allowed file extensions for upload in the assistant.
- Default value:
[".pdf", ".xlsx", ".xls", ".csv"]
ENABLE_TOUR
- Type: 1 or 0
- Description: Whether to enable user onboarding.
- Default value:
0
CHAT_TEXTAREA_MAX_LENGTH
- Type: Number
- Description: Maximum number of characters allowed in the assistant chat box.
- Default value:
8000
DISABLE_VOICE_INPUT
- Type: Boolean
- Description: Controls the display of the voice input button on the homepage and in the chat box.
- Default value: Empty (displayed by default, set to
trueto hide).
KNOWLEDGE_MAX_SYSTEM_UPLOAD_FILE_SIZE
- Type: Number
- Description: Maximum file upload size limit in the system (unit: G).
- Default value:
1024
KNOWLEDGE_MAX_CONCURRENT_FILE_UPLOADS
- Type: Number
- Description: Maximum number of files that can be uploaded simultaneously in the system.
- Default value:
10
KNOWLEDGE_MAX_CONCURRENT_FILE_DOWNLOADS
- Type: Number
- Description: Maximum number of files that can be downloaded at once in the system.
- Default value:
10
KNOWLEDGE_MAX_QNA_QUESTION_LENGTH
- Type: Number
- Description: QnA - Maximum question length.
- Default value:
100
KNOWLEDGE_MAX_QNA_ANSWER_LENGTH
- Type: Number
- Description: QnA - Maximum answer length.
- Default value:
2000
KNOWLEDGE_MAX_FILE_STORAGE_QUOTA
- Type: Number
- Description: File space setting - maximum storage quota (GB).
- Default value:
1
KNOWLEDGE_MAX_META_OPTION_SCOUNT
- Type: Number
- Description: Metadata - options - maximum number of items.
- Default value:
20
KNOWLEDGE_MAX_META_OPTIONS_VALUE_LENGTH
- Type: Number
- Description: Metadata - options - maximum content length.
- Default value:
100
KNOWLEDGE_REPORT_MAX_QUERY_RANGE_DAYS
- Type: Number
- Description: Maximum export range in days.
- Default value:
7
KNOWLEDGE_DEFAULT_SUMMARY_PROMPT
- Type: String
- Description: Default prompt for knowledge base summary.
- Default value:
### Summarize the following in the original language in no more than 200 words.
MOBILE_ALLOWED_ROUTES
- Type: Array of strings
- Description: Allowed route addresses for mobile. The matching rule is a full match with
location.pathname. - Default value:
[] - Reference value:
["/settings/system/environment"]
CUSTOM_KNOWLEDGE_SETTING_MENU
- Type: Array of objects
- Description: Used to extend the left sidebar menu of the "Knowledge Management" page.
- Reference value:
[{
"customUrl": "http://your-domain.com/page",
"path": "new-page",
"key": "new-page",
"label": "Custom Menu Name",
"code": "PermissionCode"
}]
Field Description:
customUrl: The link to the page to be embedded.pathandkey: Should be the same and unique.label: The name of the menu, can be used as a key for i18n.code: Permission code, needs to be configured in the backend's function permission table in the database.
CUSTOM_KNOWLEDGE_SETTING_SIDEBAR_MENU
- Type: Array of objects
- Description: Used to extend the left sidebar menu of the Knowledge page (configuration method same as above).
CUSTOM_AI_STUDIO_SIDEBAR_MENU
- Type: Array of objects
- Description: Used to extend the left sidebar menu of AI STUDIO (configuration method same as above).
CUSTOM_MONITOR_SETTING_MENU
- Type: Array of objects
- Description: Used to extend the left sidebar menu of the monitoring management page (configuration method same as above).
DEBUG_MODE
- Type: Boolean
- Description: When this value is
true, the system can start debug mode. Note! Please be sure to turn off or delete this configuration when debugging is not needed! - Default value:
false - Feature: Debug mode will automatically turn off after refreshing the page and needs to be manually enabled again.
logo
- Type: String
- Description: The image link address for the LOGO in the upper left corner of the system.
product_name
- Type: String
- Description: The image link address for the product name in the middle of the upper left corner of the system.
show_product_name
- Type: Boolean
- Description: Whether to display
product_name. - Reference value:
0(hide),1(show)
show_subscription_label
- Type: Boolean
- Description: Whether to display the version label at the end of the upper left corner.
- Reference value:
0(hide),1(show)
DEFAULT_MODEL_GROUP
- Type: String
- Description: Default model group, used for binding several built-in assistants.
- Reference value:
15e36556-xxxx-xxxx-xxxx-xxxxxxxxxxxx
default_robot_ids
- Type: JSON string
- Description: Assistant id configuration used in system functions.
- Reference value:
{"file_robot":"95db8ee2-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}
EMAIL_CONFIG
- Type: JSON string
- Description: System email sending configuration (SMTP configuration).
FEEDBACK_EMAIL_TEMPLATE
- Type: String
- Description: Email template configuration for negative feedback.
file_type
- Type: Array of JSON strings
- Description: Allowed single file types for upload in the assistant.
mindmap_prompt
- Type: JSON string
- Description: Mind map AI summary prompt. Multiple generation strategies, each strategy's prompt is configured here. If not configured, the system default is used.
summary_prompt
- Type: JSON string
- Description: Summary prompt (if not configured, the system default is used), structure similar to
mindmap_prompt.
need_ai_check_function
- Type: Boolean
- Description: Whether to check the security of code nodes.
- Reference value:
0(off),1(on)
rag_config
- Type: JSON string
- Description: RAG search configuration items.
SKILL_DB_REF_MAX
- Type: Number
- Description: Maximum number of entries in the database skill linkage table.
- Default value:
10
WS_PRIVATE_KEY / WS_PUBLIC_KEY
- Type: String
- Description: Websocket user token encryption key pair (automatically generated and used by the backend, usually no manual management required).
CUSTOM_HOME_FOOTER_MENU
- Type: JSON string
- Description: Controls the homepage bottom menu configuration.
- Reference value:
[
{
"id": 1,
"name": "Link Name",
"url": "https://www.example.com",
"open_type": "true",
"icon": "http://your-domain.com/static/icon.svg"
}
]
USER_AGREEMENT
- Type: String
- Description: User agreement settings interface (supports multiple languages).
KIND_REMINDER
- Type: JSON string
- Description: Kind reminder (supports multiple languages).
- Reference value:
{
"ENABLE": false,
"LOCALE": [
{ "KEY": "ja-JP", "VALUE": "Japanese Reminder" },
{ "KEY": "zh-TW", "VALUE": "Traditional Chinese Reminder" },
{ "KEY": "zh-CN", "VALUE": "Simplified Chinese Reminder" },
{ "KEY": "en-US", "VALUE": "English Reminder" }
]
}
ENABLE controls whether the kind reminder is displayed. The values in LOCALE can be used to create the same values in internationalization management for multi-language adaptation.
SHOW_AI_FILE_TRANSLATOR
- Type: String
'true' | 'false' - Description: Whether to display the AI translation feature.
- Default value:
'true' - Reference value:
'true'to display,'false'or not configured to hide.
CHAT_BUBBLE_WATERMARK
- Type: String
- Description: Watermark description inside the reply content bubble.
- Reference value:
chat.bubble.watermark(multi-language key)
ENABLE_WATERMARK
- Type: Boolean
- Description: Controls whether to display the watermark in PDF file previews.
- Default value:
false
ENABLE_DANGER_HTML_ATTRIBUTES
- Type: Boolean
true | false - Description: Controls whether Markdown can render
styleandclassnameattributes. - Default value:
false - Warning: This configuration is risky (XSS risk exists). If not confirmed with the user, it is not recommended to enable.
PDF_LOADER_LIB
- Type: String
- Description: Controls the Python package for basic PDF parsing in file preprocessing.
pypdf: The default PDF parsing package, with better parsing results thanpdfplumber.pdfplumber: If you need to parse hyperlinks in PDFs, switch to this package.
- Default value:
pypdf - Warning: This configuration is sensitive. If not confirmed with the user, it is not recommended to enable.
EXCEL_LOAD_WITH_HYPERLINKS
- Type: Boolean
true | false - Description: Controls whether basic Excel parsing in file preprocessing needs to include hyperlink parsing.
- Default value:
false - Warning: This configuration is sensitive. If not confirmed with the user, it is not recommended to enable.