亚马逊云科技

广告

安信SSL证书

广告

OpenList安装配置全指南

美国云服务器推荐

是继Alist被出售后又一崛起的免费网盘项目新秀,同时也是一个有韧性、长期治理、社区驱动的AList分支,可以已实现多种存储的文件列表程序,有效防御基于信任的开源攻击。下文详细展开有关OpenList的简介、安装和配置指南。

一、OpenList简介

OpenList是一个支持多存储的文件列表程序,采用AGPL-3.0授权,所支持的存储服务包括但不限于阿里云盘、OneDrive、189cloud、GoogleDrive、123pan、FTP/SFTP、PikPak、S3等等,使用Gin框架和Solidjs库,基于AList项目fork开发,延续了Alist的核心理念,并且始终坚持完全开源、社区驱动。

OpenList起源:

自上个月Alist被收购后,社区躁动不断,此情形下OpenList以Alist替代方案的形式应运而生,源自AList的开源网盘聚合工具。OpenList上线短短两天,便在GitHub上收获了2100颗星星的青睐。

OpenList优势:

  • 开源免费:代码完全公开,不存在任何隐藏收费或商业限制;
  • 功能兼容:支持Alist的多网盘聚合、WebDAV支持、文件预览等大部分核心功能;
  • 社区活跃:由开发者社区热情维护,更新速度快,问题响应及时;
  • 轻量高效:资源占用比商业化后的 Alist 更低;
  • 注重隐私:不收集用户数据,所有操作均在本地完成。

二、OpenList安装部署

1、一键安装脚本

要求:

  • 使用systemd的Linux系统
  • Root权限
  • 已安装curl, tar
  • 在下载页面中列出的架构:https://doc.oplist.org/guide/installation/download

正式版安装:

curl -fsSL https://res.oplist.org/script/v4.sh > install-openlist-v4.sh && sudo bash install-openlist-v4.sh
bash
欢迎使用 OpenList 管理脚本

基础功能:
1、安装 OpenList
2、更新 OpenList
3、卸载 OpenList
——————-
服务管理:
4、查看状态
5、密码管理
6、启动 OpenList
7、停止 OpenList
8、重启 OpenList
——————-
配置管理:
9、备份配置
10、恢复配置
——————-
高级选项:
11、Docker 管理
12、定时更新
13、系统状态
14、关于
——————-
0、退出脚本

最后根据界面提示输入1即可安装。

面板管理命令:

使用openlist或者openlist-manager命令:

欢迎使用 OpenList 管理脚本

基础功能:
1、安装 OpenList
2、更新 OpenList
3、卸载 OpenList
——————-
服务管理:
4、查看状态
5、密码管理
6、启动 OpenList
7、停止 OpenList
8、重启 OpenList
——————-
配置管理:
9、备份配置
10、恢复配置
——————-
高级选项:
11、Docker 管理
12、定时更新
13、系统状态
14、关于
——————-
0、退出脚本

注意:如果使用的架构在下载页面支持的架构列表中,但安装脚本提示不支持,这是因为安装脚本暂时还没法识别CPU架构,请将arch和uname -m的输出信息提交到issue中,方便官方补充安装脚本的CPU架构识别。

2、手动安装

下载待部署系统对应的二进制可执行文件:https://doc.oplist.org/guide/installation/download

(1)使用包管理器安装

Linux:

Debian/Ubuntu可以从OpenList的APT仓库和PPA仓库安装,且会自动配置好服务(守护进程)。

APT仓库

推荐自动GPG设置

# 一行命令安装并自动设置 GPG 密钥
curl -fsSL https://github.com/OpenListTeam/OpenList-APT/releases/latest/download/install-apt.sh | bash

# 然后安装 OpenList
sudo apt install openlist -y

手动APT设置与GPG验证(现代系统Ubuntu 22.04+/Debian 12+)

# 下载并安装 GPG 密钥环
curl -fsSL https://github.com/OpenListTeam/OpenList-APT/releases/latest/download/openlist-archive-keyring.gpg | \
sudo tee /usr/share/keyrings/openlist-archive-keyring.gpg > /dev/null

# 添加带 GPG 验证的仓库
echo “Types: deb
URIs: https://github.com/OpenListTeam/OpenList-APT/releases/latest/download/
Suites: ./
Signed-By: /usr/share/keyrings/openlist-archive-keyring.gpg” | \
sudo tee /etc/apt/sources.list.d/openlist.sources

# 更新并安装
sudo apt update && sudo apt install openlist -y

手动APT设置(没有GPG验证,不推荐):

# 现代系统(Ubuntu 22.04+/Debian 12+)
echo “Types: deb
URIs: https://github.com/OpenListTeam/OpenList-APT/releases/latest/download/
Suites: ./
Trusted: yes” | sudo tee /etc/apt/sources.list.d/openlist.sources

# 旧版系统(Ubuntu <22.04/Debian <12)
echo “deb [trusted=yes] https://github.com/OpenListTeam/OpenList-APT/releases/latest/download/ ./” | \
sudo tee /etc/apt/sources.list.d/openlist.list

# 更新并安装
sudo apt update && sudo apt install openlist -y

PPA仓库:

备用方法Launchpad

# 添加 PPA 仓库
sudo add-apt-repository ppa:openlist/server
sudo apt update

# 安装 OpenList
sudo apt install openlist -y

(2)Windows

Windows可以从Scoop main和WinGet安装。

Scoop:

scoop install openlist
openlist server

WinGet:

winget install OpenListTeam.OpenList
openlist server

Android:

OpenList遵循AGPL 3.0开源协议,对任何下游衍生项目概不负责,且保留追究其同样遵守该协议的权利。

有三种办法根据自己的需求选择:

  • https://github.com/jing332/AListFlutter
  • https://github.com/LeoHaoVIP/AListLiteAndroid
  • 使用termux运行

注意事项:记得给APP授权,后台运行、电池省电策略设置为无限制,否则可能会被杀后台导致挂在后台使用期间突然中断无法使用

Termux:

pkg update
pkg install openlist
openlist server

3、手动运行

使用方法:
openlist [命令]

可用命令:
admin 显示管理员用户的信息及管理员用户密码相关操作
cancel2fa 删除管理员用户的 2FA
completion 生成指定 shell 的自动补全脚本
crypt 加密或解密本地文件或目录
help 显示命令帮助
kill 强制通过守护进程/进程 ID 文件终止 openlist 服务器进程
lang 生成语言 JSON 文件
restart 通过守护进程/进程 ID 文件重启 openlist 服务器
server 启动指定地址的服务器
start 静默启动 openlist 服务器,使用 `–force-bin-dir`
stop 与 kill 命令相同
storage 管理存储
version 显示当前 OpenList 版本

标志参数:
–data string 数据文件夹(默认值 “data”)
–debug 启动时使用调试模式
–dev 启动时使用开发模式
–force-bin-dir 强制使用二进制文件所在目录作为数据目录
-h, –help 显示 openlist 命令帮助
–log-std 强制日志输出到标准输出
–no-prefix 禁用环境前缀

使用 “openlist [命令] –help” 获取更多命令信息。

手动安装如果有如下提示:是因为你的GLIBC版本太低,建议下载musl版本。

lib64/libc.so.6: version `GLIBC_2.28′ not found (required by ./openlist)
accept: function not implemented

当看到start server@0.0.0.0:5244的输出,之后没有报错,说明操作成功。 第一次运行时会输出初始密码。程序默认监听5244端口。 现在打开http://ip:5244可以看到登录页面。

注意:v3.25.0以上版本将密码改成加密方式存储的hash值,无法直接反算出密码,如果忘记了密码只能通过重新随机生成或者手动设置。

xxxx指的是不同系统/架构对应的名称,一般 Linux-x86/64 为 openlist-linux-amd64。

Linux:

tar -zxvf openlist-xxxx.tar.gz
chmod +x openlist
./openlist server
./openlist admin
./openlist admin random
./openlist admin set NEW_PASSWORD

macOS:

tar -zxvf openlist-xxxx.tar.gz
chmod +x openlist
./openlist server
./openlist admin
./openlist admin random
./openlist admin set NEW_PASSWORD

Windows

Expand-Archive .\openlist-xxxx.zip
.\openlist.exe server
.\openlist.exe admin
.\openlist.exe admin random
.\openlist.exe admin set NEW_PASSWORD

4、守护进程

Linux:

使用任意方式编辑 /usr/lib/systemd/system/openlist.service 并添加如下内容,其中 path_openlist 为 OpenList 所在的路径:

[Unit]
Description=openlist
After=network.target
[Service]
Type=simple
WorkingDirectory=path_openlist
ExecStart=path_openlist/openlist server
Restart=on-failure
[Install]
WantedBy=multi-user.target

然后执行 systemctl daemon-reload重载配置,现在你可以使用这些命令来管理程序:

  • 启动: systemctl start openlist
  • 关闭: systemctl stop openlist
  • 配置开机自启: systemctl enable openlist
  • 取消开机自启: systemctl disable openlist
  • 状态: systemctl status openlist
  • 重启: systemctl restart openlist

macOS:

使用任意方式编辑 ~/Library/LaunchAgents/org.openlist.plist 并添加如下内容,修改 path_openlist 为 OpenList 所在的路径,path/to/working/dir 为 OpenList的工作路径:

<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”>
<plist version=”1.0″>
<dict>
<key>Label</key>
<string>org.openlist</string>
<key>KeepAlive</key>
<true/>
<key>ProcessType</key>
<string>Background</string>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>path/to/working/dir</string>
<key>ProgramArguments</key>
<array>
<string>path_openlist/openlist</string>
<string>server</string>
</array>
</dict>
</plist>

然后,执行 launchctl load ~/Library/LaunchAgents/org.openlist.plist 加载配置,现在你可以使用这些命令来管理程序:

  • 开启: launchctl start ~/Library/LaunchAgents/org.openlist.plist
  • 关闭: launchctl stop ~/Library/LaunchAgents/org.openlist.plist
  • 卸载配置: launchctl unload ~/Library/LaunchAgents/org.openlist.plist

Windows:

方法1:

  • 在 https://nssm.cc/download 下载最新版本的 nssm;
  • 在解压后的文件夹内按住 Shift 并右击空白处,选择“在此处打开 Powershell 窗口”;
  • 在弹出的窗口中输入 .\nssm.exe install openlist;
  • Path 选择 openlist.exe 的路径,如 D:\openlist\openlist.exe,Arguments 填 server;
  • Details 选项卡中可以自定义标题和描述,可以选择服务的自启动模式(自动|延迟启动|手动|禁用);
  • 在 I/O 选项卡为 Output (stdout) 和 Output (stderr) 各自指定一个日志文件的路径,如 D:\openlist\stdout.log,文件本身(stdout.log)可以不存在,但是指定的目录(D:\openlist)必须存在;
  • 点击“Install Service”即可。 此后可以直接在服务中启动 openlist。

方法2:

用 .VBS 脚本启动和停止,分别创建两个脚本 分别是 启动.vbs 和 停止.vbs。 直接在和 OpenList 启动程序同级文件夹里面双击启动即可,不用担心没有反应 直接去 浏览器访问即可。

两个启动脚本:

启动.vbs

Dim ws
Set ws = Wscript.CreateObject(“Wscript.Shell”)
ws.run “openlist.exe server”,vbhide
Wscript.quit

停止.vbs

Dim ws
Set ws = Wscript.CreateObject(“Wscript.Shell”)
ws.run “taskkill /f /im openlist.exe”,0
Wscript.quit

对于所有平台,可以使用以下命令来静默启动、停止和重新启动。 (v3.4.0 及更高版本)

openlist start
openlist stop
openlist restart

5、更新OpenList

下载新版OpenList,把之前的替换了即可。

三、OpenList配置文件

注意:

config.json内配置文件修改后都需要重启OpenList才会生效

  • Windows/macOS: <openlist dir>/data/config.json
  • Linux:一键脚本路径 /opt/openlist/data/config.json,手动安装 <openlist dir>/data/config.json
  • Docker: <docker container dir>/data/config.json
  • OpenWrt: 如果使用 luci-app-openlist,请在网页修改,否则为 <openlist dir>/data/config.json
  • Other: <openlist dir>/data/config.json

{
“force”: false,
“site_url”: “”,
“cdn”: “”,
“jwt_secret”: “random_generated”,
“token_expires_in”: 48,
“database”: {
“type”: “sqlite3”,
“host”: “”,
“port”: 0,
“user”: “”,
“password”: “”,
“name”: “”,
“db_file”: “data\\data.db”,
“table_prefix”: “x_”,
“ssl_mode”: “”,
“dsn”: “”
},
“meilisearch”: {
“host”: “http://localhost:7700”,
“api_key”: “”,
“index_prefix”: “”
},
“scheme”: {
“address”: “0.0.0.0”,
“http_port”: 5244,
“https_port”: -1,
“force_https”: false,
“cert_file”: “”,
“key_file”: “”,
“unix_file”: “”,
“unix_file_perm”: “”,
“enable_h2c”: false
},
“temp_dir”: “data\\temp”,
“bleve_dir”: “data\\bleve”,
“dist_dir”: “”,
“log”: {
“enable”: true,
“name”: “data\\log\\log.log”,
“max_size”: 50,
“max_backups”: 30,
“max_age”: 28,
“compress”: false,
“filter”: {
“enable”: false,
“filters”: [
{
“cidr”: “”,
“path”: “/ping”,
“method”: “”
},
{
“cidr”: “”,
“path”: “”,
“method”: “HEAD”
},
{
“cidr”: “”,
“path”: “/dav/”,
“method”: “PROPFIND”
}
]
}
},
“delayed_start”: 0,
“max_connections”: 0,
“max_concurrency”: 64,
“tls_insecure_skip_verify”: true,
“tasks”: {
“download”: {
“workers”: 5,
“max_retry”: 1,
“task_persistant”: false
},
“transfer”: {
“workers”: 5,
“max_retry”: 2,
“task_persistant”: false
},
“upload”: {
“workers”: 5,
“max_retry”: 0,
“task_persistant”: false
},
“copy”: {
“workers”: 5,
“max_retry”: 2,
“task_persistant”: false
},
“decompress”: {
“workers”: 5,
“max_retry”: 2,
“task_persistant”: false
},
“decompress_upload”: {
“workers”: 5,
“max_retry”: 2,
“task_persistant”: false
},
“allow_retry_canceled”: false
},
“cors”: {
“allow_origins”: [“*”],
“allow_methods”: [“*”],
“allow_headers”: [“*”]
},
“s3”: {
“enable”: false,
“port”: 5246,
“ssl”: false
},
“ftp”: {
“enable”: false,
“listen”: “:5221”,
“find_pasv_port_attempts”: 50,
“active_transfer_port_non_20”: false,
“idle_timeout”: 900,
“connection_timeout”: 30,
“disable_active_mode”: false,
“default_transfer_binary”: false,
“enable_active_conn_ip_check”: true,
“enable_pasv_conn_ip_check”: true
},
“sftp”: {
“enable”: false,
“listen”: “:5222”
},
“last_launched_version”: “OpenList version”
}

(本文由美国主机侦探原创,转载请注明出处“美国主机侦探”和原文地址!)

主机侦探企业微信

微信扫码加好友进群

主机优惠码及时掌握

主机侦探QQ群

QQ群号:938255063

主机优惠发布与交流

温馨提示:

1、本站部分图片来源于互联网,如有侵权请联系删除。邮箱:2942802716#qq.com(#改为@)

2、本文评论没有专人回复,如果您有问题请到美国主机侦探论坛提问!

3、美国主机侦探免费为您提供美国主机购买咨询。

RAKsmart美国服务器
返回顶部