Skip to content

安装部署 ​

系统要求 ​

项目最低要求
操作系统Windows / Linux / macOS
架构amd64 / arm64
内存512MB+
磁盘100MB+(不含数据存储)

下载安装 ​

Linux ​

bash
# 下载
wget https://github.com/your-repo/releases/latest/download/sss-run-linux-amd64 -O sss_run

# 添加执行权限
chmod +x sss_run

# 运行
./sss_run run

macOS ​

bash
# 下载
curl -L https://github.com/your-repo/releases/latest/download/sss-run-darwin-amd64 -o sss_run

# 添加执行权限
chmod +x sss_run

# 运行
./sss_run run

Windows ​

  1. 下载 sss-run-windows-amd64.exe
  2. 重命名为 sss-run.exe
  3. 双击运行或在命令行中执行:
cmd
sss-run.exe run

Docker 部署 ​

基本部署 ​

bash
docker run -d \
  --name sss-run \
  -p 9301:9301 \
  -p 9302:9302 \
  sss-run:latest

带数据持久化 ​

bash
docker run -d \
  --name sss-run \
  -p 9301:9301 \
  -p 9302:9302 \
  -v /path/to/data:/app/data \
  -v /path/to/config.yaml:/app/config.yaml \
  sss-run:latest

Docker Compose ​

yaml
version: '3'
services:
  sss-run:
    image: sss-run:latest
    ports:
      - "9301:9301"
    volumes:
      - ./data:/app/data
      - ./config.yaml:/app/config.yaml
    restart: unless-stopped

Windows 服务模式 ​

SSS-RUN支持以 Windows 服务方式运行:

cmd
# 安装服务
sss-run.exe install

# 启动服务
sss-run.exe start

# 停止服务
sss-run.exe stop

# 重启服务
sss-run.exe restart

# 查看状态
sss-run.exe status

# 卸载服务
sss-run.exe uninstall

命令行参数 ​

命令说明
sss_run交互模式(前台运行)
sss_run run交互模式(前台运行)
sss_run install安装为 Windows 服务
sss_run start启动 Windows 服务
sss_run stop停止 Windows 服务
sss_run restart重启 Windows 服务
sss_run uninstall卸载 Windows 服务
sss_run status查看服务状态
sss_run -v显示版本号
sss_run -h显示帮助信息

配置与启动 ​

  1. 将 config.yaml 放在与可执行文件同目录下
  2. 根据需要修改配置(详见 配置 页面)
  3. 启动服务
  4. 浏览器访问 http://localhost:9301

常见问题 ​

端口被占用 ​

修改 config.yaml 中的 server.port 为其他可用端口。

无法访问 ​

  1. 检查防火墙是否放行对应端口
  2. 检查 server.host 是否设置为 0.0.0.0
  3. Linux 环境检查 SELinux 设置

数据库连接失败 ​

  1. 确认数据库服务已启动
  2. 检查连接信息是否正确
  3. 检查网络连通性

Nginx 反向代理部署 ​

生产环境建议使用 Nginx 作为反向代理,提供 SSL 终端、静态资源缓存、WebSocket 代理、安全加固等能力。详细配置请参考 Nginx 部署 页面。

版权所有.