Add deployment traces for the JPpro proxy node, RackNerd origin hosts, catproxy boundary changes, local speed checks, and Sub2API rate-limit behavior. Keep remote secrets excluded while tracking sanitized nginx, compose, plan, and operational memory documents.
4.2 KiB
4.2 KiB
US RackNerd 0425 Sub2API Remote Inventory
最后核对时间:2026-05-26 12:10 Asia/Shanghai
远程位置
- Tabby profile:
个人-US-racknerd-0425-1c1g - Hostname:
racknerd-042910c - 公网 IP:
107.173.86.201 - 当前公网入口:
https://pai.cyan2000.uk - 迁移后角色:旧机,短期回滚来源
- 部署目录:
/opt/sub2api - Compose project:
sub2api - 系统:已验证为 Linux 服务器;本次未读取完整
/etc/os-release
本地留痕
- 当前远程 Compose 副本:
current/docker-compose.yml - 当前远程 nginx 站点副本:
current/nginx-sub2api.conf - 迁移包 SHA256 记录:
backups/migrate-to-racknerd-0526-20260525-205103.SHA256SUMS - 密钥目录说明:
secrets/README.md
真实 .env、Mihomo 配置、订阅文件和临时备份不得提交。需要本地留存时放入 secrets/ 或 backups/,并确认 .gitignore 已排除。
当前远程配置状态
- nginx 管理公网域名
pai.cyan2000.uk,证书由 Certbot 管理。 - nginx 配置路径:
/etc/nginx/sites-available/sub2api.conf - nginx 启用路径:
/etc/nginx/sites-enabled/sub2api.conf -> /etc/nginx/sites-available/sub2api.conf - Sub2API 只绑定宿主机
127.0.0.1:8080,由 nginx 反代公网 HTTPS。 - Docker Compose 使用本地目录持久化,不使用 Docker 命名卷。
- 运行目录包含:
/opt/sub2api/data/opt/sub2api/postgres_data/opt/sub2api/redis_data/opt/sub2api/mihomo
- 当前容器:
sub2api:weishaw/sub2api:latest,healthy,127.0.0.1:8080->8080sub2api-postgres:postgres:18-alpine,healthysub2api-redis:redis:8-alpine,healthysub2api-mihomo:metacubex/mihomo:latest
- 最新运行数据规模快照:
data:约 70Mpostgres_data:约 201Mredis_data:约 16Mmihomo:约 44K
部署架构
Browser :443 HTTPS -> nginx -> 127.0.0.1:8080 -> sub2api container
-> postgres container
-> redis container
-> mihomo container (account proxy)
公网只应暴露 80/443/22。8080 只监听 127.0.0.1,PostgreSQL、Redis、Mihomo 不映射到公网。
迁移关系
这台服务器是已完成迁移的数据来源,并保留为短期回滚来源。目标服务器记录见:
ops/remote/us-racknerd-0526-sub2api/
迁移时已优先迁移:
- PostgreSQL 数据:
/opt/sub2api/postgres_data或通过pg_dump导出。 - Redis 数据:
/opt/sub2api/redis_data。 - Sub2API 数据目录:
/opt/sub2api/data。 - Mihomo 配置:
/opt/sub2api/mihomo。 - 运行配置:
/opt/sub2api/docker-compose.yml、/opt/sub2api/.env。 - nginx 配置:
/etc/nginx/sites-available/sub2api.conf,目标域名需改为proxy.api.lilifamily.com。
迁移包路径:
/opt/sub2api/backups/migrate-to-racknerd-0526-20260525-205103/
运行检查
cd /opt/sub2api
docker compose ps
curl -sS http://127.0.0.1:8080/health
curl --noproxy '*' -sS https://pai.cyan2000.uk/health
systemctl status nginx --no-pager
期望结果:
sub2api、sub2api-postgres、sub2api-redis为 healthy。- 本机
/health返回{"status":"ok"}。 - 公网入口
/health返回{"status":"ok"}。
操作记录
2026-05-26 迁移前盘点
- 通过 Tabby profile
个人-US-racknerd-0425-1c1g只读核对。 - 确认
/opt/sub2api存在且 Docker Compose 服务健康。 - 确认 nginx 站点配置由 Certbot 管理
pai.cyan2000.uk。 - 已将可提交的 Compose/nginx 配置副本写入
current/。
2026-05-26 迁移备份与回滚状态
- 旧机生成迁移包:
/opt/sub2api/backups/migrate-to-racknerd-0526-20260525-205103/。 - 迁移包包含 PostgreSQL custom dump、运行配置和非日志运行数据归档、旧 nginx 配置、SHA256 校验文件。
- 旧机本地
sha256sum -c SHA256SUMS校验通过。 - 迁移完成后只读复核:
sub2api、sub2api-postgres、sub2api-redis仍为 healthy,sub2api-mihomo仍为 running。 - 旧机本机
/health返回{"status":"ok"}。 - 未执行停机或数据删除操作;如新机回滚失败,可继续使用旧域名
https://pai.cyan2000.uk。