User Tools

This is an old revision of the document!


AList

AList is a nice tool to make your shares accessible online.

Installation

Very simple to host without containers.

Download release here

as user fileserver and group users (see this page for more details.

useradd -m -d /data/daemons/fileserver -g users fileserver
mkdir /var/log/alist
chown fileserver:users /var/log/alist
su - fileserver
wget https://github.com/AlistGo/alist/releases/download/<< version >>/alist-linux-amd64.tar.gz
mkdir bin
cd bin
tar xvf ../alist-linux-amd64.tar.gz

AList config file and support data will be located under /data/daemons/fileserver/alist_data.

Initial offline configuration

Run AList once to generate admin password, then replace it with one of you choice:

/data/daemons/fileserver/bin/alist --data /data/daemons/fileserver/alist_data admin
INFO[2025-03-19 09:34:53] reading config file: /data/daemons/fileserver/alist_data/config.json 
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] 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] 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] 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] 
fileserver@casa ~/bin $ ./alist --data /data/daemons/fileserver/alist_data admin set new_password
INFO[2025-03-19 09:35:35] reading config file: /data/daemons/fileserver/alist_data/config.json 
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] admin user has been updated:                 
INFO[2025-03-19 09:35:35] username: admin                              
INFO[2025-03-19 09:35:35] password: new_password                         

Now edit the configuration file /data/daemons/fileserver/alist_data/config.json and at leat change the following values:

  "site_url": "https://drive.mydomain.com",
  
  "scheme": {
    "address": "127.0.0.1",
    "http_port": 5244,
    
  "log": {
    "enable": true,
    "name": "/var/log/alist/alist.log",

I have only reported the basic lines to edit, feel free to adapt it to your needs.

Reverse Proxy

Following my reverse proxy concept guidelines, use this configuration file:

server {
        server_name drive.mydomain.com;
        listen 443 ssl;
        listen 8443 ssl;
        http2 on;
 
        access_log /var/log/nginx/drive.mydomain.com_access_log main;
        error_log /var/log/nginx/drive.mydomain.com_error_log info;
 
        location / {
               proxy_pass http://127.0.0.1:5244;
                proxy_set_header Connection $http_connection;
                proxy_set_header Connection 'upgrade';
                proxy_cache_bypass $http_upgrade;
        }
        include com.mydomain/certbot.conf;
}

and restart your NGINX.

Initial online configuration

Now start is manually once, or follow the autostart instruction below.

/data/daemons/fileserver/bin/alist --data /data/daemons/fileserver/alist_data server

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.

WebDAV

WebDAV is enabled and can be reached with the same credentials adding dav to the URL, so:

https://drive.mydomain.com <- standard browser login
https://drive.mydomain.com/dav/ <- WebDAV client login

SSO

Authelia link…

Autostart

Create the following file as /etc/init.d/alist:

alist
#!/sbin/openrc-run
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

description="AList file browser"
pidfile="/run/alist.pid"
command_background=true
command="/data/daemons/fileserver/bin/alist"
command_args="--data /data/daemons/fileserver/alist_data server"
command_user="fileserver:users"

depend() {
        need net
}

Make it executable, and enable on boot:

chmod +x /etc/init.d/alist
rc-update add alist default
/etc/init.d/alist start

This website uses technical cookies only. No information is shared with anybody or used in any way but provide the website in your browser.

More information