docker命令
docker run -d --restart=unless-stopped -v /home/alist:/opt/alist/data -p 5244:5244 -e PUID=0 -e PGID=0 -e UMASK=022 --name="alist" xhofe/alist:v3.36.0
执行后docker容器的log中会展示出admin账号的密码

页面登陆127.0.0.1:5244

看到该页面即部署成功
nginx配置(可选)
如果需要使用域名访问,nginx反向代理如下
upstream alist {
server 127.0.0.1:5244 ;
}
server {
listen 80;
server_name alist.example.com;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Range $http_range;
proxy_set_header If-Range $http_if_range;
proxy_redirect off;
# the max size of file to upload
client_max_body_size 20000m;
proxy_pass http://alist;
}
}
AList官方文档
https://alist.nn.ci/zh
AList github地址
https://github.com/alist-org/alist/tree/main