跳转到内容

配置字段

系统设置是运行时配置的唯一可信来源。首次启动把 DefaultSettings 里的键写入 settings 表,之后以库里的值为准;环境变量只作为二级回退,硬编码默认值是兜底。

这一页从 internal/model/setting.go 生成,126 个键一次列全。改代码里的默认值, 这里会跟着变;改了配置但没改默认值,也不影响这一页——它描述的是种子,不是你的站点。

列含义
键settings 表主键,也是 /api/v1/settings/* 里的字段名
默认值首次启动写入的值;空字符串表示必须由管理员填写
公开勾选表示会出现在 GET /api/v1/settings/public,未登录也能读到

126个键

站点6

键默认值公开
site_nameFeed Chamber✓
site_descriptionNoelOrin 的个人博客✓
site_logo(空)✓
site_url(空)✓
site_maintenancefalse
site_maintenance_message站点维护中,请稍后再试

SEO3

键默认值公开
seo_titleFeed Chamber✓
seo_keywordsFeed Chamber,博客,社区,技术✓
seo_description(空)✓

Open Graph1

键默认值公开
og_image(空)✓

站点验证1

键默认值公开
google_site_verification(空)✓

站点验证1

键默认值公开
baidu_site_verification(空)✓

用户1

键默认值公开
user_profile_indexablefalse✓

Sitemap1

键默认值公开
sitemap_page_size5000

注册2

键默认值公开
register_enabledtrue✓
register_modeall✓

帖子2

键默认值公开
post_approvalfalse
post_auth_requiredfalse✓

审核1

键默认值公开
moderation_modeasync

MCP3

键默认值公开
mcp_enabledfalse
mcp_disabled_tools(空)
mcp_max_result_bytes8192

成长体系2

键默认值公开
trust_tl0_require_approvalfalse
trust_tl0_block_linkstrue

邮件15

键默认值公开
email_verification_requiredfalse
email_enabledfalse
email_providerlog
email_smtp_host(空)
email_smtp_port587
email_username(空)
email_password(空)
email_from(空)
email_from_nameFeed Chamber
email_use_tlsfalse
email_api_key(空)
email_code_ttl600
email_code_length6
email_resend_cooldown60
email_daily_limit10

评论1

键默认值公开
comment_auth_requiredfalse✓

版面1

键默认值公开
space_view_auth_requiredfalse✓

标签1

键默认值公开
tag_list_auth_requiredfalse✓

公告1

键默认值公开
announcement_auth_requiredfalse✓

文章1

键默认值公开
article_page_size20✓

OAuth / OIDC49

键默认值公开
oauth_github_enabledfalse
oauth_github_client_id(空)
oauth_github_client_secret(空)
oauth_github_callback(空)
oauth_google_enabledfalse
oauth_google_client_id(空)
oauth_google_client_secret(空)
oauth_google_callback(空)
oauth_qq_enabledfalse
oauth_qq_client_id(空)
oauth_qq_client_secret(空)
oauth_qq_callback(空)
oauth_wechat_enabledfalse
oauth_wechat_client_id(空)
oauth_wechat_client_secret(空)
oauth_wechat_callback(空)
oauth_weibo_enabledfalse
oauth_weibo_client_id(空)
oauth_weibo_client_secret(空)
oauth_weibo_callback(空)
oauth_discord_enabledfalse
oauth_discord_client_id(空)
oauth_discord_client_secret(空)
oauth_discord_callback(空)
oauth_github_auth_url(空)
oauth_github_token_url(空)
oauth_github_user_api_url(空)
oauth_github_scopes(空)
oauth_google_auth_url(空)
oauth_google_token_url(空)
oauth_google_user_api_url(空)
oauth_google_scopes(空)
oauth_qq_auth_url(空)
oauth_qq_token_url(空)
oauth_qq_user_api_url(空)
oauth_qq_scopes(空)
oauth_wechat_auth_url(空)
oauth_wechat_token_url(空)
oauth_wechat_user_api_url(空)
oauth_wechat_scopes(空)
oauth_weibo_auth_url(空)
oauth_weibo_token_url(空)
oauth_weibo_user_api_url(空)
oauth_weibo_scopes(空)
oauth_discord_auth_url(空)
oauth_discord_token_url(空)
oauth_discord_user_api_url(空)
oauth_discord_scopes(空)
oauth_access_token_ttl86400

OIDC SSO5

键默认值公开
sso_oidc_enabledfalse
sso_oidc_issuer(空)
sso_oidc_client_id(空)
sso_oidc_client_secret(空)
sso_id_token_ttl3600

API Key2

键默认值公开
api_key_enabledfalse
api_key_default_rate_limit100

多因素认证1

键默认值公开
mfa_totp_enabledfalse

限流1

键默认值公开
rate_limit_enabledfalse

安全3

键默认值公开
security_brute_force_max_attempts5
security_brute_force_window300
security_unusual_location_enabledfalse

备份1

键默认值公开
backup_retention_days30

分页2

键默认值公开
page_max_size100
page_default_size20✓

上传3

键默认值公开
upload_max_size10485760
upload_allowed_typesimage/jpeg,image/png,image/gif,image/webp
upload_presign_expiry900

实时推送1

键默认值公开
sse_polling_interval5

view1

键默认值公开
view_count_flush_interval60

bcrypt1

键默认值公开
bcrypt_cost10

password1

键默认值公开
password_min_length8

storage2

键默认值公开
storage_providerlocal
storage_local_diruploads

s37

键默认值公开
s3_endpoint(空)
s3_regionus-east-1
s3_bucket(空)
s3_access_key_id(空)
s3_access_key_secret(空)
s3_use_ssltrue
s3_custom_domain(空)

banned2

键默认值公开
banned_status_visibletrue
banned_status_public_accesstrue
分组后台路径
站点 / SEO / 注册 / 审核模式/admin/settings?tab=site
用户、认证、邮件与内容/admin/settings?tab=user、?tab=content
第三方登录(OAuth / OIDC)/admin/settings?tab=oauth
存储(本地 / S3)/admin/settings?tab=storage
门控规则/admin/gates
成长体系/admin/levels、/admin/xp-rules

环境变量的完整清单见 环境变量。