module.exports = { //mongodb connection string dbURL: 'mongodb://username:password@localhost:27017', //redis connection info redis: { host: '127.0.0.1', port: '6379', password: 'long random string' }, //backend webserver port port: 7000, //secrets/salts for various things sessionSecret: 'long random string', tripcodeSecret: 'long random string', ipHashSecret: 'long random string', postPasswordSecret: 'long random string', //enable secure cookies, only use with https secureCookies: true, //check referrer to prevent some CSRF attack refererCheck: true, refererRegex: '^https?:\\/\\/(?:www\\.)?domain\\.com\\/', //data used in opengraph meta tags. used to generate link previews in e.g. discord, twitter, etc meta: { siteName: 'imageboard', url: 'https://domain.com' }, //settings for captchas, if you make them too weak they could probably be solved with OCR. captchaOptions: { distortion: 13, numDistorts: { min: 3, max: 5 }, paintAmount: 2 }, //cache templates in memory. disable only if editing templates and doing dev work cacheTemplates: true, //log extra info for debugging debugLogs: true, //max wait time in ms for obtaining locks for saving files lockWait: 3000, //optionally prune oldest modlog entries (prunes when newer modlog entries are generated i.e. dead boards wont have older logs pruned) pruneModlogs: true, pruneAfterDays: 30, //enable the webring (also copy configs/webring.json.example -> configs/webring.json and edit) enableWebring: false, //let all users create new boards enableUserBoards: true, /* extension for thumbnails. this value is used UNLESS the image contains transparency, in which case png is used. */ thumbExtension: '.jpg', //max thumb dimensions (square) in px. images smaller than this are not thumbnailed thumbSize: 200, //default ban duration in ms if ban duration field is left blank (default value is 1 year) defaultBanDuration: 31536000000, //max number of quotes that will be linked in a post. 0 for unlimited (not recommended) quoteLimit: 15, //how many replies to show on index pages under each OP previewReplies: 5, stickyPreviewReplies: 5, //choose a different amount for sticky posts if desired /* the fraction of threadLimit beyond which early404 prunes posts e.g. 3 means after the first third, so if you had 6 pages, anything after page 2 with less than early404Replies gets pruned */ early404Fraction: 3, //how many replies a thread needs to not get removed by early404 early404Replies: 5, //options for code block highlighting in posts highlightOptions: { //subset of languages to allow. languageSubset: [ 'javascript', 'js', 'typescript', 'java', 'kotlin', 'php', 'c++', 'c', 'h', 'csharp', 'bash', 'sh', 'zsh', 'python', 'ruby', 'css', 'html', 'json', 'golang', 'rust' ], //threshold below which auto language is ignored threshold: 5 }, //global limits for board settings globalLimits: { threadLimit: { //number of threads, 10 per page min: 10, max: 200 }, replyLimit: { //number of replies to a thread, thread is locked after this limit is reached min: 10, max: 500 }, postFiles: { //number of files in a post max: 3 }, postFilesSize: { //max combined size of all files in a post (10MB default) max: 10485760 }, bannerFiles: { //max number of banners uploadable at once max: 10 }, bannerFilesSize: { //max combined size of banner files (10MB default) max: 10485760 }, messageLength: { //max length of a post mesage field max: 4000 } }, //default board settings when a board is created boardDefaults: { theme: 'lain', codeTheme: 'ir-black', sfw: false, //safe for work board locked: false, //board locked, only staff can post unlisted: false, //board hidden from on-site board list and frontpage webring: true, //board shown on webring captchaMode: 0, //0=disabled, 1=for threads, 2=for all posts tphTrigger: 0, //numebr of threads in an hour before trigger action is activated pphTrigger: 0, //number of posts in an hour before ^ triggerAction: 0, //0=nothing, 1=captcha enable for threads, 2=captcha enable for all posts, 3=lock board forceAnon: false, //disable name and subject, only allow sage email early404: true, //delete threads beyond the first 1/3 of pages with less than 5 replies ids: false, //show per thread poster ID based on ip flags: false, //show geo flags, requires nginx setup userPostDelete: true, //allow users to delete their posts userPostSpoiler: true, //allow user to spoiler their post files userPostUnlink: true, //alow user to unlink files fomr their post threadLimit: 200, replyLimit: 500, maxFiles: 1, forceReplyMessage: false, forceReplyFile: false, forceThreadMessage: false, forceThreadFile: false, forceThreadSubject: false, disableReplySubject: false, minThreadMessageLength: 0, minReplyMessageLength: 0, defaultName: 'Anon', filters: [], //words/phrases to block filterMode: 0, //0=nothing, 1=prevent post, 2=auto ban filterBanDuration: 0, //duration (in ms) to ban if filter mode=2 announcement: { raw: null, markdown: null }, allowedFileTypes: { //enable different types of files to be posted animatedImage: true, image: true, video: true, audio: true } } }