Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
services:alist [2025/03/19 08:50] – created willy | services:alist [2025/03/19 10:40] (current) – willy | ||
---|---|---|---|
Line 3: | Line 3: | ||
[[https:// | [[https:// | ||
+ | Overall documentation can be reached [[https:// | ||
+ | |||
+ | The funny thing is that this is a Chinese devleoped open source app. You can see it by the quality of the translations, | ||
+ | |||
+ | I admire how AList guys are trying hard to provide english documentation, | ||
Line 8: | Line 13: | ||
===== Installation ===== | ===== Installation ===== | ||
- | Very simple to host without containers. | + | Very simple to host without containers, the porject releases binary packages on GitHub. Download your preferred release [[https:// |
- | Download release [[https://github.com/AlistGo/alist/releases|here]] | + | The AList will need to be installed as user //fileserver// and group //users//, see [[selfhost: |
- | as user // | + | The daemon itself will be stored under **/dada/ |
+ | * /data/shares/ | ||
+ | * /var/log/alist: logs (autorotated) | ||
+ | * / | ||
+ | So: | ||
<code bash> | <code bash> | ||
useradd -m -d / | useradd -m -d / | ||
mkdir / | mkdir / | ||
chown fileserver: | chown fileserver: | ||
+ | mkdir / | ||
+ | chown fileserver / | ||
su - fileserver | su - fileserver | ||
wget https:// | wget https:// | ||
Line 25: | Line 36: | ||
</ | </ | ||
- | AList config file and support data will be located under **/data/daemons/ | + | AList config file and support data will be located under **/data/shares/ |
===== Initial offline configuration ===== | ===== Initial offline configuration ===== | ||
Line 31: | Line 42: | ||
Run AList once to generate admin password, then replace it with one of you choice: | Run AList once to generate admin password, then replace it with one of you choice: | ||
<code bash> | <code bash> | ||
- | / | + | / |
- | INFO[2025-03-19 09:34:53] reading config file: /data/daemons/ | + | INFO[2025-03-19 09:34:53] reading config file: /data/shares/ |
INFO[2025-03-19 09:34:53] config file not exists, creating default config file | INFO[2025-03-19 09:34:53] config file not exists, creating default config file | ||
INFO[2025-03-19 09:34:53] load config from env with prefix: ALIST_ | INFO[2025-03-19 09:34:53] load config from env with prefix: ALIST_ | ||
INFO[2025-03-19 09:34:53] init logrus... | INFO[2025-03-19 09:34:53] init logrus... | ||
INFO[2025-03-19 09:34:53] Successfully created the admin user and the initial password is: oierjfeD | INFO[2025-03-19 09:34:53] Successfully created the admin user and the initial password is: oierjfeD | ||
- | INFO[2025-03-19 09:34:53] Admin user's username: admin | + | INFO[2025-03-19 09:34:53] Admin user s username: admin |
INFO[2025-03-19 09:34:53] The password can only be output at the first startup, and then stored as a hash value, which cannot be reversed | INFO[2025-03-19 09:34:53] The password can only be output at the first startup, and then stored as a hash value, which cannot be reversed | ||
INFO[2025-03-19 09:34:53] You can reset the password with a random string by running [alist admin random] | INFO[2025-03-19 09:34:53] You can reset the password with a random string by running [alist admin random] | ||
INFO[2025-03-19 09:34:53] You can also set a new password by running [alist admin set NEW_PASSWORD] | INFO[2025-03-19 09:34:53] You can also set a new password by running [alist admin set NEW_PASSWORD] | ||
- | fileserver@casa ~/bin $ ./alist --data /data/daemons/ | + | fileserver@casa ~/bin $ ./alist --data /data/shares/alist_data admin set new_password |
- | INFO[2025-03-19 09:35:35] reading config file: /data/daemons/ | + | INFO[2025-03-19 09:35:35] reading config file: /data/shares/ |
INFO[2025-03-19 09:35:35] load config from env with prefix: ALIST_ | INFO[2025-03-19 09:35:35] load config from env with prefix: ALIST_ | ||
INFO[2025-03-19 09:35:35] init logrus... | INFO[2025-03-19 09:35:35] init logrus... | ||
Line 50: | Line 61: | ||
</ | </ | ||
- | Now edit the configuration file **/data/daemons/ | + | Now edit the configuration file **/data/shares/ |
< | < | ||
" | " | ||
Line 62: | Line 73: | ||
" | " | ||
+ | " | ||
+ | " | ||
+ | |||
+ | " | ||
+ | " | ||
</ | </ | ||
Line 80: | Line 96: | ||
error_log / | error_log / | ||
- | location / { | + | |
- | | + | proxy_max_temp_file_size 0; |
- | proxy_set_header | + | |
- | proxy_set_header | + | location / { |
- | | + | proxy_pass http:// |
+ | proxy_set_header | ||
+ | proxy_set_header | ||
+ | | ||
+ | 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; | ||
+ | client_max_body_size 20000m; | ||
} | } | ||
+ | |||
include com.mydomain/ | include com.mydomain/ | ||
} | } | ||
Line 97: | Line 122: | ||
Now start is manually once, or follow the autostart instruction below. | Now start is manually once, or follow the autostart instruction below. | ||
<code bash> | <code bash> | ||
- | / | + | / |
</ | </ | ||
- | |||
Point your browser to **drive.mydomain.com** and login as **admin** with the password you changed above. | Point your browser to **drive.mydomain.com** and login as **admin** with the password you changed above. | ||
You need to go to the settings page and adapt the settings to your liking. | You need to go to the settings page and adapt the settings to your liking. | ||
+ | |||
+ | === General === | ||
+ | |||
+ | From //Manage// go to // | ||
+ | The following settings can be interesting to edit. | ||
+ | |||
+ | Under **site** settings: | ||
+ | * title: title of your web page | ||
+ | * Announcement: | ||
+ | * Pagination type: i suggest you enable pagination and set it to a resonable value to avoid too long loading times for huge folders | ||
+ | * Allow indexed / Allow mounted: so far, it's unclear to me what they are for. | ||
+ | |||
+ | Under **style** settings: | ||
+ | * Replace Logo URL with a locally distributed file (recomended) | ||
+ | * Replace favicon URL with a locally distributed file (recomended) | ||
+ | * Adapt the other options to your liking | ||
+ | |||
+ | Under **preview** settings: | ||
+ | * Disable audio and video autoplay to prevent bandwidth usage | ||
+ | |||
+ | Under **global** settings: | ||
+ | * Add your own header and footer customization, | ||
+ | |||
+ | Under **other** settings: | ||
+ | * Aria2: empty URL to disable. Aria2 is a downloader that AList can use to download files | ||
+ | * qBitTorrent: | ||
+ | * Transmission: | ||
+ | These are all downloaders. If you don't use them, don't need them linked to AList, but enpty URLs. | ||
+ | |||
+ | The other settings (LDAP, SSO, S3..) are for various authentications approaches. Only SSO (with Authelia) will be discossed below. | ||
+ | |||
+ | === Locl users === | ||
+ | |||
+ | Local users can be added individually under the **users** tab in // | ||
+ | |||
+ | I recomend to link to the SSO, as described below instead. | ||
+ | |||
+ | === Storages === | ||
+ | |||
+ | From //Manage// go to // | ||
+ | A few notes for local storage at least: | ||
+ | * Mount point is what will appear inside AList | ||
+ | * Root folder path is the shared path on local storage | ||
+ | * Make sure to edit the mkdir folder permissions to something sane like 775 or 770 or even 750. | ||
+ | |||
+ | === Sharing files === | ||
+ | |||
+ | You can add a guest user, one is available but disabled by default, or you can create **meta** links with specific sharing password. See [[https:// | ||
+ | |||
+ | === Indexing === | ||
+ | |||
+ | AList support indexing with many different backends. The easiest one is to enable indexing inside the SQLite database. | ||
+ | |||
+ | According to [[https:// | ||
+ | |||
+ | In other words, i leave indexing to **none**. YMMV. | ||
=== WebDAV === | === WebDAV === | ||
Line 112: | Line 192: | ||
https:// | https:// | ||
</ | </ | ||
+ | |||
+ | === Plugins === | ||
+ | |||
+ | AList support plugins, a list can be found [[https:// | ||
+ | |||
=== SSO === | === SSO === | ||
- | Authelia link... | + | **Note:** so far i failed at setting up Authelia |
+ | |||
+ | If you have setup your SSO backend, like i describe in [[selfhost: | ||
+ | |||
+ | The official documentation [[https:// | ||
+ | |||
+ | Authelia configuration section, to be added to / | ||
+ | < | ||
+ | clients: | ||
+ | - client_id: '<< | ||
+ | client_secret: | ||
+ | client_name: | ||
+ | public: false | ||
+ | authorization_policy: | ||
+ | redirect_uris: | ||
+ | - https:// | ||
+ | - https:// | ||
+ | scopes: | ||
+ | - ' | ||
+ | - ' | ||
+ | - ' | ||
+ | userinfo_signed_response_alg: | ||
+ | </ | ||
+ | |||
+ | To generate a ClientID: | ||
+ | <code bash> | ||
+ | authelia crypto rand --length 72 --charset rfc3986 | ||
+ | </ | ||
+ | |||
+ | To generate a Client Secret: | ||
+ | <code bash> | ||
+ | authelia crypto hash generate pbkdf2 --variant sha512 --random --random.length 72 --random.charset rfc3986 | ||
+ | </ | ||
+ | Please note **both** the digest and the password itself! | ||
+ | |||
+ | In AList use the following information: | ||
+ | * Platform: OIDC | ||
+ | * Client ID: use the one generated above | ||
+ | * Client secret: use the one generated above, the password, not the digest | ||
+ | * Sso oidc username key: preferred_username | ||
+ | * Sso organization name: user | ||
+ | * Sso application name: user | ||
+ | * Sso extra scopes: openid email profile | ||
+ | * SSO endpoint name: https:// | ||
+ | * SSO auto register: create AList users from SSO users | ||
+ | * SSO default permission: a sum of all the extra permissions. Use 768 for WebDAV access and editing. | ||
+ | |||
+ | |||
+ | |||
+ | === Backups === | ||
+ | |||
+ | While AList has a backup function included, i strongly suggest to ignore it and follow my [[selfhost: | ||
+ | |||
+ | You will need to backup the **/ | ||
Line 130: | Line 268: | ||
command_background=true | command_background=true | ||
command="/ | command="/ | ||
- | command_args=" | + | command_args=" |
command_user=" | command_user=" | ||