You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/config/configuration.md
+33-44Lines changed: 33 additions & 44 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,44 +34,43 @@ After modifying the configuration file in `config.json`, you need to restart ALi
34
34
```json
35
35
{
36
36
"force": false,
37
-
"address": "0.0.0.0",
38
-
"port": 5244,
39
-
"https_port": 5245,
40
37
"site_url": "",
41
38
"cdn": "",
42
-
"jwt_secret": "",
39
+
"jwt_secret": "random_generated",
43
40
"token_expires_in": 48,
44
41
"database": {
45
42
"type": "sqlite3",
46
-
"host": "",
47
-
"port": 0,
48
-
"user": "",
49
-
"password": "",
50
-
"name": "",
51
-
"db_file": "data\\data.db",
43
+
"host": "localhost",
44
+
"port": 5432,
45
+
"user": "postgres",
46
+
"password": "securepasswd",
47
+
"name": "alist",
48
+
"db_file": "data/data1.db",
52
49
"table_prefix": "x_",
53
-
"ssl_mode": ""
50
+
"ssl_mode": "disable"
54
51
},
55
52
"scheme": {
56
-
"disable_http": false,
57
-
"https": false,
53
+
"address": "0.0.0.0",
54
+
"http_port": 5244,
55
+
"https_port": -1,
58
56
"force_https": false,
59
57
"cert_file": "",
60
-
"key_file": ""
58
+
"key_file": "",
59
+
"unix_file": ""
61
60
},
62
-
"temp_dir": "data\\temp",
61
+
"temp_dir": "data/temp",
63
62
"bleve_dir": "data\\bleve",
64
63
"log": {
65
-
"enable": true,
66
-
"name": "data\\log\\log.log",
64
+
"enable": false,
65
+
"name": "log/log.log",
67
66
"max_size": 10,
68
67
"max_backups": 5,
69
68
"max_age": 28,
70
69
"compress": false
71
70
},
72
71
"delayed_start": 0,
73
72
"max_connections": 0,
74
-
"tls_insecure_skip_verify": true
73
+
"tls_insecure_skip_verify": false
75
74
}
76
75
```
77
76
@@ -81,24 +80,10 @@ After modifying the configuration file in `config.json`, you need to restart ALi
81
80
82
81
The program will preferentially read the configuration from the environment variable, set `force` to `true` to force the program to read the configuration file.
83
82
84
-
### **address**
85
-
86
-
The address to listen on, default `0.0.0.0`
87
-
88
-
### **port**
89
-
90
-
The port to listen on, default `5244`
91
-
92
-
93
-
### **https_port**
94
-
95
-
HTTPS port,default 5245
96
-
97
-
- You need to open the https in [`Scheme`](#scheme) to enable it.If you use Nginx reverse proxy and open HTTPS, this is not related to this
98
-
99
83
### **site_url**
100
84
101
85
The url of your `alist` site, such as `https://pan.nn.ci`.This 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:
86
+
102
87
- thumbnail of `LocalStorage`
103
88
- Preview after opening web proxy
104
89
- The download address after opening the web proxy
@@ -109,9 +94,9 @@ Please do not include `/` at the end of the URL link, refer to the following exa
109
94
110
95
```json
111
96
# Correct way of writing:
112
-
"site_url": "https://pan.nn.ci",
97
+
"site_url": "https://al.nn.ci",
113
98
# Wrong way of writing:
114
-
"site_url": "https://pan.nn.ci/",
99
+
"site_url": "https://al.nn.ci/",
115
100
```
116
101
117
102
### **cdn**
@@ -131,6 +116,8 @@ So you can use any npm or github cdn as the path, for example:
@@ -166,7 +153,7 @@ The database configuration, the default is `sqlite3`, you can also use `mysql` o
166
153
167
154
If you don’t know how to fill in, fill in the default blank, no need to modify, if you can’t use it if you don’t fill it in, do your own research, and you can’t provide much effective help
168
155
169
-
-----
156
+
---
170
157
171
158
In MySQL, the `ssl_mode` parameter is used to specify the authentication mode of the SSL connection. Here are a few common options:
172
159
@@ -178,7 +165,7 @@ In MySQL, the `ssl_mode` parameter is used to specify the authentication mode of
178
165
179
166
MySQL 5.x and 8.x are also different. If you use the free/fee database provided by the service provider, the service provider will have documentation. You must know the database you deploy yourself.
180
167
181
-
-----
168
+
---
182
169
183
170
In PostgreSQL, the `ssl_mode` parameter is used to specify how the client uses SSL connections. Here are a few common options:
184
171
@@ -189,7 +176,7 @@ In PostgreSQL, the `ssl_mode` parameter is used to specify how the client uses S
189
176
-`verify-ca`: Must use SSL connection and verify the authenticity of the server certificate.
190
177
-`verify-full`: MUST connect using SSL and verify the authenticity and name of the server certificate matches the connected hostname.
191
178
192
-
----
179
+
---
193
180
194
181
::: right
195
182
@@ -207,11 +194,13 @@ The scheme configuration, if you want to use https, you can set this field.
207
194
208
195
```json
209
196
"scheme": {
210
-
"disable_http": false, //Whether the HTTP protocol is forbidden
211
-
"https": true, //Enable https, the default is false
212
-
"force_https": false, //Whether the HTTPS protocol is forcibly, if it is set to True, the user can only access the website through HTTPS
0 commit comments