Download

  1. [root@liqiang.io]# wget https://github.com/alist-org/alist/releases/download/v3.7.2/alist-linux-amd64.tar.gz
  2. [root@liqiang.io]# tar zxf alist-linux-amd64.tar.gz
  3. [root@liqiang.io]# sudo ./alist admin
  4. INFO[2023-01-03 20:57:22] reading config file: data/config.json
  5. INFO[2023-01-03 20:57:22] load config from env with prefix: ALIST_
  6. INFO[2023-01-03 20:57:22] init logrus...
  7. WARN[2023-01-03 20:57:22] not enable search
  8. INFO[2023-01-03 20:57:22] admin user's info:
  9. username: admin
  10. password: abc1234

Deploy

  1. [root@liqiang.io]# cat /usr/lib/systemd/system/alist.service
  2. [Unit]
  3. Description=alist
  4. After=network.target
  5. [Service]
  6. Type=simple
  7. WorkingDirectory=path_alist
  8. ExecStart=path_alist/alist server
  9. Restart=on-failure
  10. [Install]
  11. WantedBy=multi-user.target
  12. [root@liqiang.io]# sudo systemctl daemon-reload
  13. [root@liqiang.io]# sudo systemctl enable alist
  14. [root@liqiang.io]# sudo systemctl start alist

Config

Storage Config

Open http://localhost:5244 and you will see this page:

Figure 1:alist default mainpage

Ignore the error above,and click the login button at the bottom:

Figure 2:alist login

then input the username and password which can be find at the download step, the output for alist admin command:

Figure 3:alist username password

and then configure storage:

Figure 4:add Storage

here I’m trying to add a local storage:

Figure 5:add a local storage

And then you reopen http://localhost:5244, there will be some content。

Figure 6:mainpage after configure storage

Nginx configuration

If you also have Nginx locally, you can configure alist after Nginx, but it must be said that alist does not do a good job of proxying nginx and cannot use subpath, so it can only proxy /, so the configuration of nginx is:

  1. [root@liqiang.io]# cat /etc/nginx/nginx.conf
  2. location / {
  3. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  4. proxy_set_header Host $http_host;
  5. proxy_set_header X-Real-IP $remote_addr;
  6. proxy_set_header Range $http_range;
  7. proxy_set_header If-Range $http_if_range;
  8. proxy_redirect off;
  9. proxy_pass http://127.0.0.1:5244;
  10. client_max_body_size 20000m;
  11. }

Problem Solution

failed get storage: can’t find storage with rawPath: /

You may open this error page after installation, but it’s actually irrelevant, the key is that you need to click “Login” below to log in:

Figure 7:ignore the storage miss error

Ref