AList 一个支持多种存储的文件列表程序,使用 Gin 和 Solidjs。

AList是一个基于gin和Solidjs的文件列表程序,支持多种存储服务如阿里云盘、OneDrive和GoogleDrive,具备WebDAV兼容性、黑暗模式、文件预览和密码保护等功能。提供一键脚本和手动安装选项,同时支持Docker部署,方便在各种平台上使用。
摘要由CSDN通过智能技术生成

一个支持多种存储,支持网页浏览和 WebDAV 的文件列表程序,由 gin 和 Solidjs 驱动。

特点

使用简单
AList 从一开始就设计为易于安装,并且可以在所有平台上使用。
多种存储
AList 支持多个存储提供商,包括本地存储、阿里云盘、OneDrive、Google Drive 等,且易于拓展。
支持 WebDAV
AList 支持所有 WebDAV 存储,这是一种用于访问文件的标准。
黑暗模式
自由切换明暗模式
受保护的路由
为特定路径添加密码保护和身份验证
文件预览
支持视频、音频、文档、PDF、图片预览等,甚至支持 ipa 安装
打包下载
使用浏览器的 stream api 支持打包下载,无需使用服务器
更多新功能
包括文本编辑器、README/HTML 渲染、文件永久链接、Cloudflare Workers 代理等

安装

一键脚本

仅适用于 Linux amd64/arm64 平台。

#安装
curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s install
#更新
curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s update
#卸载
curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s uninstall

自定义路径
默认安装在 /opt/alist 中。 自定义安装路径,将安装路径作为第二个参数添加,必须是绝对路径(如果路径以 alist 结尾,则直接安装到给定路径,否则会安装在给定路径 alist 目录下),如 安装到 /root:

# Install
curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s install /root
# update
curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s update /root
# Uninstall
curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s uninstall /root

系统管理

启动:    systemctl start alist
关闭:    systemctl stop alist
状态:    systemctl status alist
重启:    systemctl restart alist

手动安装

获取 AList

打开 AList Release 下载待部署系统对应的文件。最新版的前端已经和后端打包好了,不用再下载前端文件了。

xxxx 指的是不同系统/架构对应的名称,一般 Linux-x86/64 为 alist-linux-amd64。如果你的 glibc 版本太低,建议下载 musl 版本

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

手动运行

Linux

# 解压下载的文件,得到可执行文件:
tar -zxvf alist-xxxx.tar.gz
# 授予程序执行权限:
chmod +x alist
# 运行程序
./alist server
# 获得管理员信息
./alist admin

守护进程

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

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

然后,执行 systemctl daemon-reload 重载配置,systemctl start alist启动服务。

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

# 携带`--force-bin-dir`参数启动服务
alist start
# 通过pid停止服务
alist stop
# 通过pid重启服务
alist restart

使用 Docker

查看管理员信息:

docker exec -it alist ./alist admin

发行版本

docker-cli
docker run -d --restart=always -v /etc/alist:/opt/alist/data -p 5244:5244 -e PUID=0 -e PGID=0 -e UMASK=022 --name="alist" xhofe/alist:latest
docker-compose
version: '3.3'
services:
    alist:
        restart: always
        volumes:
            - '/etc/alist:/opt/alist/data'
        ports:
            - '5244:5244'
        environment:
            - PUID=0
            - PGID=0
            - UMASK=022
        container_name: alist
        image: 'xhofe/alist:latest'
使用 aria2 离线下载

如果你想使用aria2离线下载,我们推荐你使用这个image,它预装了aria2。

有关离线下载功能的额外说明
若没有使用docker pull --platform参数拉取镜像时,docker可能会在64位操作系统上拉取32位镜像,这将可能导致离线下载功能即使在正常配置情况下也无法使用。

当发生错误时,您会在Alist的日志文件中看到类似错误日志。

ERRO[2022-11-20 12:05:19] error [unaligned 64-bit atomic operation] while run task [download http://pic.rmb.bdstatic.com/bjh/34ee946f7a74435a167ca4351d723374.png to [/ftp](/)]

解决方法:
如果是CPU架构是64位,尝试手动拉取64位docker镜像,重新构建容器,再次尝试。
如果是CPU架构是32位,目前尚无可用方案。

开发版本

仅适用于 amd64/arm64。不推荐,这可能无法正常工作。

docker-cli
docker run -d --restart=always -v /etc/alist:/opt/alist/data -p 5244:5244 -e PUID=0 -e PGID=0 -e UMASK=022 --name="alist" xhofe/alist:main
docker-compose
version: '3.3'
services:
    alist:
        restart: always
        volumes:
            - '/etc/alist:/opt/alist/data'
        ports:
            - '5244:5244'
        environment:
            - PUID=0
            - PGID=0
            - UMASK=022
        container_name: alist
        image: 'xhofe/alist:main'

用户/组标识符

当使用卷(-v 标志)权限问题时,主机操作系统和容器之间可能会出现权限问题,我们通过允许您指定用户 PUID 和组 PGID 来避免此问题。
确保主机上的任何卷目录都归您指定的同一用户所有,任何权限问题都会像魔术一样消失。
在这种情况下,PUID=1000 和 PGID=1000,要找到你的使用 id user,如下所示:

  $ id username
    uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)

访问

使用方法:https://alist.nn.ci/zh/guide/drivers/common.html

[root@zhz ~]# docker logs aad99d1d377c2e54d903cdeeff0fd3e65daaece8f67842536288aba5fef7a963
INFO[2023-05-27 14:19:18] reading config file: data/config.json        
INFO[2023-05-27 14:19:18] config file not exists, creating default config file 
INFO[2023-05-27 14:19:18] load config from env with prefix:            
INFO[2023-05-27 14:19:18] init logrus...                               
INFO[2023-05-27 14:19:18] Successfully created the admin user and the initial password is: UADOBB21 
INFO[2023-05-27 14:19:18] start server @ 0.0.0.0:5244                  
INFO[2023-05-27 14:19:18] Aria2 not ready.                             
INFO[2023-05-27 14:19:18] qbittorrent not ready.    
NameValue
Urlhttp[s]😕/domain:port/dav/
Hostdomain
路径dav
协议http/https
端口与网页端一致
WebDAV用户名与网页端用户名一致
WebDAV密码与网页端密码一致

在这里插入图片描述
在这里插入图片描述

Learn from yesterday, live for today, hope for tomorrow.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

星光落入你灰蒙蒙的眼

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值