# Opengist 配置文件 # 了解更多关于 Opengist 配置的信息,请访问: # https://github.com/thomiceli/opengist/blob/master/docs/configuration/configure.md # https://github.com/thomiceli/opengist/blob/master/docs/configuration/cheat-sheet.md # 设置日志级别,可选值:debug(调试)、info(信息)、warn(警告)、error(错误)、fatal(致命)。默认值:warn log-level: warn # 设置日志输出位置,可选值:`stdout`(标准输出)、`file`(文件),或两者。默认值:stdout,file log-output: stdout,file # 访问 Opengist 的公共 URL external-url: # Opengist 存储其数据的目录。默认值:~/.opengist/ opengist-home: # 用于会话存储和加密数据库中 MFA 数据的密钥。默认值:一个随机生成的 32 字节字符串 secret-key: # 数据库的 URI。默认值:在 opengist-home 目录下创建 SQLite 数据库 opengist.db # SQLite: file:/path/to/database # PostgreSQL: postgres://user:password@host:port/database # MySQL/MariaDB: mysql://user:password@host:port/database db-uri: opengist.db # 定义代码索引器(可选 `bleve`、`meilisearch`,或留空表示不启用索引)。默认值:bleve index: bleve # 设置 Meilisearch 服务器的主机地址 index.meili.host: # 设置 Meilisearch 服务器的 API 密钥 index.meili.api-key: # 初始化 Git 仓库时 Opengist 使用的默认分支名称。 # 如果未设置,则使用 Git 的默认分支名称。详见 https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup#_new_default_branch git.default-branch: # 设置 SQLite 的日志模式。默认值:WAL # 参见 https://www.sqlite.org/pragma.html#pragma_journal_mode # 仅适用于 SQLite 数据库。 sqlite.journal-mode: WAL # HTTP 服务器配置 # 绑定的主机地址。默认值:0.0.0.0 http.host: 0.0.0.0 # 绑定的端口号。默认值:6157 http.port: 6157 # 启用或禁用通过 HTTP 进行 Git 操作(clone、pull、push)(`true` 或 `false`)。默认值:true http.git-enabled: true # 启用或禁用指标(metrics)端点(`true` 或 `false`)。默认值:false metrics.enabled: false # SSH 内置服务器配置 # 注意:它目前不使用系统自带的 SSH 守护进程 # 启用或禁用内置 SSH 服务器 # 用于通过 SSH 执行 Git 操作(clone、pull、push)(`true` 或 `false`)。默认值:true ssh.git-enabled: true # 绑定的主机地址。默认值:0.0.0.0 ssh.host: 0.0.0.0 # 绑定的端口号。默认值:2222 # 注意:不能与当前正在运行的 SSH 守护进程使用相同端口 # 如果想使用 22 端口作为内置 SSH 服务器, # 可以更改系统 SSH 守护进程的端口,或停止它 ssh.port: 2222 # Git SSH 连接的公共域名,如果与 HTTP 的不同。 # 如果未设置,则使用请求中的 URL ssh.external-domain: # ssh-keygen 可执行文件的路径或别名。默认值:ssh-keygen ssh.keygen-executable: ssh-keygen # OAuth2 配置 # 回调/重定向 URL 必须是 http://opengist.url/oauth//callback # 使用 GitHub 创建新的 OAuth2 应用程序:https://github.com/settings/applications/new github.client-key: github.secret: # 使用 GitLab 创建新的 OAuth2 应用程序:https://gitlab.com/-/user_settings/applications gitlab.client-key: gitlab.secret: # GitLab 实例的 URL。默认值:https://gitlab.com/ gitlab.url: https://gitlab.com/ # GitLab 实例的名称,将显示在 OAuth 登录按钮上。默认值:GitLab gitlab.name: GitLab # 使用 Gitea 创建新的 OAuth2 应用程序:https://gitea.domain/user/settings/applications gitea.client-key: gitea.secret: # Gitea 实例的 URL。默认值:https://gitea.com/ gitea.url: https://gitea.com/ # Gitea 实例的名称,将显示在 OAuth 登录按钮上。默认值:Gitea gitea.name: Gitea # 使用 OpenID Connect 创建新的 OAuth2 应用程序: oidc.provider-name: oidc.client-key: oidc.secret: # OpenID 提供商的发现端点。通常类似 http://auth.example.com/.well-known/openid-configuration oidc.discovery-url: # 包含用户组信息的声明(claim)名称 oidc.group-claim-name: # 获得管理员权限的用户组名称 oidc.admin-group: # 实例名称 # 设置自定义名称以替代默认的 'Opengist' custom.name: AhHuiの代码片段 # 自定义资源 # 添加自定义资源文件,这些文件相对于 $opengist-home/custom/ 目录 custom.logo: custom.favicon: # 页脚中的静态页面(如法律声明、隐私政策等) # 路径可以是 URL,也可以是相对于 $opengist-home/custom/ 目录的文件路径 custom.static-links: - name: 个人主页 path: https://home.gyhwd.top/ - name: 站长博客 path: https://gyhwd.top/