> ## Documentation Index
> Fetch the complete documentation index at: https://www.kitemc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 配置文件

<Warning>
  VerifyMC 已停止维护。本页保留供已有用户查阅历史配置与使用方法，不表示当前仍在维护或已验证新版本兼容性。
</Warning>

<span id="配置文件" />

本文档详细说明 `config.yml` 中所有配置选项的用途和用法。

<Tip>
  **英文示例配置**

  除本页示例外，英文版示例 `config.yml` 也会在 VerifyMC 的 GitHub 仓库中发布：[KiteMC/VerifyMC](https://github.com/KiteMC/VerifyMC)。
</Tip>

<h2 id="全局设置">
  全局设置
</h2>

```yaml theme={null}
# 全局语言设置，影响插件消息和网页界面。(例如 'zh', 'en')
language: zh

# 开启后，控制台会输出详细的日志，用于故障排查。
debug: false
```

<h2 id="网页服务器">
  网页服务器
</h2>

```yaml theme={null}
# 网页服务使用的端口。
web_port: 8080

# 显示在网页界面上的服务器名称。
web_server_prefix: '[ 服务器名称 ]'
```

<h2 id="验证与白名单">
  验证与白名单
</h2>

```yaml theme={null}
# 支持的验证方式。可选: 'email'（邮箱验证码）, 'captcha'（图形验证码）。
# 可以同时使用多种方式，例如: [email, captcha]
#
# 【重要】仅配置下方的 captcha: 部分不会启用图形验证码！
# 要启用图形验证码，必须在此列表中添加 'captcha'：
#   仅使用图形验证码: auth_methods: [captcha]
#   同时使用邮箱和图形验证码: auth_methods: [email, captcha]
auth_methods:
  - email

# 单个邮箱最多可以绑定的游戏账号数量。
max_accounts_per_email: 2

# 白名单模式: 'bukkit' (与服务器的 whitelist.json 同步) 或 'plugin' (使用插件内部数据库)。
whitelist_mode: plugin

# 在 'plugin' 模式下，向未在白名单中的玩家显示的注册URL。
web_register_url: https://domain.com/
```

<h2 id="注册">
  注册
</h2>

```yaml theme={null}
# 如果为 true，新用户注册将自动通过。
# 如果为 false，则需要管理员手动审核。
register:
  auto_approve: false
```

<h2 id="用户与安全">
  用户与安全
</h2>

```yaml theme={null}
# 用于验证玩家名的正则表达式。
username_regex: "^[a-zA-Z0-9_-]{3,16}$"

# 如果为 false，则仅大小写不同的用户名（例如 "Player" 和 "player"）将被视为相同。
username_case_sensitive: false

# 管理员面板不使用单独密码。
# 登录时使用已注册玩家账号密码，并且该玩家必须是服务器 OP。
```

<h2 id="用户通知">
  用户通知
</h2>

```yaml theme={null}
# 当管理员审核用户申请后，向用户发送邮件通知。
user_notification:
  # 是否启用用户通知功能
  enabled: true
  # 审核通过时是否发送通知邮件
  on_approve: true
  # 审核拒绝时是否发送通知邮件
  on_reject: true
```

<h2 id="前端-ui">
  前端 (UI)
</h2>

```yaml theme={null}
frontend:
  # 网页界面的视觉主题。可选: 'glassx'。
  theme: glassx

  # Logo 的 URL。可以是网页链接或本地文件路径 (例如 '/logo.png')。
  logo_url: /logo.png

  # 显示在主页上的公告信息。
  announcement: 欢迎来到我们的服务器!
```

<h2 id="邮箱-smtp">
  邮箱 (SMTP)
</h2>

```yaml theme={null}
smtp:
  host: smtp.qq.com
  port: 587
  username: your_email@qq.com
  password: your_email_password
  from: your_email@qq.com
  enable_ssl: true

# 验证码邮件的主题（标题）
email_subject: VerifyMC 验证码
```

<h3 id="常见-smtp-配置">
  常见 SMTP 配置
</h3>

| 服务商 | Host | Port | SSL |
| - | - | - | - |
| Gmail | smtp.gmail.com | 587 | true |
| QQ 邮箱 | smtp.qq.com | 587 | true |
| Outlook | smtp.office365.com | 587 | true |
| 163 邮箱 | smtp.163.com | 465 | true |

<h2 id="自动更新资源">
  自动更新资源
</h2>

```yaml theme={null}
# 如果为 true，插件更新时会自动更新国际化文件、邮件模板和主题文件。
auto_update_resources: true
```

<h2 id="邮箱注册限制">
  邮箱注册限制
</h2>

```yaml theme={null}
# 是否启用邮箱域名白名单
enable_email_domain_whitelist: true

# 是否限制邮箱别名（如禁止 user+xxx@gmail.com）
enable_email_alias_limit: false

# 邮箱域名白名单，留空则使用默认主流邮箱域
email_domain_whitelist:
  - gmail.com
  - 163.com
  - 126.com
  - qq.com
  - outlook.com
  - hotmail.com
  - icloud.com
  - yahoo.com
  - foxmail.com
```

<h2 id="存储与-mysql">
  存储与 MySQL
</h2>

```yaml theme={null}
# 存储类型: 'data'（本地文件）或 'mysql'（外部数据库）
storage: data

# MySQL 连接设置（当 storage 为 'mysql' 时使用）
mysql:
    host: localhost
    port: 3306
    database: verifymc
    user: root
    password: yourpassword
```

<h2 id="authme-集成配置">
  AuthMe 集成配置
</h2>

```yaml theme={null}
authme:
  # 是否启用 AuthMe 集成功能
  enabled: true

  # 是否强制在 Web 注册时要求输入密码
  require_password: true

  # 密码正则表达式
  password_regex: "^[a-zA-Z0-9_]{8,26}$"

  # AuthMe 数据库直连配置
  database:
    # 数据库类型: 'sqlite' 或 'mysql'
    type: sqlite
    # AuthMe 表名
    table: authme
    # 同步间隔（秒），用于定期数据同步
    sync_interval_seconds: 30

    # MySQL 设置（当 database.type 为 'mysql' 时使用）
    mysql:
      host: 127.0.0.1
      port: 3306
      database: authme
      user: root
      password: yourpassword

    # SQLite 设置（当 database.type 为 'sqlite' 时使用）
    sqlite:
      path: plugins/AuthMe/authme.db

    # 列名映射（需匹配你的 AuthMe 数据库结构）
    columns:
      mySQLColumnName: username
      mySQLRealName: realname
      mySQLColumnPassword: password
      mySQLColumnEmail: email
```

<h2 id="图形验证码配置">
  图形验证码配置
</h2>

```yaml theme={null}
# 图形验证码可作为邮箱验证的替代或补充方案
# 在 auth_methods 中添加 'captcha' 来启用: auth_methods: [captcha]
captcha:
  # 验证码类型: math（数学表达式）或 text（随机字符）
  type: math

  # 文本验证码长度（math 类型时忽略此项）
  length: 4

  # 验证码过期时间（秒）
  expire_seconds: 300
```

<h2 id="基岩版玩家支持">
  基岩版玩家支持
</h2>

```yaml theme={null}
# 适用于 Geyser/Floodgate 的基岩版玩家
bedrock:
  # 是否启用基岩版玩家支持
  enabled: false

  # 基岩版玩家用户名前缀（Floodgate 常用 "."）
  prefix: "."

  # 基岩版用户名正则表达式
  username_regex: "^[a-zA-Z0-9._-]{3,15}$"
```

<h2 id="问卷调查配置">
  问卷调查配置
</h2>

```yaml theme={null}
# 详细问题配置请参见 questionnaire.yml
questionnaire:
  # 是否启用问卷功能
  enabled: false

  # 通过所需的最低分数
  pass_score: 60

  # 问卷提交频率限制
  rate_limit:
    # 时间窗口（毫秒）
    window_ms: 300000
    ip:
      max: 20
    uuid:
      max: 8
    email:
      max: 6
```

<h2 id="llm-问答评分">
  LLM 问答评分
</h2>

```yaml theme={null}
# AI 驱动的文本问答自动评分
llm:
  # 是否启用 LLM 评分
  enabled: true

  # LLM 提供商: 'deepseek' 或 'google'
  provider: deepseek

  # API 基础地址
  api_base: https://api.deepseek.com/v1

  # API 密钥（请妥善保管！）
  api_key: ""

  # 模型名称
  model: deepseek-chat

  # 请求超时时间（毫秒）
  timeout: 10000

  # 失败重试次数
  retry: 1

  # 最大并发评分请求数
  max_concurrency: 4

  # 获取并发槽位超时（毫秒）
  acquire_timeout: 1500

  # 重试退避设置（毫秒）
  retry_backoff_base: 300
  retry_backoff_max: 5000

  # 最大输入文本长度
  input_max_length: 2000

  # 熔断器设置
  circuit_breaker:
    failure_threshold: 5
    open_ms: 30000

  # LLM 系统提示词
  system_prompt: |
    You are a fair Minecraft whitelist questionnaire grader.
    Score strictly based on the question, candidate answer, and scoring rule.
    Return JSON only.

  # 评分规则
  scoring_rule: |
    Evaluate primarily:
    1) Relevance to the question
    2) Completeness and level of detail
    3) Understanding of server rules and community norms

  # 期望的 JSON 响应格式
  score_format: '{"score": number, "reason": string, "confidence": number}'
```

<h2 id="discord-集成-oauth2">
  Discord 集成（OAuth2）
</h2>

```yaml theme={null}
# 需要在 https://discord.com/developers/applications 创建 Discord 应用
discord:
  # 是否启用 Discord 集成
  enabled: false

  # Discord 应用的客户端ID
  client_id: ""

  # Discord 应用的客户端密钥
  client_secret: ""

  # OAuth2 回调地址
  redirect_uri: "https://yourdomain.com/api/discord/callback"

  # 可选：要求用户加入特定服务器的ID
  guild_id: ""

  # 是否强制要求绑定 Discord 才能注册
  required: false
```

***

<h2 id="完整配置示例">
  完整配置示例
</h2>

```yaml theme={null}
language: zh
debug: false
web_port: 8080
web_server_prefix: '[ 服务器名称 ]'
auth_methods:
  - email
max_accounts_per_email: 2
whitelist_mode: plugin
web_register_url: https://domain.com/
register:
  auto_approve: false
username_regex: "^[a-zA-Z0-9_-]{3,16}$"
username_case_sensitive: false
user_notification:
  enabled: true
  on_approve: true
  on_reject: true
frontend:
  theme: glassx
  logo_url: /logo.png
  announcement: 欢迎!
smtp:
  host: smtp.qq.com
  port: 587
  username: your_email@qq.com
  password: your_password
  from: your_email@qq.com
  enable_ssl: true
email_subject: VerifyMC 验证码
auto_update_resources: true
enable_email_domain_whitelist: true
enable_email_alias_limit: false
email_domain_whitelist:
  - gmail.com
  - 163.com
  - 126.com
  - qq.com
  - outlook.com
  - hotmail.com
  - icloud.com
  - yahoo.com
  - foxmail.com
storage: data
mysql:
    host: localhost
    port: 3306
    database: verifymc
    user: root
    password: yourpassword
authme:
  enabled: true
  require_password: true
  password_regex: "^[a-zA-Z0-9_]{8,26}$"
  database:
    type: sqlite
    table: authme
    sync_interval_seconds: 30
    mysql:
      host: 127.0.0.1
      port: 3306
      database: authme
      user: root
      password: yourpassword
    sqlite:
      path: plugins/AuthMe/authme.db
    columns:
      mySQLColumnName: username
      mySQLRealName: realname
      mySQLColumnPassword: password
      mySQLColumnEmail: email
captcha:
  type: math
  length: 4
  expire_seconds: 300
bedrock:
  enabled: false
  prefix: "."
  username_regex: "^[a-zA-Z0-9._-]{3,15}$"
questionnaire:
  enabled: false
  pass_score: 60
  rate_limit:
    window_ms: 300000
    ip:
      max: 20
    uuid:
      max: 8
    email:
      max: 6
llm:
  enabled: true
  provider: deepseek
  api_base: https://api.deepseek.com/v1
  api_key: ""
  model: deepseek-chat
  timeout: 10000
  retry: 1
  max_concurrency: 4
  acquire_timeout: 1500
  retry_backoff_base: 300
  retry_backoff_max: 5000
  input_max_length: 2000
  circuit_breaker:
    failure_threshold: 5
    open_ms: 30000
  system_prompt: |
    You are a fair Minecraft whitelist questionnaire grader.
    Score strictly based on the question, candidate answer, and scoring rule.
    Return JSON only.
  scoring_rule: |
    Evaluate primarily:
    1) Relevance to the question
    2) Completeness and level of detail
    3) Understanding of server rules and community norms
  score_format: '{"score": number, "reason": string, "confidence": number}'
discord:
  enabled: false
  client_id: ""
  client_secret: ""
  redirect_uri: "https://yourdomain.com/api/discord/callback"
  guild_id: ""
  required: false
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.