Henry
发布于 2025-10-20 / 5 阅读
0
0

Docker - 部署 alist 服务

背景简介

通过 alist 服务连接管理网盘。

前置信息

  1. Docker 28.5.1

详细信息

第一步: 安装 Alist

  • 安装方式:【官方文档
    • Docker
    • 直接安装 
  • 本次笔记使用 Docker 安装,准备 docker-compose.yaml 配置文件
services:
  alist:
    image: 'xhofe/alist:v3.53.0-aio'
    container_name: alist
    volumes:
      - '/etc/alist:/opt/alist/data'
    ports:
      - '30076:5244'
    environment:
      - PUID=0
      - PGID=0
      - UMASK=022
      - TZ="Asia/Shanghai"
    restart: unless-stopped
  • 启动容器
docker compose up -d

[+] Running 2/2
 ✔ Network alist_default  Created   
 ✔ Container alist        Started   

第二步: 配置 alist admin

  • 查看 admin 初始密码
docker logs alist

INFO[2025-10-16 04:27:10] reading config file: data/config.json        
INFO[2025-10-16 04:27:10] config file not exists, creating default config file 
INFO[2025-10-16 04:27:10] load config from env with prefix:            
INFO[2025-10-16 04:27:10] init logrus...                               
INFO[2025-10-16 04:27:10] Successfully created the admin user and the initial password is: xAvKCDpY 
INFO[2025-10-16 04:27:10] init tool SimpleHttp success: ok             
INFO[2025-10-16 04:27:10] init tool PikPak success: ok                 
WARN[2025-10-16 04:27:10] init tool qBittorrent failed: Post "http://localhost:8080/api/v2/auth/login": dial tcp [::1]:8080: connect: connection refused 
INFO[2025-10-16 04:27:10] init tool Thunder success: ok                
WARN[2025-10-16 04:27:10] init tool Transmission failed: failed get transmission version: can't get session values: 'session-get' rpc method failed: failed to execute HTTP request: Post "http://localhost:9091/transmission/rpc": dial tcp [::1]:9091: connect: connection refused 
INFO[2025-10-16 04:27:10] init tool 115 Cloud success: ok              
INFO[2025-10-16 04:27:10] init tool aria2 success: aria2 version: 1.37.0 
INFO[2025-10-16 04:27:10] start HTTP server @ 0.0.0.0:5244             
  • 重置或修改密码
docker exec -it alist ./alist admin
INFO[2025-10-16 04:30:08] reading config file: data/config.json        
INFO[2025-10-16 04:30:08] load config from env with prefix: ALIST_     
INFO[2025-10-16 04:30:08] init logrus...                               
INFO[2025-10-16 04:30:08] Admin user's username: admin                 
INFO[2025-10-16 04:30:08] The password can only be output at the first startup, and then stored as a hash value, which cannot be reversed 
INFO[2025-10-16 04:30:08] You can reset the password with a random string by running [alist admin random] 
INFO[2025-10-16 04:30:08] You can also set a new password by running [alist admin set NEW_PASSWORD]
  • 重置密码示例
docker exec -it alist ./alist admin random

INFO[2025-10-16 04:35:16] reading config file: data/config.json        
INFO[2025-10-16 04:35:16] load config from env with prefix: ALIST_     
INFO[2025-10-16 04:35:16] init logrus...                               
INFO[2025-10-16 04:35:16] admin user has been updated:                 
INFO[2025-10-16 04:35:16] username: admin                              
INFO[2025-10-16 04:35:16] password: new_pass

第三步: 添加网盘 【AList - 添加网盘

  • 登录 alist 管理界面

  • 默认么有存储信息,点击Go to storages添加网盘


以上便是本文的全部内容,感谢您的阅读,如遇到任何问题,欢迎在评论区留言讨论。



评论