Skip to content

Commit 50bbdea

Browse files
“bingtao”Paperclip-Paperclip
andcommitted
fix(new-api): default listen port 8801 (WAR-39)
Align setup.sh and nlt-services.sh defaults with project convention; document in README. Start still runs cwd=data dir for .env. Co-Authored-By: Paperclip <noreply@paperclip.ing> Made-with: Cursor
1 parent 0c4f4ab commit 50bbdea

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
- **download**`nlt-download` — 对 GitHub 族 HTTPS 下载 URL 做可选镜像/前缀改写后调用 `curl`;仓库内 **new-api / code-server / gum 安装路径** 等已统一经 `_nlt_github_download_curl` / `nlt-github-download.sh` 调用(见 `scripts/tools/download/README.md`)。
1515
- **paperclip**:从 **GitHub 克隆** [paperclipai/paperclip](https://github.com/paperclipai/paperclip) 源码、`pnpm install`,并以 **`pnpm paperclipai run`** 启停;默认安装根 `~/opt/paperclip`**默认工作区** **`~/opt/paperclip/workspace`**(环境变量 **`PAPERCLIP_WORKSPACE`**,可改)。`start` 会在实例就绪后尽量把上游 **`~/.paperclip/instances/<id>/workspaces`** 符号链接到该目录(若该 `workspaces` 已非空则跳过)。数据目录另见上游 `~/.paperclip/…`。无实例配置时 **`start` 会先非交互执行 `onboard --yes`**(依赖 `script(1)`);也可手动 **`nlt-paperclip onboard`**(或 `NONINTERACTIVE=1 nlt-paperclip onboard`)。
1616
- **code-server**:从 **GitHub Releases** 下载官方 **standalone** 压缩包并解压到 `~/opt/code-server``nohup` 后台运行,默认绑定 `127.0.0.1:8080`;无需本机 Node.js。
17-
- **new-api**:从 **GitHub Releases** 下载 [QuantumNous/new-api](https://github.com/QuantumNous/new-api) 的预编译二进制到 `~/opt/new-api/bin`;数据目录默认 `~/opt/new-api/data`(SQLite 等),默认 **HTTP 端口 3000**;解析版本时会跳过无附件的 nightly,fallback `v0.12.6`
17+
- **new-api**:从 **GitHub Releases** 下载 [QuantumNous/new-api](https://github.com/QuantumNous/new-api) 的预编译二进制到 `~/opt/new-api/bin`;数据目录默认 `~/opt/new-api/data`(SQLite 等),默认 **HTTP 端口 8801**;解析版本时会跳过无附件的 nightly,fallback `v0.12.6`
1818
- **services**`nlt-services.sh`):**`nlt-services`** 总入口——**`status`** 汇总各常驻服务 PID/端口/HTTP 探测;**`install`** 先选 **安装 / 卸载** 再选模块(或 `install add|remove <模块>`);卸载不含 celery、utils(上游无 uninstall)。
1919

2020
仓库内脚本按 **`scripts/tools/`**(工具 / 环境)与 **`scripts/services/`**(常驻服务 + 聚合入口)分层存放,详见下文「目录结构」。

scripts/services/new-api/setup.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
# ./setup.sh # gum 菜单
88
# ./setup.sh install # 下载二进制到 ${NEW_API_SERVICE_HOME}/bin/new-api
99
# ./setup.sh update # 重新下载(同 install)
10-
# ./setup.sh start # 后台启动(工作目录为数据目录,默认端口 3000
10+
# ./setup.sh start # 后台启动(工作目录为数据目录,默认端口 8801
1111
# ./setup.sh stop | restart | status | uninstall
1212
#
1313
# 环境变量:
1414
# NEW_API_SERVICE_HOME 安装根(默认 ~/opt/new-api),内含 bin/new-api、data/(SQLite 等工作目录)
1515
# NEW_API_DATA_DIR 运行时的 cwd(默认 ${NEW_API_SERVICE_HOME}/data),库文件等写在此目录
16-
# NEW_API_PORT / PORT 监听端口(启动时 export PORT;默认 3000,与上游一致
16+
# NEW_API_PORT / PORT 监听端口(启动时 export PORT;默认 8801,可覆盖
1717
# NEW_API_VERSION 强制版本,如 0.12.6 或 v0.12.6(不设则从 Releases 解析)
1818
# NEW_API_GITHUB_REPO owner/repo(默认 QuantumNous/new-api)
1919
# NONINTERACTIVE=1
@@ -45,7 +45,7 @@ fi
4545
NEW_API_GITHUB_REPO="${NEW_API_GITHUB_REPO:-QuantumNous/new-api}"
4646
NEW_API_SERVICE_HOME="${NEW_API_SERVICE_HOME:-${HOME}/opt/new-api}"
4747
NEW_API_DATA_DIR="${NEW_API_DATA_DIR:-${NEW_API_SERVICE_HOME}/data}"
48-
NEW_API_PORT="${NEW_API_PORT:-3000}"
48+
NEW_API_PORT="${NEW_API_PORT:-8801}"
4949

5050
NEW_API_RUN_DIR="${NEW_API_SERVICE_HOME}/run"
5151
NEW_API_LOG_DIR="${NEW_API_SERVICE_HOME}/log"

scripts/services/nlt-services.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ cmd_status() {
154154
pid_cs="$(read_pid_file "${CODE_SERVER_SERVICE_HOME}/run/code-server.pid")"
155155

156156
NEW_API_SERVICE_HOME="${NEW_API_SERVICE_HOME:-${HOME}/opt/new-api}"
157-
NEW_API_PORT="${NEW_API_PORT:-3000}"
157+
NEW_API_PORT="${NEW_API_PORT:-8801}"
158158
pid_na="$(read_pid_file "${NEW_API_SERVICE_HOME}/run/new-api.pid")"
159159

160160
local ts flower_url cel_wbf cel_pids cel_probe

0 commit comments

Comments
 (0)