← 返回到所有服务
GitHub 仓库信息
获取时间 · 2026年6月5日 ★ 3,193 最新版本: v1.12.2 最后更新: 2026年6月5日
README
# Opengist
<img height="108px" src="https://raw.githubusercontent.com/thomiceli/opengist/master/public/img/opengist.svg" alt="Opengist" align="right" />
Opengist is a **self-hosted** Pastebin **powered by Git**. All snippets are stored in a Git repository and can be
read and/or modified using standard Git commands, or with the web interface.
It is similar to [GitHub Gist](https://gist.github.com/), but open-source and could be self-hosted.
[Home Page](https://opengist.io) • [Documentation](https://opengist.io/docs) • [Discord](https://discord.gg/9Pm3X5scZT) • [Demo](https://demo.opengist.io)


[](https://github.com/thomiceli/opengist/actions/workflows/go.yml)
[](https://goreportcard.com/report/github.com/thomiceli/opengist)
[](https://tr.opengist.io/projects/_/opengist/)
## Features
* Create public, unlisted or private snippets
* [Init](/docs/usage/init-via-git.md) / Clone / Pull / Push snippets **via Git** over HTTP or SSH
* Syntax highlighting ; markdown & CSV support
* Search code in snippets; browse users snippets, likes and forks
* Add topics to snippets
* Embed snippets in other websites
* Revisions history
* Like / Fork snippets
* Download raw files or as a ZIP archive
* OAuth2 login with GitHub, GitLab, Gitea, and OpenID Connect
* Restrict or unrestrict snippets visibility to anonymous users
* Docker support / Helm Chart
* [More...](/docs/introduction.md#features)
## Quick start
### With Docker
Docker [images](https://github.com/thomiceli/opengist/pkgs/container/opengist) are available for each release :
```shell
docker pull ghcr.io/thomiceli/opengist:1.12
```
It can be used in a `docker-compose.yml` file :
1. Create a `docker-compose.yml` file with the following content
2. Run `docker compose up -d`
3. Opengist is now running on port 6157, you can browse http://localhost:6157
```yml
services:
opengist:
image: ghcr.io/thomiceli/opengist:1.12
container_name: opengist
restart: unless-stopped
ports:
- "6157:6157" # HTTP port
- "2222:2222" # SSH port, can be removed if you don't use SSH
volumes:
- "$HOME/.opengist:/opengist"
```
You can define which user/group should run the container and own the files by setting the `UID` and `GID` environment variables :
```yml
services:
opengist:
# ...
environment:
UID: 1001
GID: 1001
```
### Via binary
Download the archive for your system from the release page [here](https://github.com/thomiceli/opengist/releases/latest), and extract it.
```shell
# example for linux amd64
wget https://github.com/thomiceli/opengist/releases/download/v1.12.2/opengist1.12.2-linux-amd64.tar.gz
tar xzvf opengist1.12.2-linux-amd64.tar.gz
cd opengist
chmod +x opengist
./opengist # with or without `--config config.yml`
```
Opengist is now running on port 6157, you can browse http://localhost:6157
### From source
Requirements: [Git](https://git-scm.com/downloads) (2.28+), [Go](https://go.dev/doc/install) (1.23+), [Node.js](https://nodejs.org/en/download/) (16+), [Make](https://linux.die.net/man/1/make) (optional, but easier)
```shell
git clone https://github.com/thomiceli/opengist
cd opengist
make
./opengist
```
Opengist is now running on port 6157, you can browse http://localhost:6157
---
To create and run a development environment, see [run-development.md](/docs/contributing/development.md).
## Documentation
The documentation is available at [https://opengist.io/](https://opengist.io/) or in the [/docs](/docs) directory.
## License
Opengist is licensed under the [AGPL-3.0 license](/LICENSE).
OpenGist 是一个基于 Git 的自托管代码片段分享平台,是 GitHub Gist 的开源替代品。所有代码片段都存储在 Git 仓库中,可以通过标准的 Git 命令或网页界面进行读写和修改。
主要功能
- Git 集成:支持通过 HTTP 或 SSH 进行 Git 操作
- 语法高亮:支持多种编程语言的代码高亮
- Markdown 支持:支持 Markdown 和 CSV 格式
- 搜索功能:支持在代码片段中搜索
- 版本历史:完整的修改历史记录
- 嵌入功能:支持将代码片段嵌入到其他网站
- 主题标签:可以为代码片段添加主题标签
- 点赞/复刻:支持点赞和复刻他人的代码片段
- 下载选项:支持下载原始文件或 ZIP 压缩包
- OAuth2 登录:支持 GitHub、GitLab、Gitea 和 OpenID Connect 登录
- 访问控制:可限制或开放匿名用户访问权限
部署要求
- Docker 支持
- 或 Go 1.23+ 环境
- Node.js 16+
- Git 2.28+
- 最低配置:1核 CPU,512MB 内存
- 推荐配置:2核 CPU,1GB 内存
- 存储空间:基础安装约 100MB,实际需求取决于数据量