-
Notifications
You must be signed in to change notification settings - Fork 18
/
config.example.hjson
500 lines (478 loc) · 13.2 KB
/
config.example.hjson
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
{
/* _ _
_ __ ___ _ _ ___(_) __ _ _ __ __ _ __| |
| '_ ` _ \| | | / __| |/ _` | '_ \ / _` |/ _` |
| | | | | | |_| \__ \ | (_| | |_) | (_| | (_| |
|_| |_| |_|\__,_|___/_|\__, | .__/ \__,_|\__,_|
|_|_|
More infos about the config syntax: https://hjson.org/
Set this flag to false to disable web server hosting or true to enable web server hosting.
This is useful if you want to host static files in another web server such as nginx.
If you are only hosting the socket and want musiqpad to host the frontend set this to false.
*/
hostWebserver: true
socketServer: {
host: "" // Host name or IP that the socket server is located at. Leave blank to bind to process IP address
port: 8082// Leave blank to bind to process PORT
}
webServer: {
address: "" // Leave blank to bind to process IP address.
port: 8080// Leave blank to bind to process PORT.
redirectHTTP: false// Set to true if you want HTTP redirect to HTTPS.
redirectPort: 80// Required if setting above is true. Set to the port you want to redirect HTTP to HTTPS from (Default: 80).
}
useSSL: false// If you want your pad to be accesible over HTTPS set SSL to true and add the path of your certificates
certificate: {
key: "path-to-key"
cert: "path-to-cert"
}
room: {
name: "Pad Name" // This is your pad name. It is shown as a user friendly description on the lounge and tab name.
slug: "this-is-your-slug" // Slugs are used to identify your pad when connecting to musiqpad! This slug must be unique and all in lowecase.
greet: "Welcome to musiqpad!"
bg: "" // Background image file path. Accepts external images. If this is undefined the default background will be used.
maxCon: 0
ownerEmail: "user@domain.tld" // This needs to be set then the server restarted to take effect.
guestCanSeeChat: true
bannedCanSeeChat: false
lastmsglimit: 6// How many messages a user can see after joining.
signupcd: 0// How many miliseconds the user cannot do certain things after they sign up.
allowemojis: true
allowrecovery: false
recaptcha: false
queue: {
cycle: true
lock: false
limit: 50
}
history: {
limit_save: 0
limit_send: 50
}
mail: {
confirmation: false// Whether to force user to confirm his email address before he is able to do anything
sender: "user@domain.tld" // Domain should point to this box when using direct mode
// DIRECT PROBABLY WON'T WORK BECAUSE YOUR IP DOESN'T HAVE A GOOD REPUTATION!
transport: "direct" // 'smtp', 'direct' or 'xoauth'
options: {}
/*
EXAMPLES:
-- SMTP --
transport: "smtp"
options: {
service: "gmail"
auth: {
user: "mail@somewebsite.com",
pass: "pass",
}
}
----------
-- XOAUTH2 --
transport: "xoauth"
options: {
service: "gmail"
auth: {
xoauth: {
user: '{username}'
clientId: '{Client ID}'
clientSecret: '{Client Secret}'
refreshToken: '{refresh-token}'
accessToken: '{cached access token}
}
}
}
-------------
-- DIRECT --
transport: "direct"
options: {}
-------------
*/
}
description:
'''
<h1>Pad Description</h1>
Here you can put anything you want in HTML!
'''
tags: { // Tags for Google & co
keywords: "musiqpad"
description: ""
image: "https://cdn.musiqpad.com/img/icon-256.png" // Image on twitter/facebook/slack/...
twitter: "@musiqpad"
description: // A one to two sentence description for search engines & co
'''
Real time music streaming and chat with friends. Musiqpad is a place where people can discover new music.
'''
themeColor: "" // a hex color for the theme on chrome for android
favicon: "/pads/lib/img/icon.png"
}
scripts: { // Only if you host the frontend yourself
js: [], // Example: ["https://exapmple.com/musiqpad.js", "lib/js/custom.js"]
css: []
}
}
apis: {
YT: {
key: "" // Required api key in order for YouTube search to work.
restrictSearchToMusic: false
}
SC: {
key: ""
}
reCaptcha: {
key: ""
secret: ""
}
musiqpad: {
key: "" // This is required in order for your socket to update the musiqpad lounge. Request an API Key here: https://musiqpad.com/lounge
sendLobbyStats: false
}
}
// The amount of time users stay logged in for before having to login again, eg "2 days", "10h", "7d"
loginExpire: "5d",
db: {
dbType: "level" // Values "level" for LevelDB, "mysql" for MySQL and "mongo" for MongoDB
dbDir: "./socketserver/db" // Only used for LevelDB. Directory to save databases. Default is ./socketserver/db
mysqlUser: "" // Only used for MySQL. Database username
mysqlPassword: "" // Only used for MySQL. Database password
mysqlHost: "" // Only used for MySQL. Host address
mysqlDatabase: "" // Only used for MySQL. Database being used
mongoUser: "" // Only used for MongoDB. Database username
mongoPassword: "" // Only used for MongoDB. Database password
mongoHost: "" // Only used for MongoDB. Host address
mongoDatabase: "" // Only used for MongoDB. Database being used
}
/*
"djqueue.join": Ability to join queue
"djqueue.joinlocked": Ability to join locked queue
"djqueue.leave": Ability to leave queue
"djqueue.skip.self": Ability to skip self
"djqueue.skip.other": Ability to skip others
"djqueue.lock": Ability to lock/unlock queue
"djqueue.limit": Ability to change waitlist limit
"djqueue.cycle": Ability to enable/disable queue cycle
"djqueue.move": Ability to move, swap, add and remove people in the queue
"djqueue.playLiveVideos": Ability to play live videos with undefined duration
"djqueue.lock.bypass": Bypass locked queue
"djqueue.limit.bypass": Bypass queue limit
"chat.send": Abilty to send chat messages
"chat.delete": Ability to delete others" chat messages
"chat.specialMention": Ability to use @everyone, @guest and @djs as mention
"chat.broadcast": Ability to send a highlighted broadcast message
"chat.private": Ability to send PMs
"chat.staff": Ability to send and receive special staff chat
"playlist.create": Ability to create playlists
"playlist.delete": Ability to delete playlists
"playlist.rename": Ability to rename playlists
"playlist.import": Ability to import playlists
"playlist.shuffle": Ability to shuffle playlists
"room.grantroles": Ability to change user roles (requires canGrantPerms property)
"room.restrict.ban": Ability to ban and unban users
"room.restrict.mute": Ability to mute and unmute users
"room.restrict.silent_mute": Ability to shadow mute and unmute users
"room.ratelimit.bypass": Will bypass ratelimit
"room.whois": Possibility to request additional information about a user
"room.whois.iphistory": Possibility to request all IP addresses that the user logged from since account creation
NOTE: Changing the PROPERTY NAME will break role assignments. Title can be changed
without breaking things, but property name must stay the same.
*/
// Defines the order that roles will appear on the user list
// PROPERTY names. NOT title. (case-sensitive)
roleOrder: [
"dev"
"owner"
"coowner"
"supervisor"
"bot"
"regular"
"default"
]
// Defines which roles are "staff" members
// PROPERTY names. NOT title. (case-sensitive)
staffRoles: [
"dev"
"owner"
"coowner"
"supervisor"
"bot"
]
/*
Role Options:
rolename:{
title: "", // This is the title that gets displayed on the frontend.
showtitle: true/false, // This is whether or not to display the title on the frontend.
badge: "", // This can be any icon from the mdi package. A list of the icons is available here: https://materialdesignicons.com
style: {}, // This can be used to set specific styles to the Username of a user with this role.
permissions: [], // A list of permissions a user with this role is allowed to use.
canGrantRoles: [], // A list of the roles that a user with this role can grant. I.e. an owner should be able to grant manager.
mention: "" // A custom mention. I.e. "owner" would mention this group when someone typed @owner.
}
Below are a list of roles we suggest using.
*/
// Defines roles and permissions
roles: {
owner: { // REQUIRED ROLE
title: "Owner"
showtitle: true
style: {
color: "#F46B40"
}
permissions: [
"djqueue.join"
"djqueue.joinlocked"
"djqueue.leave"
"djqueue.skip.self"
"djqueue.skip.other"
"djqueue.lock"
"djqueue.cycle"
"djqueue.limit"
"djqueue.move"
"djqueue.playLiveVideos"
"djqueue.limit.bypass"
"djqueue.lock.bypass"
"chat.send"
"chat.private"
"chat.broadcast"
"chat.delete"
"chat.specialMention"
"chat.staff"
"playlist.create"
"playlist.delete"
"playlist.rename"
"playlist.import"
"playlist.shuffle"
"room.grantroles"
"room.restrict.ban"
"room.restrict.mute"
"room.restrict.silent_mute"
"room.ratelimit.bypass"
"room.whois"
"room.whois.iphistory"
"server.checkForUpdates"
]
canGrantRoles: [
"dev"
"coowner"
"supervisor"
"bot"
"regular"
"default"
]
}
dev: { // OPTIONAL ROLE FOR MUSIQPAD DEVS
title: "Dev"
showtitle: true
style: {
color: "#A77DC2"
}
permissions: [
"djqueue.join"
"djqueue.joinlocked"
"djqueue.leave"
"djqueue.skip.self"
"djqueue.skip.other"
"djqueue.lock"
"djqueue.cycle"
"djqueue.limit"
"djqueue.move"
"djqueue.playLiveVideos"
"djqueue.limit.bypass"
"djqueue.lock.bypass"
"chat.send"
"chat.private"
"chat.broadcast"
"chat.delete"
"chat.specialMention"
"chat.staff"
"playlist.create"
"playlist.delete"
"playlist.rename"
"playlist.import"
"playlist.shuffle"
"room.grantroles"
"room.restrict.ban"
"room.restrict.mute"
"room.restrict.silent_mute"
"room.ratelimit.bypass"
"room.whois"
]
canGrantRoles: [
"dev"
"coowner"
"supervisor"
"bot"
"regular"
"default"
]
mention: "devs"
}
coowner: {
title: "Co-owner"
showtitle: true
style: {
color: "#89BE6C"
}
permissions: [
"djqueue.join"
"djqueue.joinlocked"
"djqueue.leave"
"djqueue.skip.self"
"djqueue.skip.other"
"djqueue.lock"
"djqueue.cycle"
"djqueue.limit"
"djqueue.move"
"djqueue.playLiveVideos"
"djqueue.limit.bypass"
"djqueue.lock.bypass"
"chat.send"
"chat.private"
"chat.delete"
"chat.specialMention"
"chat.broadcast"
"chat.staff"
"playlist.create"
"playlist.delete"
"playlist.rename"
"playlist.import"
"playlist.shuffle"
"room.grantroles"
"room.restrict.ban"
"room.restrict.mute"
"room.restrict.silent_mute"
"room.ratelimit.bypass"
"room.whois"
"room.whois.iphistory"
]
canGrantRoles: [
"supervisor"
"bot"
"regular"
"default"
]
}
supervisor: {
title: "Supervisor"
showtitle: true
style: {
color: "#009CDD"
}
permissions: [
"djqueue.join"
"djqueue.joinlocked"
"djqueue.leave"
"djqueue.skip.self"
"djqueue.skip.other"
"djqueue.lock"
"djqueue.cycle"
"djqueue.move"
"djqueue.playLiveVideos"
"djqueue.limit.bypass"
"djqueue.lock.bypass"
"chat.send"
"chat.private"
"chat.delete"
"chat.specialMention"
"chat.staff"
"playlist.create"
"playlist.delete"
"playlist.rename"
"playlist.import"
"playlist.shuffle"
"room.grantroles"
"room.restrict.ban"
"room.restrict.mute"
"room.restrict.silent_mute"
"room.ratelimit.bypass"
"room.whois"
]
canGrantRoles: [
"regular"
"default"
]
}
bot: {
title: "Bot"
showtitle: true
badge: "android"
style: {
color: "#964B74"
}
permissions: [
"djqueue.join"
"djqueue.joinlocked"
"djqueue.leave"
"djqueue.skip.self"
"djqueue.skip.other"
"djqueue.lock"
"djqueue.cycle"
"djqueue.limit"
"djqueue.move"
"djqueue.playLiveVideos"
"djqueue.limit.bypass"
"djqueue.lock.bypass"
"chat.send"
"chat.private"
"chat.delete"
"chat.specialMention"
"chat.broadcast"
"chat.staff"
"playlist.create"
"playlist.delete"
"playlist.rename"
"playlist.import"
"playlist.shuffle"
"room.grantroles"
"room.restrict.ban"
"room.restrict.mute"
"room.restrict.silent_mute"
"room.ratelimit.bypass"
"room.whois"
"room.whois.iphistory"
]
canGrantRoles: [
]
}
regular: {
title: "Regular"
showtitle: false
style: {
color: "#925AFF"
}
permissions: [
"djqueue.join"
"djqueue.joinlocked"
"djqueue.leave"
"chat.send"
"chat.private"
"djqueue.skip.self"
"playlist.create"
"playlist.delete"
"playlist.rename"
"playlist.import"
]
canGrantRoles: [
]
}
default: { // REQUIRED ROLE
title: "Default"
showtitle: false
style: {
color: "#ffffff"
}
permissions: [
"djqueue.join"
"djqueue.leave"
"chat.send"
"chat.private"
"djqueue.skip.self"
"playlist.create"
"playlist.delete"
"playlist.rename"
"playlist.import"
]
canGrantRoles: [
]
}
}
tokenSecret: "" // This should be a random string that needs to be kept private. Automatically generated if empty.
}