RustFS 对象存储
车库自建的 S3 兼容对象存储。上传走现有 upload.S3Client,不另写后端。完整运维说明以仓库 docs/architecture/rustfs.md 为准。
密钥不进文档站。 Access / Secret、SSH 密码只放本机 .env 与 VPS /etc/default/rustfs。
当前实例
本仓怎么接
配置中心有激活的存储档案则用档案;否则回退 .env 的 MEDIA_DELIVERY_MODE + S3_*。切后端不搬旧文件。
- Endpoint 只写
host:port,不要带 bucket 路径;自定义端点强制 path-style。 - 本机 API + 公网 RustFS 时,
S3_PUBLIC_ENDPOINT必须是浏览器能访问的地址。 - 改 env 后重启 Go API。更干净的做法:Admin → 配置中心 → 存储,建 S3 兼容档案并激活。
实现:platform/server/internal/catalog/upload/s3client.go。
CORS
Admin 预签名 PUT 从浏览器直打 :9000。VPS /etc/default/rustfs 已设 RUSTFS_CORS_ALLOWED_ORIGINS:
http://127.0.0.1:5175 · http://localhost:5175 · http://127.0.0.1:28082 · http://localhost:28082 · http://127.0.0.1:8088 · http://localhost:8088
期望 200 且带回 access-control-allow-origin。
Cursor MCP
用官方镜像 rustfs/mcp(文档里的 rustfs/rustfs-mcp 已失效)。本机 ~/.cursor/mcp.json:
工具:list_buckets · list_objects · create_bucket · delete_bucket · upload_file · get_object。Settings → MCP 等到绿点即可在对话里操作存储。
官方:MCP 指南