Configuration file

Noah HsuSeptember 7, 2022
  • Config
  • Config
  • Settings
About 1 min

Initial config

  "force": false,
  "address": "",
  "port": 5244,
  "site_url": "",
  "cdn": "",
  "jwt_secret": "random generated",
  "database": {
    "type": "sqlite3",
    "host": "",
    "port": 0,
    "user": "",
    "password": "",
    "name": "",
    "db_file": "data/data.db",
    "table_prefix": "x_",
    "ssl_mode": ""
  "scheme": {
    "https": false,
    "cert_file": "",
    "key_file": ""
  "temp_dir": "data/temp",
  "log": {
    "enable": true,
    "name": "log/log.log",
    "max_size": 10,
    "max_backups": 5,
    "max_age": 28,
    "compress": false

Field Description


The program will preferentially read the configuration from the environment variable, set force to true to force the program to read the configuration file.


The address to listen on, default


The port to listen on, default 5244


The url of your alist site, such as address will be used in some places in the program, If you do not set this field, Some features may not work properly, such as:

  • thumbnail of LocalStorage
  • Preview after opening web proxy
  • The download address after opening the web proxy
  • Reverse proxy to sub directory
  • ...


The CDN address, if you want to use CDN, you can set this field, the $version will be replaced with the real version of alist-web This is dynamic and changeable. Existing dist resources are hosted on both npm and GitHub, and their locations are:

So you can use any npm or github cdn as the path, for example:

Also you can keep it empty to use local dist.


The secret used to sign the JWT token, random generated first time start.


The database configuration, the default is sqlite3, you can also use mysql or postgres.


The scheme configuration, if you want to use https, you can set this field.


The temporary directory, default data/temp


The log configuration, if you want to setup the log level, you can set this field.