
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
https://github.com/yegor-usoltsev/obsidian-crdt-sync-server/actions/workflows/ci.yml/badge.svg](https://github.com/yegor-usoltsev/obsidian-crdt-sync-server/actions) https://img.shields.io/github/v/release/yegor-usoltsev/obsidian-crdt-sync-server?sort=semver](https://github.com/yegor-usoltsev/obsidian-crdt-sync-server/releases) https://img.shields.io/docker/v/yusoltsev/obsidian-crdt-sync-server?label=docker.io&sort=semver](https://hub.docker.com/r/yusoltsev/obsidian-crdt-sync-server) https://img.shields.io/docker/v/yusoltsev/obsidian-crdt-sync-server?label=ghcr.io&sort=semver](https://github.com/yegor-usoltsev/obsidian-crdt-sync-server/pkgs/container/obsidian-crdt-sync-server) https://img.shields.io/docker/image-size/yusoltsev/obsidian-crdt-sync-server?sort=semver&arch=amd64](https://hub.docker.com/r/yusoltsev/obsidian-crdt-sync-server/tags)
⚠️ Early development — This server is in active early development. Use at your own risk.
A self-hosted sync backend for the https://github.com/yegor-usoltsev/obsidian-crdt-sync Obsidian plugin. It keeps your vault state in one place so your devices can stay in sync without giving your notes to a third-party service.
Copy .env.example to .env and set AUTH_TOKEN:
shcp .env.example .env # edit .env and set AUTH_TOKEN
Generate a token with:
shopenssl rand -base64 32
Then start the server:
shdocker compose up -d
shdocker run -d \ -p 3000:3000 \ -v ./data:/data \ -e AUTH_TOKEN="your-random-secret-at-least-32-chars" \ -e DATA_DIR=/data/db \ -e BACKUP_GIT_WORKTREE_DIR=/data/git \ yusoltsev/obsidian-crdt-sync-server:latest
shbun install bun src/index.ts
Set environment variables via a .env file or export them before running. See .env.example for all options.
| Variable | Required | Default | Description |
|---|---|---|---|
AUTH_TOKEN | ✅ | — | Shared secret for WebSocket auth (min 32 chars) |
PORT | 3000 | Port to listen on | |
DATA_DIR | ./data/db | Directory for the SQLite database | |
BACKUP_GIT_INTERVAL_MINUTES | — | Enable periodic Git backup (positive integer) | |
BACKUP_GIT_URL | when backup enabled | — | HTTPS remote URL |
BACKUP_GIT_USERNAME | when backup enabled | — | Git HTTPS username |
BACKUP_GIT_PASSWORD | when backup enabled | — | Git HTTPS password or token |
BACKUP_GIT_BRANCH | main | Branch to push backups to | |
BACKUP_GIT_WORKTREE_DIR | ./data/git | Local worktree directory | |
BACKUP_GIT_AUTHOR_NAME | Obsidian Sync | Git author name for backup commits | |
BACKUP_GIT_AUTHOR_EMAIL | obsidian-sync@localhost | Git author email for backup commits |
GET /health returns {"status":"ok"} with HTTP 200.
DATA_DIR accordingly.BACKUP_GIT_PASSWORD is used as a plain HTTPS password or personal access token. Use a token with minimal required permissions.This server is published as a multi-platform Docker image for linux/amd64 and linux/arm64.
Images are available from:
Create a release tag from a clean main branch:
shbun run release patch # or: bun run release minor # or: bun run release major
The local release script computes the next semantic version from existing Git tags, creates the new X.Y.Z tag, and pushes it to GitHub.
The GitHub Actions release workflow then runs GoReleaser on that tag. GoReleaser installs dependencies, builds a bundled main.js, creates the GitHub release, and builds/publishes the Docker image to both Docker Hub and GHCR by copying only that file into the runtime image.
For a local dry run of the release pipeline:
shgoreleaser release --snapshot --clean
For a plain local image build without GoReleaser:
shbun run build docker build -t obsidian-crdt-sync-server:test .
This project uses [***] Release tags use the plain X.Y.Z format and drive both GitHub releases and Docker image tags.
Pull requests are welcome. For larger changes, open an issue first, especially if the change affects the wire protocol, on-disk storage format, or release packaging.
https://github.com/yegor-usoltsev/obsidian-crdt-sync-server/blob/main/LICENSE
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务