点击下方按钮,即可将本项目一键部署到对应平台:
| EdgeOne Functions · 国际站 | EdgeOne Functions · 中国站 | Cloudflare Workers · 全球站 |
|---|---|---|
部署完成后,请登录对应平台后台修改环境变量(参考下方变量说明):
docker pull openlistteam/openlist_api_server或使用 GitHub 镜像源:
docker pull ghcr.io/openlistteam/openlist_api_server:latest镜像支持多平台架构:
linux/amd64、linux/arm64
docker run -d --name oplist-api-server \
-p 3000:3000 \
-e OPLIST_MAIN_URLS="api.example.com" \
-e OPLIST_PROXY_API="gts.example.com" \
-e OPLIST_ONEDRIVE_UID= `#optional` \
-e OPLIST_ONEDRIVE_KEY= `#optional` \
-e OPLIST_ALICLOUD_UID= `#optional` \
-e OPLIST_ALICLOUD_KEY= `#optional` \
-e OPLIST_BAIDUYUN_UID= `#optional` \
-e OPLIST_BAIDUYUN_KEY= `#optional` \
-e OPLIST_BAIDUYUN_EXT= `#optional` \
-e OPLIST_CLOUD115_UID= `#optional` \
-e OPLIST_CLOUD115_KEY= `#optional` \
-e OPLIST_GOOGLEUI_UID= `#optional` \
-e OPLIST_GOOGLEUI_KEY= `#optional` \
-e OPLIST_YANDEXUI_UID= `#optional` \
-e OPLIST_YANDEXUI_KEY= `#optional` \
-e OPLIST_DROPBOXS_UID= `#optional` \
-e OPLIST_DROPBOXS_KEY= `#optional` \
-e OPLIST_QUARKPAN_UID= `#optional` \
-e OPLIST_QUARKPAN_KEY= `#optional` \
-e OPLIST_CLOUD123_UID= `#optional` \
-e OPLIST_CLOUD123_KEY= `#optional` \
-e OPLIST_CLOUD123_URL= `#optional` \
openlistteam/openlist_api_server:latest可替换镜像为 ghcr 源:
ghcr.io/openlistteam/openlist_api_server:latest
Important
请务必根据下方环境变量说明,修改你实际使用的环境变量。
| 变量名称 | 必要 | 变量类型 | 变量说明 |
|---|---|---|---|
OPLIST_MAIN_URLS |
是 | string | 绑定主域名,示例:api.example.com |
OPLIST_PROXY_API |
否 | string | 部署在大陆的节点需要指定代理谷歌 |
OPLIST_ONEDRIVE_UID |
否 | string | OneDrive 客户端ID |
OPLIST_ONEDRIVE_KEY |
否 | string | OneDrive 客户端密钥 |
OPLIST_ALICLOUD_UID |
否 | string | 阿里云盘开发者AppID |
OPLIST_ALICLOUD_KEY |
否 | string | 阿里云盘开发者AppKey |
OPLIST_BAIDUYUN_UID |
否 | string | 百度网盘应用UID |
OPLIST_BAIDUYUN_KEY |
否 | string | 百度网盘应用密钥AppKey |
OPLIST_BAIDUYUN_EXT |
否 | string | 百度网盘应用SecretKey |
OPLIST_CLOUD115_UID |
否 | string | 115网盘应用ID |
OPLIST_CLOUD115_KEY |
否 | string | 115网盘应用密钥 |
OPLIST_GOOGLEUI_UID |
否 | string | 谷歌客户端ID |
OPLIST_GOOGLEUI_KEY |
否 | string | 谷歌客户端秘钥 |
OPLIST_YANDEXUI_UID |
否 | string | Yandex应用ID |
OPLIST_YANDEXUI_KEY |
否 | string | Yandex应用密钥 |
OPLIST_DROPBOXS_UID |
否 | string | Dropboxx应用ID |
OPLIST_DROPBOXS_KEY |
否 | string | Dropbox应用密钥 |
OPLIST_QUARKPAN_UID |
否 | string | 夸克云盘x应用ID |
OPLIST_QUARKPAN_KEY |
否 | string | 夸克云盘应用密钥 |
OPLIST_CLOUD123_UID |
否 | string | 123云盘客户端ID |
OPLIST_CLOUD123_KEY |
否 | string | 123云盘客户端密钥 |
OPLIST_CLOUD123_URL |
否 | string | 123云盘API地址 |
git clone https://github.com/OpenListTeam/OpenList-APIPages.git创建并修改 wrangler.jsonc:
cp wrangler.example.jsonc wrangler.encrypt.jsonc修改变量信息:
MAIN_URLS:部署回调地址的域名- 其他参数:各个网盘的应用信息
变量说明见上方环境变量说明:
wrangler.jsonc中的变量名对应去掉OPLIST_前缀的小写形式,例如OPLIST_ONEDRIVE_UID→onedrive_uid。
npm install
# 以 Cloudflare Worker 环境运行
npm run dev-cf
# 以 EdgeOne Functions 环境运行
npm run dev-eo
# 以 Node Service Worker 环境运行
npm run dev-js# 以 Cloudflare Worker 环境部署
npm run deploy-cf
# 以 EdgeOne Functions 环境部署
npm run deploy-eo
# 以 Node Service Worker 本地运行
npm run build-js && npm run deploy-js前端已重构为基于 React 18 + TypeScript + Vite + Ant Design 5 的单页应用,源码位于 frontend/ 目录,构建产物输出到部署目录 public/。
- 多语言国际化(i18n):默认跟随浏览器语言,支持简体中文 / 英文 / 繁体中文 / 日语 / 韩语
- 暗黑 / 白天主题:默认跟随浏览器主题,支持手动切换并记忆
- 现代化科技感 UI:玻璃拟态卡片、渐变网格背景、流畅动效
# 1. 安装前端依赖并启动开发服务器(默认 5173 端口,已配置 API 代理到 3000)
npm run dev-web
# 2. 另开终端启动后端(Node 环境)
npm run dev-js# 构建产物直接输出到 public/ 目录
npm run build-webNote
前端构建产物输出到 public/ 目录,该目录已加入 .gitignore,无需提交到仓库。所有部署方式都会在部署时自动构建前端:
- EdgeOne:
npm run build-eo已内置build-web构建步骤。 - Cloudflare Worker:
wrangler.jsonc配置了build.command = "npm run build-web",wrangler deploy前会自动构建。 - Docker:
Dockerfile/Dockerfile-Lite在镜像构建阶段执行npm run build-web生成静态资源。
| 站点 | 地址 |
|---|---|
| 全球地址 | https://api.oplist.org/<driver>/requests |
| 国内地址 | https://api-cn.oplist.org/<driver>/requests |
| 参数名称 | 类型 | 必要 | 示例 | 说明 |
|---|---|---|---|---|
driver |
str |
是 | onedrive |
平台驱动名称,详见配置设置 |
server_use |
str |
是 | true |
如果为真,则无需提供 AppID 和 Key |
client_uid |
str |
是 | 4308adf60f3fe4058533 |
提供客户端 ID,详见配置设置 |
client_key |
str |
是 | 09F260A4BF5EF7F4181E35E59759C0BC |
提供应用密码,详见配置设置 |
driver_txt |
str |
是 | onedrive_go |
驱动类型,格式 driver + 类型后缀 |
server_set |
str |
是 | true |
是否使用服务器预设的应用 ID 和密钥 |
secret_key |
str |
否 | 3yp8NOMsRulxll44f5ayrxF1vgBfPW85 |
百度网盘额外需要 secret_key 字段 |
如果执行无误,会返回 url。
| 参数名称 | 类型 | 必要 | 示例 | 说明 |
|---|---|---|---|---|
text |
str |
否 | https://example.com/oauth2/login/?xxx=xxxxxx |
返回登录链接到前端 |
https://api.oplist.org/<driver>/callback
| 参数名称 | 类型 | 必要 | 示例 | 说明 |
|---|---|---|---|---|
driver |
str |
是 | onedrive |
平台驱动名称,详见配置设置 |
code |
str |
是 | 40YJzShAJSodbIXvNEw3Ru9N4Lkznx93 |
回调的认证代码,登录之后 URL 自带 |
server_use |
str |
是 | true |
如果为真,则无需提供 AppID 和 Key |
client_uid |
str |
否 | 4308adf60f3fe4058533 |
提供云盘验证码登录提供 client_uid |
client_key |
str |
否 | 09F260A4BF5EF7F4181E35E59759C0BC |
提供云盘验证码登录提供 client_key |
grant_type |
str |
否 | authorization_code |
提供云盘,固定 authorization_code |
如果执行无误,会返回经 Base64 编码的 JSON 数据。
| 参数名称 | 类型 | 必要 | 示例 | 说明 |
|---|---|---|---|---|
<url 302重定向> |
302 |
否 | /#eyJhY2Nlc3Nf...... |
返回编码的数据到前端 |
access_token |
str |
否 | VqKbrWpetI3HnvyvsWquv9BJFL3j4xjc |
返回访问令牌到前端 |
refresh_token |
str |
否 | oMMPXrCCrRwMoqVD321Z03PSoxmsAKjI |
返回刷新令牌到前端 |
server_use |
str |
否 | true |
是否使用 OpenList 提供的参数 |
client_uid |
str |
否 | b2eaau943b1bx464 |
用户传入的客户端 ID |
client_key |
str |
否 | SHcAplYIY679BEVF9FveGKtLuSI6MikU |
用户传入的应用密钥 |
driver_txt |
str |
否 | onedrive |
用户传入的驱动类型 |
message_err |
str |
否 | Connection reset by peer |
服务端错误信息 |
https://api.oplist.org/<driver>/renewapi
| 参数名称 | 类型 | 必要 | 示例 | 说明 |
|---|---|---|---|---|
apps_types |
str |
是 | onedrive_go |
平台网盘类型,详见配置设置 |
refresh_ui |
str |
是 | 40YJzShAJSodbIXvNEw3Ru9N4Lkznx93 |
刷新需要 token,登录之后 URL 自带 |
server_use |
str |
是 | true |
如果为真,则无需提供 AppID 和 Key |
client_uid |
str |
否 | 4308adf60f3fe4058533 |
提供云盘验证码登录提供 client_uid |
client_key |
str |
否 | 09F260A4BF5EF7F4181E35E59759C0BC |
提供云盘验证码登录提供 client_key |
secret_key |
str |
否 | 09F260A4BF5EF7F4181E35E59759C0BC |
百度网盘额外需要 secret_key 字段 |
如果执行无误,会返回 url。
| 参数名称 | 类型 | 必要 | 示例 | 说明 |
|---|---|---|---|---|
refresh_token |
str |
是 | xxxxxxxxxxxxxxx |
返回刷新令牌到前端 |
access_token |
str |
是 | xxxxxxxxxxxxxxx |
返回访问令牌到前端 |
| 网盘驱动 | 区域类型 | driver | apps_types | client_uid | client_key | secret_key |
|---|---|---|---|---|---|---|
| Onedrive | 个人版本 | onedrive |
onedrive_pr |
客户端 ID | 客户端秘钥 | / |
| Onedrive | 企业版本 | onedrive |
onedrive_go |
客户端 ID | 客户端秘钥 | / |
| Onedrive | 世纪互联 | onedrive |
onedrive_cn |
客户端 ID | 客户端秘钥 | / |
| Onedrive | 美国版本 | onedrive |
onedrive_us |
客户端 ID | 客户端秘钥 | / |
| Onedrive | 德国版本 | onedrive |
onedrive_de |
客户端 ID | 客户端秘钥 | / |
| 阿里云盘 | 跳转登录 | alicloud |
alicloud_go |
APP ID | App Secret | / |
| 阿里云盘 | 扫码登录 | alicloud |
alicloud_qr |
APP ID | App Secret | / |
| 阿里云盘 | 直接登录 | alicloud |
alicloud_cs |
/ | / | / |
| 百度云盘 | 验证登录 | baiduyun |
baiduyun_go |
AppID | AppKey | SecretKey |
| 百度云盘 | OOB 登录 | baiduyun |
baiduyun_go |
/ | / | / |
| 夸克云盘 | 验证登录 | quarkyun |
quarkyun_fn |
AppID | SignKey | / |
| 115 云盘 | 验证登录 | 115cloud |
115cloud_go |
AppID | AppSecret | / |
| 123 云盘 | 验证登录 | 123cloud |
123cloud_go |
client_id | client_secret | / |
| 谷歌云盘 | 验证登录 | googleui |
googleui_go |
客户端 ID | 客户端秘钥 | / |
| Yandex | 验证登录 | yandexui |
yandexui_go |
AppID | AppKey | / |
| Dropbox | 验证登录 | dropboxs |
dropboxs_go |
AppID | AppKey | / |
本项目的中国站点边缘函数、CDN 加速及安全防护由 Tencent EdgeOne 赞助。
OpenList · 让网盘接入更简单

{ "vars": { "MAIN_URLS": "api.example.com", "PROXY_API": "gts.example.com", "onedrive_uid": "*****************************", "onedrive_key": "*****************************", "alicloud_uid": "*****************************", "alicloud_key": "*****************************", "baiduyun_uid": "*****************************", "baiduyun_key": "*****************************", "baiduyun_ext": "*****************************", "cloud115_uid": "*****************************", "cloud115_key": "*****************************", "googleui_uid": "*****************************", "googleui_key": "*****************************", "yandexui_uid": "*****************************", "yandexui_key": "*****************************", "dropboxs_uid": "*****************************", "dropboxs_key": "*****************************", "quarkpan_uid": "*****************************", "quarkpan_key": "*****************************", "cloud123_uid": "*****************************", "cloud123_key": "*****************************", "cloud123_url": "*****************************" } }