This repository was archived by the owner on Aug 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
II.1. Configuration
Andrey Bogdanov edited this page Apr 7, 2016
·
21 revisions
Refer to I.4. Basic configuration for instructions on how to create a configuration file.
Note: See also config.json.example for an example.
Actual file name must be config.json.
Example:
{
"board": {
"archiveLimit": 1000,
"bumpLimit": 500,
"captchaEnabled": true,
"captchaQuota": 10,
"launchDate": "2015-02-12T21:00:00",
"maxFileSize": 15728640,
"postLimit": 1000,
"threadLimit": 200,
"threadsPerPage": 20,
"3dpd": {
"maxFileCount": 3,
"group": "adult"
},
"h": {
"group": "adult"
},
"b": {
"captchaQuota": 0
},
"echo": {
"acceptedExternalBoardLinks": [
"http://iichan.hk/[a-z]+/res/\\d+\\.html",
"http://dobrochan.ru/[a-z]+/res/\\d+\\.xhtml",
"https?://410chan.org/[a-z]+/res/\\d+\\.html",
"https://boards.4chan.org/[a-z]+/thread/\\d+/[a-zA-Z0-9\\-_]+",
"https?://2ch.hk/[a-z]+/res/\\d+\\.html"
]
},
"int": {
"showWhois": true
},
"rf": {
"postingEnabled": false
},
"soc": {
"hidden": true,
"launchDate": "2015-02-16T20:00:00"
}
},
"boardGroups": {
"adult": {
"title": "For adults"
}
},
"captcha": {
"google-recaptcha": {
"privateKey": "Your Google reCAPTCHA private key",
"publicKey": "Your Google reCAPTCHA public key"
},
"google-recaptcha-v1": {
"privateKey": "Your Google reCAPTCHA v1 private key",
"publicKey": "Your Google reCAPTCHA v1 public key"
},
"codecha": {
"privateKey": "Your Codecha private key",
"publicKey": "Your Codecha public key"
}
},
"permissions": {
"addFilesToPost: "MODER",
"deleteFile": 0,
"deletePost": 0,
"editPost": "MODER",
"seeUserIp": "ADMIN"
},
"server": {
"chat": {
"ttl": 10080
},
"ddosProtection": {
"checkInterval": 1000,
"enabled": true,
"errorCode": 429,
"errorData": "Not so fast!",
"maxWeight": 10,
"rules": [
{
"maxWeight": 6,
"queueSize": 4,
"regexp": "^/api.*"
},
{
"maxWeight": 1,
"string": "/action/search"
},
{
"maxWeight": 16,
"regexp": ".*"
}
],
"static": false,
"weight": 1
},
"port": 8080,
"rss": {
"enabled": true,
"postCount": 500,
"ttl": 60
},
"statistics": {
"enabled": true,
"ttl": 60
},
"youtubeApiKey": ""
},
"site": {
"dateFormat": "MM/DD/YYYY HH:mm:ss",
"domain": "localhost:8080",
"extraScripts": {
"boardPage": [
{ "fileName": "custom/myScript.js" },
{ "source": "http://ajax.aspnetcdn.com/ajax/jquery.validate/1.14.0/jquery.validate.min.js" }
]
},
"locale": "en",
"maxSearchQueryLength": 50,
"protocol": "http",
"timeOffset": 0,
"tripcodeSalt": "ololo",
"twitter": {
"integrationEnabled": true
},
"vkontakte": {
"integrationEnabled": false,
"appId": "Your VK app ID",
"accessToken": "Your VK access token"
}
},
"system": {
"elasticsearch": {
"host": "localhost:9200"
},
"embedScripts": true,
"embedStylesheets": true,
"fileDownloadProxy": "",
"fileDownloadProxyAuth": "",
"log": {
"backups": 100,
"maxSize": 1048576,
"middleware": {
"before": "ddos",
"exclude": [
{ "string": "/action/deletePost" },
{
"regexp": "^/action/create[a-z]+$",
"flags": "i"
}
],
"verbosity": "all"
},
"targets": [
"console",
"file"
]
},
"redis": {
"port": 6379,
"host": "127.0.0.1",
"family": 4,
"password": "",
"db": 0
},
"regenerateCacheOnStartup": false,
"searchLimit": 100,
"tmpPath": "/tmp/ramdisk",
"workerCount": 1
}
}