6

Alist Install and Usage

 1 year ago
source link: https://en.liqiang.io/post/install-and-use-alist-en?lang=US_EN
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

All Posts

Alist Install and Usage

@SOLUTION· 2023-01-04 08:08 · 27 min read

Download



  1. [[email protected]]# wget https://github.com/alist-org/alist/releases/download/v3.7.2/alist-linux-amd64.tar.gz
  2. [[email protected]]# tar zxf alist-linux-amd64.tar.gz
  3. [[email protected]]# 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. [[email protected]]# 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. [[email protected]]# sudo systemctl daemon-reload
  13. [[email protected]]# sudo systemctl enable alist
  14. [[email protected]]# sudo systemctl start alist

Config

Storage Config

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

Figure 1:alist default mainpage
31faf810974d.png

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

Figure 2:alist login
e7405bfde2bb.png

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
d25a9fa641b5.png

and then configure storage:

Figure 4:add Storage
e578eaf16aef.png

here I’m trying to add a local storage:

Figure 5:add a local storage
1123cbd0275a.png

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

Figure 6:mainpage after configure storage
8e36de86f889.png

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. [[email protected]]# 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
ef1d4d3ce124.png
© 2012-2020 路人的技术 版权所有. Powered by LauZoo. Theme based on Nuo.

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK