安装

Utterlog 只依赖 Docker。几行命令即可在任何 Linux 发行版上跑起来。

要求

资源最低推荐
内存1 GB2 GB+
磁盘5 GB20 GB+(含上传素材)
CPU1 核2 核
系统任何支持 Docker Engine 的 Linux(Debian/Ubuntu/RHEL/Alpine 等)

一行命令安装

curl -fsSL https://utterlog.io/install.sh | bash

脚本做的事:

  1. 检查 Docker + docker-compose-plugin
  2. 新建 ./utterlog/,下载 2 个文件:docker-compose.yml + .env.example
  3. 生成 .env,随机化 DB_PASSWORD(16 位)+ JWT_SECRET(48 位)
  4. docker compose pull — 从 registry.utterlog.io 拉 4 个预构建镜像
  5. docker compose up -d — 启动 postgres / redis / api / web
纯拉镜像,不编译。不 git clone(省 9000+ 文件)、不本地构建(省 ~4GB RAM、不需要 Go/Node 工具链)。 512MB 小 VPS 也能跑。预计 30 秒跑完(看网络拉镜像速度)。

环境变量

变量作用默认
UTTERLOG_DIR安装路径./utterlog
UTTERLOG_IMAGE_PREFIX镜像源(CN 友好默认 / GHCR 回退)registry.utterlog.io/utterlog
UTTERLOG_IMAGE_TAG镜像标签(回滚时锁定版本)latest
UTTERLOG_PORTAPI 本地绑定端口(仅 127.0.0.1)9260
UTTERLOG_IMAGE_PREFIX=ghcr.io/utterlog \ UTTERLOG_DIR=/opt/utterlog \ curl -fsSL https://utterlog.io/install.sh | bash

配置反向代理

API 默认绑在 127.0.0.1:9260,不对外开放。需要你自己的 nginx / caddy 反代到公网端口。最小 nginx 片段:

server {
    listen 443 ssl http2;
    server_name blog.example.com;
    ssl_certificate     /path/to/fullchain.pem;
    ssl_certificate_key /path/to/privkey.pem;

    location / {
        proxy_pass http://127.0.0.1:9260;
        proxy_set_header Host              $host;
        proxy_set_header X-Real-IP         $remote_addr;
        proxy_set_header X-Forwarded-For   $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Caddy 用户更简单:

blog.example.com {
    reverse_proxy 127.0.0.1:9260
}

让 Utterlog 自带 Caddy(可选)

如果你服务器上没有任何其他反向代理,可以让 Utterlog 直接接管 443:

DOMAIN=blog.example.com curl -fsSL https://utterlog.io/install.sh | bash

它会启用内置 Caddy 容器,自动申请 Let's Encrypt 证书。

完成安装向导

浏览器访问 https://blog.example.com/install,按三步向导走:

  1. 数据库 — 已预填 Docker 默认值,点「测试连接」成功后下一步
  2. Redis — 同上
  3. 管理员 — 填邮箱、密码、站点标题和 URL,点「开始安装」

完成后会显示凭据摘要页,列出数据库密码、JWT secret、管理员账号等全部信息。此页只显示一次 — 请先点「复制全部」或「导出 TXT」保存到安全位置。

下一步


在 GitHub 上编辑此页© Utterlog Project