kitsune/config.example.toml

213 lines
7.1 KiB
TOML
Raw Permalink Normal View History

# Configuration for Kitsune
#
# This is where you enter pretty much all configuration essential to running a Kitsune service
# Cache configuration
#
# Kitsune offers the following caching solutions:
# - "none": Caching is fully disabled
# - "in-memory": Information is cached in an in-memory caching solution
# - "redis": Information is cached inside a Redis instance
#
# The cache solution is switched by setting the "type" parameter to the above values
#
# Redis requires additional parameters:
# - "url": URL of the Redis instance Kitsune is supposed to connect to
2023-07-15 13:09:18 +00:00
[cache]
type = "in-memory"
# Captcha configuration
#
# To mitigate spam, Kitsune offers the option to require a captcha on sign-up
#
# We offer support for the following captcha services:
# - "hcaptcha": The widely known and used hCaptcha service
# - "mcaptcha": The lesser known self-hostable captcha service.
# It operates on proof-of-work, so it's not *really* a captcha but can mitigate serious spam attacks.
#
#[captcha]
#type = ""
#
# hCaptcha configuration:
#verify-url = ""
#site-key = ""
#secret-key = ""
#
# mCaptcha configuration:
#widget-link = ""
#site-key = ""
#secret-key = ""
#verify-url = ""
# Database configuration
#
# Kitsune uses a PostgreSQL database to store its data
2023-07-15 13:09:18 +00:00
[database]
# Database URL
#
# This URL has to contain all the information necessary to connect to the database
# i.e. username, password, host, port, database name, etc.
2023-07-15 13:09:18 +00:00
url = "postgres://localhost/kitsune"
# Max connections
#
# This is the maximum size of the database connection pool
# Increase this if you notice that a lot of time is spent on waiting for connections
2023-07-15 13:09:18 +00:00
max-connections = 20
# Email configuration
#
# If this configuration is present, Kitsune will require accounts to be confirmed via a link sent to the user's inbox
#
#[email]
#from-address = ""
#host = ""
#username = ""
#password = ""
#starttls = false # Usually servers support TLS natively. However, if they only support STARTTLS set this to "true" and Kitsune will attempt to use STARTTLS
# Embed configuration
#
# Kitsune can fetch oembed data and show it on your posts
# For this we need a small external service that fetches the pages, parses them open, and gives us the data we need
#
# We use Lantern Chat's `embed-service` microservice for this purpose: <https://github.com/Lantern-chat/embed-service/>
#
#[embed]
#service-url = ""
# Instance configuration
#
# These are all the values you can use to customize your instance
# Stuff like the name of your server, description, character limit, configuration, etc.
2023-07-15 13:09:18 +00:00
[instance]
# Allow users to create accounts with non-ASCII usernames
#
# These usernames can, for example, contains Hangul, umlauts, etc.
# We use a technique to prevent some impersonation cases by making Kitsune consider, for example, "a" and "ä" as the same character
#
# This is set to "false" by default since we are not quite sure yet how this interacts with other software
allow-non-ascii-usernames = false
# Name of your instance
#
# This name is shown on the front page, in Mastodon clients, and will show up on statistics scrapers
2023-07-15 13:09:18 +00:00
name = "Kitsune"
# Description of your instance
#
# This is an extended description of your instance, allowing you to describe the audience,
# and rules of your instance.
#
# While not guaranteed for other clients, the Kitsune frontend will interpret this as raw HTML.
2023-07-15 13:09:18 +00:00
description = "https://www.youtube.com/watch?v=6lnnPnr_0SU"
# Character limit of your instance
#
# This is the maximum length of posts that can be posted on your instance
# On Mastodon it's 500, on most other implementations it's freely configurable
2023-07-15 13:09:18 +00:00
character-limit = 5000
# Registrations open
#
# This signals to clients whether your registrations are currently open or not.
# It will also hard-enforce the closed signups inside of Kitsune, returning an error when a signup is attempted.
2023-07-15 13:09:18 +00:00
registrations-open = true
# Federation filters
#
# Federation filters are used to limit the federation to other instances.
# You can use this to block possible bad actors from interacting with your instance.
#
# The filters have two general modi:
# - "deny": The domains inside of the "domains" variable are not allowed to interact with your instance
# - "allow": *Only* the domains inside the "domains" variable are allowed to interact with your instance
#
# Choose the modus you want to use for your community.
2023-07-15 13:09:18 +00:00
[instance.federation-filter]
type = "deny"
# This list accepts wildcards (and general `glob` syntax. Reference: https://en.wikipedia.org/wiki/Glob_(programming)#Syntax)
# You can use this to deny access from entire domains or even entire TLDs
2023-07-15 13:09:18 +00:00
domains = []
[job-queue]
redis-url = "redis://localhost"
num-workers = 20
[language-detection]
backend = "whatlang"
default-language = "en"
2023-07-15 13:09:18 +00:00
[messaging]
type = "in-process"
WASM-based MRF (#490) * add skeleton * use wasmtime * disable unused features * add wit and codegen * add initial component compilation * update authors name * rebuild if wit changed * add config options and docs * split into files * add metadata functions * stuff * add test binary, add explainer * progress * enable async support * fmt * fix * remove unwrap * embed mrf into kitsune for incoming activities * rename dir * updates * fmt * disallow any network access * up * add manifest for mrf * add manifest parser/serializer * AAAAAAAAAAAAAAAAAAAA * fix test, better diagnostics * restrict version field to semver * make schemars optional * derive default * convert `activityTypes` to set * add `configSchema` field * move mrf-manifest crate * add license * add mrf-tool to tree * fix comment * remove cfg flags * add encode function * add docs * use simdutf8 where possible * add description * restructure commands * restructure cli layout * split up functions * to_owned for manifest * up * rename to mrf, version in source * load mrf module config and pass to the module * log that config has been found * add span instead of log level fields * ensure span is used properly * filter by activity types * fix url encoding for international actors * stuff * fix * add submodules * add wit deps * add wit readme * exclude wit deps * add logging to example * add logging facade to wasm modules * add tracing subscriber to wasm mrf test * remove wasi-keyvalue * create own keyvalue def * add kv example * add bucket example * add storage backend support * finish kv storage impl for fs * up * up yarn * flake.lock: Update Flake lock file updates: • Updated input 'devenv': 'github:cachix/devenv/5a30b9e5ac7c6167e61b1f4193d5130bb9f8defa' (2024-02-13) → 'github:cachix/devenv/4eccee9a19ad9be42a7859211b456b281d704313' (2024-03-05) • Updated input 'flake-utils': 'github:numtide/flake-utils/1ef2e671c3b0c19053962c07dbda38332dcebf26' (2024-01-15) → 'github:numtide/flake-utils/d465f4819400de7c8d874d50b982301f28a84605' (2024-02-28) • Updated input 'nixpkgs': 'github:nixos/nixpkgs/a4d4fe8c5002202493e87ec8dbc91335ff55552c' (2024-02-15) → 'github:nixos/nixpkgs/b8697e57f10292a6165a20f03d2f42920dfaf973' (2024-03-03) • Updated input 'rust-overlay': 'github:oxalica/rust-overlay/4ee92bf124fbc4e157cbce1bc2a35499866989fc' (2024-02-16) → 'github:oxalica/rust-overlay/e86c0fb5d3a22a5f30d7f64ecad88643fe26449d' (2024-03-05) * up fuzz * add licenses * get rid of futures-retry-policies * up * up * fix warning * update ci * add redis skeleton * impl redis backend * introduce module name to backend * add configurable redis backend * rename * progress * remove from fetcher
2024-03-09 12:21:15 +00:00
[mrf]
module-dir = "mrf-modules"
[mrf.storage]
type = "fs"
path = "./mrf-storage"
# OIDC configuration
#
# Kitsune can use an OIDC service to manage logins
# This is useful if Kitsune is ran as part of a larger network of services
#
#[oidc]
#server-url = ""
#client-id = ""
#client-secret = ""
# OpenTelemetry configuration
#
# Kitsune supports exporting traces via the OpenTelemetry Protocol (OTLP, for short)
# It's by now the de-facto standard wire protocol for exporting telemetry data
#
#[opentelemetry]
#tracing-transport = "http" # "grpc" or "http"
#tracing-endpoint = "http://localhost:4317"
# Server configuration
#
# This configuration changes the general behaviour that you'd mostly attribute to the underlying HTTP server
2023-07-15 13:09:18 +00:00
[server]
# Setting to deny browsers with the Brave User-Agent
#
# Brave is a company financed by cryptocurrency scams, founded by a queerphobic bigot
# All the "privacy advantages" of Brave, you can get by getting a Firefox + uBlock Origin + DuckDuckGo installation
#
# When this setting is enabled, all browsers with the Brave User-Agent are redirected to an article
# explaining the hateful background of Brave Inc.
deny-brave-browsers = true
# Values for the `X-Clacks-Overhead` header
# You can use this as a sort of silent memorial
# clacks-overhead = ["Natalie Nguyen", "John \"Soap\" MacTavish"]
# Path the frontend you want to use is located at
# Note: This path is not canonicalized and does not support Unix shortcuts such as the tilde (~)
2023-07-15 13:09:18 +00:00
frontend-dir = "./kitsune-fe/dist"
# Maximum upload size
#
# This is the limit of data that the HTTP server accepts before it returns an HTTP 413 error
max-upload-size = "5MiB"
# Enable the media proxy
#
# The media proxy will relay all of the media streams through the backend, enabling two important properties:
# - IP masking: Remote servers will never receive the IP addresses of you users
# - Caching: You can cache remote content via your reverse proxy, lowering the load on the remote server
2023-07-15 13:09:18 +00:00
media-proxy-enabled = false
# Port on which Kitsune will listen
#
# This is the port you'd use in your reverse proxy configuration
# You shouldn't run Kitsune without a reverse proxy
2023-07-15 13:09:18 +00:00
port = 5000
# Time until the request is aborted and the client receives a 408 HTTP error message
#
# The unit of this setting is seconds
2023-07-15 13:09:18 +00:00
request-timeout-secs = 60
[search]
type = "sql"
[storage]
type = "fs"
upload-dir = "./uploads"
[url]
scheme = "http"
domain = "localhost:5000"