alist

alist一键搭建教程

安装nginx
#首先安装nginx方便反向代理
apt install nginx
申请证书
curl https://get.acme.sh | sh -s email=my@example.com
bash ~/.acme.sh/acme.sh --issue -d "域名" --standalone -k ec-256
bash ~/.acme.sh/acme.sh --install-cert -d "域名" --key-file /root/private.key --fullchain-file /root/cert.crt --ecc
编写nginx配置文件
#vim /etc/nginx/conf.d/test.conf
server {
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
ssl_reject_handshake on;
}

server {
listen 443 ssl;
listen [::]:443 ssl;
server_name example.com; #域名
ssl_certificate example.com.crt; #证书
ssl_certificate_key example.com.key;#证书密钥
}
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;
proxy_pass http://127.0.0.1:5244;
# the max size of file to upload
client_max_body_size 20000m;
}

安装docker
curl -sSL https://get.docker.com/ | sh
systemctl start docker
systemctl enable docker
安装alist
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-aria2:latest
添加一起看功能
#alist后台>全局设置
<script src="https://2gether.video/release/extension.website.user.js"></script>
<script>
document.addEventListener("DOMContentLoaded", () => {
const seAList = document.createElement("style");

seAList.innerHTML = `
.left-toolbar-box {
left: var(--hope-space-5);
right: auto;
}
`;

document.body.appendChild(seAList);
});
</script>