Alist Install and Usage
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.
All Posts
Alist Install and Usage
@SOLUTION· 2023-01-04 08:08 · 27 min read
Download
[[email protected]]# wget https://github.com/alist-org/alist/releases/download/v3.7.2/alist-linux-amd64.tar.gz
[[email protected]]# tar zxf alist-linux-amd64.tar.gz
[[email protected]]# sudo ./alist admin
INFO[2023-01-03 20:57:22] reading config file: data/config.json
INFO[2023-01-03 20:57:22] load config from env with prefix: ALIST_
INFO[2023-01-03 20:57:22] init logrus...
WARN[2023-01-03 20:57:22] not enable search
INFO[2023-01-03 20:57:22] admin user's info:
username: admin
password: abc1234
Deploy
[[email protected]]# cat /usr/lib/systemd/system/alist.service
[Unit]
Description=alist
After=network.target
[Service]
Type=simple
WorkingDirectory=path_alist
ExecStart=path_alist/alist server
Restart=on-failure
[Install]
WantedBy=multi-user.target
[[email protected]]# sudo systemctl daemon-reload
[[email protected]]# sudo systemctl enable alist
[[email protected]]# 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:
[[email protected]]# cat /etc/nginx/nginx.conf
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
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;
client_max_body_size 20000m;
}
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 |
---|
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK