From 46cdd39ff63d248ba3370f69d2fe0ae8104a51d9 Mon Sep 17 00:00:00 2001 From: Kibi Kelburton Date: Mon, 4 May 2026 21:15:48 +0000 Subject: [PATCH] Add Config --- Config.md | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 Config.md diff --git a/Config.md b/Config.md new file mode 100644 index 0000000..0c69a9a --- /dev/null +++ b/Config.md @@ -0,0 +1,102 @@ +# How to configure + +This documents provides some explanation of the keys found in config.json + +# Full Configuration Documentation + +## 1. Main Application Settings (`main`) + +| Object | Key | Type | Description | Value/Example | Additional +| :--- | :--- | :--- | :--- | :--- | :--- | +| `main.url` | `full` | `String` | Absolute URL | `"https://example.com"` | Used to generate URLS in Matrix/IRC +| `main.url` | `domain` | `String` | Root domain | `"example.com"` | Used in Website <title> +| `main.url` | `regex` | `String` | Regex pattern | `"example\\.com"` | +| `main` | `socks` | `String` | Proxy address | `"socks5://127.0.0.1:9050"` | Default is Tor +| `main` | `mail` | `String` | Admin email | `"admin@example.com"` | +| `main` | `maxfilesize` | `Number` | Max size (bytes) | `104857600` | 100MB +| `main` | `adminmultiplier` | `Float` | Admin boost | `3.5` | 350MB +| `main` | `upload_limit` | `Number` | Max uploads | `300` | Uploads per day per user +| `main` | `ignored` | `Array` | Domain blacklist | `["example.net", "example.org"]` | Domains to ignore for parser/url upload +| `main` | `invite_secret` | `String` | Registration key | `"YOUR_SECRET_HERE"` | This is used to generate invite tokens and Link tokens for Matrix +| `main` | `hide_comments_from_public` | `Boolean` | Privacy toggle | `false` | Hide/Show the Comments for public +| `main` | `development` | `Boolean` | Dev mode toggle | `true` | If enabled no bundle.css will be generated and you will see DEBUG Output + +## 2. Global Toggles & Media + +| Key | Type | Description | Value | Additional +| :--- | :--- | :--- | :--- | :--- | +| `allowedModes` | `Array` | Active view modes | `["sfw", "nsfw", "untagged", "all", "nsfl"]` | Can be expanded to many more modes e.g. Flash, PDF… +| `enable_nsfl` | `Boolean` | Toggle NSFL content | `true` | Enables/Disabled NSFL mode +| `nsfl_tag_id` | `Number` | Tag ID for NSFL | `4` | If you have a old dataset where the nsfl tag != 4 you can set the correct id here +| `allowedMimes` | `Array` | Media categories | `["audio", "image", "video"]` | Can be expanded to include pdf,flash… +| `nsfp` | `Array` | Numeric params | `[2, 3]` | Tag ids that will be excluded from the public eye at all times, global filter + +## 3. Web Server Settings (`websrv`) + +| Object | Key | Type | Description | Value | Additional +| :--- | :--- | :--- | :--- | :--- | :--- | +| `websrv` | `port` | `String` | Listener port | `"1337"` | appserver port +| `websrv` | `language` | `String` | UI Language | `"en"` | Possible: `en`,`de`,`nl`,`zange` +| `websrv` | `allow_language_change` | `Boolean` | User toggle | `true` | Should users be able to change the language? +| `websrv` | `cache` | `Boolean` | Enable caching | `false` | +| `websrv` | `eps` | `Number` | entries per site | `100` | How many Thumbs should be loaded at once on the main page +| `websrv` | `background` | `Boolean` | BG processing | `true` | Enable/Disable blurry background for items globally as default setting +| `websrv` | `description` | `String` | Site description | `"Example Description"` | Meta Tag +| `websrv` | `themes` | `Array` | Available themes | `["amoled"]` | Possible: `atmos`,`4d`,`xd`,`orange`,`p1nk`,`iced`,`f0ck95d` +| `websrv` | `theme` | `String` | Active theme | `"amoled"` | Default theme +| `websrv` | `default_layout` | `String` | UI Layout style | `"legacy"` | `legacy`,`modern` +| `websrv` | `custom_favicon` | `String` | Favicon path | `"/s/img/favicon.gif"` | specifiy custom favicon +| `websrv` | `custom_brand_image` | `Array` | Branding assets | `[]` | specify custom brand image(s) +| `websrv` | `show_koepfe` | `Boolean` | Toggle Koepfe | `false` | shows image(s) in bottom left corner +| `websrv` | `koepfe` | `Array` | Koepfe data | `[]` | +| `websrv` | `enable_global_chat` | `Boolean` | Chat toggle | `true` | Wanna chat? Yes or No +| `websrv` | `enable_danmaku` | `Boolean` | Danmaku toggle | `true` | Flying comments niconico style +| `websrv` | `private_messages` | `Boolean` | PM toggle | `true` | Private messaging +| `websrv` | `halls_enabled` | `Boolean` | Halls toggle | `false` | Global collections curated by admins/mods +| `websrv` | `userhalls_enabled` | `Boolean` | User halls | `false` | Personal collections for users. +| `websrv` | `abyss_enabled` | `Boolean` | Abyss toggle | `false` | Doomscrolling +| `websrv` | `meme_creator` | `Boolean` | Meme tool | `true` | Builtin Meme generator +| `websrv` | `web_url_upload` | `Boolean` | URL Uploading | `true` | Downloads from the web, uses `main.socks` if set +| `websrv` | `enable_youtube_upload` | `Boolean` | YT Uploading | `true` | Enable/Disable youtube embedding via URL Upload +| `websrv` | `web_meta_extraction` | `Boolean` | Meta scraping | `true` | Enable/Disable Metadata extraction via url fetching +| `websrv` | `bypass_duplicate_check` | `Boolean` | Dup checking | `true` | set to false if you want to shitpost +| `websrv` | `protect_files` | `Boolean` | File protection | `false` | Will return 502 for unauthenticated connections to every direct url if set to true +| `websrv` | `allowed_comment_images` | `Array` | Whitelisted hosts | `["i.imgur.com", "tenor.com", "giphy.com"]` | images/videos from these hosts can be embedded in the comments +| `websrv` | `show_mime_picker` | `Boolean` | UI Helper | `true` | Shows/Hides the mime type filter +| `websrv` | `embed_youtube_in_comments` | `Boolean` | YT Embedding | `true` | Wether Youtube should be embedded by default or not +| `websrv` | `show_content_warning` | `Boolean` | CW Toggle | `true` | Content Warning for first time visitors +| `websrv` | `phrases` | `Array` | Random phrases | `["Hello World"]` | Unused but can show a random phrase where you place it. +| `websrv` | `ban_video` | `String` | Ban video URL | `""` | unused +| `websrv` | `enable_xd_score` | `Boolean` | Scoring system | `false` | +| `websrv` | `enable_autoplay` | `Boolean` | Autoplay toggle | `false` | Wether video/audio should automatically play for users +| `websrv` | `enable_swiping` | `Boolean` | Mobile swiping | `true` | Enable/Disable swiping gestures on mobile +| `websrv` | `enable_profile_description` | `Boolean` | User bios | `true` | Let users add a custom description to their profile +| `websrv` | `user_alternative_infobox` | `Boolean` | Alt UI | `false` | More prominent User centric UI +| `websrv` | `enable_swf` | `Boolean` | Flash support | `true` | ZOMG its 2006 again! +| `websrv` | `swf_thumb` | `String` | Flash thumbnail | `"/s/img/swf.png"` | Custom fallback thumb location +| `websrv` | `open_registration` | `Boolean` | Registration | `true` | This enabled registration with email, otherwise it always requires a invite token +| `websrv` | `open_registration_web_toggle` | `Boolean` | Web toggle | `false` | Toggles `websrv.open_registration` behaviour from /admin +| `websrv` | `private_society` | `Boolean` | Privacy mode | `false` | Displays a fake 502 Bad Gateway login page and is useful in combo with `websrv.protect_files` + +## 6. MIME Mapping (`mimes`) + +| MIME Type | Extension | MIME Type | Extension | +| :--- | :--- | :--- | :--- | +| `image/png` | `png` | `video/webm` | `webm` | +| `image/gif` | `gif` | `video/webp` | `webp` | +| `video/mp4` | `mp4` | `audio/mpeg` | `mpg` | +| `audio/ogg` | `ogg` | `audio/flac` | `flac` | +| `application/x-shockwave-flash` | `swf` | | | + +## 7. Email Settings (`smtp`) + +| Key | Type | Value | +| :--- | :--- | :--- | +| `enabled` | `Boolean` | `false` | +| `host` | `String` | `"smtp.example.com"` | +| `port` | `Number` | `465` | +| `secure` | `Boolean` | `true` | +| `user` | `String` | `"smtp_user"` | +| `password` | `String` | `"smtp_password"` | +| `from` | `String` | `"admin@example.com"` | +| `mail_reset_password` | `Boolean` | `false` | \ No newline at end of file