Opengist 是一款基于 Git 构建的自托管代码片段服务,完美复刻了 Gist 的体验但完全开源。它支持通过标准 Git 命令或 Web 界面管理代码,提供语法高亮、版本历史及 OAuth2 登录。特别适合追求数据主权、喜欢折腾 Docker 部署的开发者团队,让代码片段永久留存且随时可查。
核心亮点:
- 基于 Git 存储,支持通过标准 Git 命令直接克隆和推送片段
- 提供完整的 Web 界面,支持代码高亮、Markdown 及 CSV 格式
- 支持私有、公开及未列出的片段权限,保障代码安全性
- 内置 Docker 部署方案,一键启动即可拥有专属代码仓库
当前版本 v1.16.0(2026-11-21 发布),开源协议 AGPL-3.0,GitHub 3,421 star。



核心信息
| 软件名称 | Opengist(thomiceli/opengist) |
| 当前版本 | v1.16.0 |
| 更新日期 | 2026-11-21 |
| 开源协议 | AGPL-3.0 |
| 软件分类 | 自托管服务 |
| 关键词 | docker、gist、git、go、golang、opengist |
本次更新内容
- 新版本修复了多项安全漏洞,请尽快更新以保护数据安全。
- 新增代码片段评论功能,方便用户交流讨论。
- 此前版本中,部分操作方式有变:启用多因素认证的用户需使用令牌或SSH进行Git HTTP操作;短链接仅适用于公开片段;注销和取消OAuth关联需通过POST请求完成。
- 密码修改后其他会话将自动登出;OAuth账户若为唯一登录方式则无法取消关联;私有片段禁止跨域嵌入或获取;过期片段将立即隐藏并在启动时清理。
查看官方英文更新日志(原文)
See here how to [update](https://opengist.io/docs/update) Opengist. ### ⚠️ Security release ⚠️ This release fixes 13 security vulnerabilities, please update as soon as possible. Check the breaking changes and the steps after updating below. ### Added - Gist comments (#855) ### Security - Unauthenticated writes to gists over Git HTTP ([GHSA-9mjv-vm4v-484w](https://github.com/thomiceli/opengist/security/advisories/GHSA-9mjv-vm4v-484w)) - LDAP filter injection, and LDAP usernames used unchecked as directory names ([GHSA-883q-jwxx-r7hv](https://github.com/thomiceli/opengist/security/advisories/GHSA-883q-jwxx-r7hv)) - Stored XSS through data attributes in Jupyter notebooks ([GHSA-72x9-42q6-qv57](https://github.com/thomiceli/opengist/security/advisories/GHSA-72x9-42q6-qv57)) - CPU exhaustion through the `Accept-Language` header ([GHSA-q3qv-c8qq-94mj](https://github.com/thomiceli/opengist/security/advisories/GHSA-q3qv-c8qq-94mj)) - MFA bypass for Git over HTTP ([GHSA-cxgj-pv47-623m](https://github.com/thomiceli/opengist/security/advisories/GHSA-cxgj-pv47-623m)) - Unlisted gists found through SQL `LIKE` wildcards and short UUIDs ([GHSA-cj4r-8jph-fj2r](https://github.com/thomiceli/opengist/security/advisories/GHSA-cj4r-8jph-fj2r)) - Private gist content in 404 page metadata ([GHSA-v3mc-8qrc-4783](https://github.com/thomiceli/opengist/security/advisories/GHSA-v3mc-8qrc-4783)) - Admin configuration page rendered without login through `/assets` ([GHSA-mvf3-jgxj-234c](https://github.com/thomiceli/opengist/security/advisories/GHSA-mvf3-jgxj-234c)) - Expired gists still readable through the API, Git and SSH ([GHSA-vwph-vv8j-r7c2](https://github.com/thomiceli/opengist/security/advisories/GHSA-vwph-vv8j-r7c2)) - Sessions kept after a password change ([GHSA-gpv4-fhpg-j56g](https://github.com/thomiceli/opengist/security/advisories/GHSA-gpv4-fhpg-j56g)) - Private gist content exposed through same-site JavaScript embeds ([GHSA-q5gv-w47x-g49j](https://github.com/thomiceli/opengist/security/advisories/GHSA-q5gv-w47x-g49j)) - Search index not updated after API edits, exposing gists made private or unlisted ([GHSA-r2m8-gcqg-5xvm](https://github.com/thomiceli/opengist/security/advisories/GHSA-r2m8-gcqg-5xvm)) - OAuth unlink and logout through cross-site GET requests ([GHSA-r94p-cgwr-fq9w](https://github.com/thomiceli/opengist/security/advisories/GHSA-r94p-cgwr-fq9w)) ### Breaking changes - Users with MFA (TOTP or passkey) must use an access token or SSH for Git over HTTP, their password is refused - Short UUIDs only work for public gists, unlisted and private gists need their full UUID or custom URL - `GET /-/logout` and `GET /oauth/:provider/unlink` are removed, logging out and unlinking an OAuth account require a POST request with the CSRF token (check reverse proxy or SSO logout redirects) - LDAP: first logins are refused when the username contains whitespace or `/ \ : ? # %`, ends with a dot, or is a reserved name. For example, a `cn` li
下载地址
以下为官方原包,本站不二次打包;多个文件为不同包型,按需选择其中一个下载即可:
opengist1.16.0-linux-amd64.tar.gz(官方原包 | 33.0 MB)
opengist1.16.0-webdist.tar.gz(官方原包 | 1.9 MB)
✅ 上方 SHA256 与官方发布值一致,可自行核对。
快速上手
- 运行解压后的 opengist 可执行文件启动服务
- 打开浏览器访问 localhost:6157 进入主页
- 在界面中创建或管理代码片段
- 通过 Git 命令克隆或推送代码片段
提示:默认监听 6157 端口,SSH 功能需额外配置端口映射
讨论(0 条)