2024-04-07 06:16:54 +02:00
|
|
|
# Lysand Config
|
|
|
|
|
# All of these values can be changed via the CLI (they will be saved in a file named config.internal.toml
|
|
|
|
|
# in the same directory as this one)
|
|
|
|
|
# Changing this file does not require a restart, but might take a few seconds to apply
|
|
|
|
|
# This file will be merged with the CLI configuration, taking precedence over it
|
|
|
|
|
|
2023-10-16 05:34:07 +02:00
|
|
|
[database]
|
2024-04-07 06:16:54 +02:00
|
|
|
# Main PostgreSQL database connection
|
2023-10-16 05:34:07 +02:00
|
|
|
host = "localhost"
|
2023-11-27 02:40:44 +01:00
|
|
|
port = 5432
|
2023-10-16 05:34:07 +02:00
|
|
|
username = "lysand"
|
2024-04-07 06:16:54 +02:00
|
|
|
password = "lysand"
|
2023-10-16 05:34:07 +02:00
|
|
|
database = "lysand"
|
|
|
|
|
|
2023-11-27 02:40:44 +01:00
|
|
|
[redis.queue]
|
2024-04-07 06:16:54 +02:00
|
|
|
# Redis instance for storing the federation queue
|
|
|
|
|
# Required for federation
|
2023-11-27 02:40:44 +01:00
|
|
|
host = "localhost"
|
2023-12-02 00:00:00 +01:00
|
|
|
port = 6379
|
2023-11-27 02:40:44 +01:00
|
|
|
password = ""
|
2023-12-02 00:00:00 +01:00
|
|
|
database = 0
|
|
|
|
|
|
|
|
|
|
[redis.cache]
|
2024-04-07 06:16:54 +02:00
|
|
|
# Redis instance to be used as a timeline cache
|
|
|
|
|
# Optional, can be the same as the queue instance
|
2023-12-02 00:00:00 +01:00
|
|
|
host = "localhost"
|
|
|
|
|
port = 6379
|
|
|
|
|
password = ""
|
|
|
|
|
database = 1
|
|
|
|
|
enabled = false
|
2023-11-27 02:40:44 +01:00
|
|
|
|
2023-12-03 05:11:30 +01:00
|
|
|
[meilisearch]
|
2024-04-07 06:16:54 +02:00
|
|
|
# If Meilisearch is not configured, search will not be enabled
|
2023-12-03 05:11:30 +01:00
|
|
|
host = "localhost"
|
2024-04-07 06:16:54 +02:00
|
|
|
port = 7700
|
|
|
|
|
api_key = "______________________________"
|
|
|
|
|
enabled = false
|
2023-12-03 05:11:30 +01:00
|
|
|
|
2023-12-09 05:45:36 +01:00
|
|
|
[signups]
|
|
|
|
|
# URL of your Terms of Service
|
2024-04-07 06:16:54 +02:00
|
|
|
tos_url = "https://my-site.com/tos"
|
2023-12-09 05:45:36 +01:00
|
|
|
# Whether to enable registrations or not
|
|
|
|
|
registration = true
|
|
|
|
|
rules = [
|
2024-04-14 13:20:55 +02:00
|
|
|
"Do not harass others",
|
|
|
|
|
"Be nice to people",
|
|
|
|
|
"Don't spam",
|
|
|
|
|
"Don't post illegal content",
|
2023-12-09 05:45:36 +01:00
|
|
|
]
|
|
|
|
|
|
2023-12-06 23:10:22 +01:00
|
|
|
# Delete this section if you don't want to use custom OAuth providers
|
|
|
|
|
# This is an example configuration
|
|
|
|
|
# The provider MUST support OpenID Connect with .well-known discovery
|
|
|
|
|
# Most notably, GitHub does not support this
|
|
|
|
|
[[oidc.providers]]
|
2024-04-07 06:16:54 +02:00
|
|
|
# Test with custom Authentik instance
|
2023-12-06 23:10:22 +01:00
|
|
|
name = "CPlusPatch ID"
|
|
|
|
|
id = "cpluspatch-id"
|
|
|
|
|
url = "https://id.cpluspatch.com/application/o/lysand-testing/"
|
2024-04-07 06:16:54 +02:00
|
|
|
client_id = "______________________________"
|
|
|
|
|
client_secret = "__________________________________"
|
2023-12-06 23:10:22 +01:00
|
|
|
icon = "https://cpluspatch.com/images/icons/logo.svg"
|
|
|
|
|
|
2023-10-16 05:34:07 +02:00
|
|
|
[http]
|
2024-04-07 06:16:54 +02:00
|
|
|
# The full URL Lysand will be reachable by (paths are not supported)
|
2023-10-16 05:34:07 +02:00
|
|
|
base_url = "https://lysand.social"
|
2024-04-07 06:16:54 +02:00
|
|
|
# Address to bind to
|
|
|
|
|
bind = "0.0.0.0"
|
2023-10-16 05:34:07 +02:00
|
|
|
bind_port = "8080"
|
|
|
|
|
|
|
|
|
|
# Bans IPv4 or IPv6 IPs (wildcards, networks and ranges are supported)
|
|
|
|
|
banned_ips = []
|
2024-04-07 06:16:54 +02:00
|
|
|
# Banned user agents, regex format
|
|
|
|
|
banned_user_agents = [
|
2024-04-14 13:20:55 +02:00
|
|
|
# "curl\/7.68.0",
|
|
|
|
|
# "wget\/1.20.3",
|
2024-04-07 06:16:54 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
[http.bait]
|
|
|
|
|
# Enable the bait feature (sends fake data to those who are flagged)
|
|
|
|
|
enabled = false
|
|
|
|
|
# Path to file of bait data (if not provided, Lysand will send the entire Bee Movie script)
|
|
|
|
|
send_file = ""
|
|
|
|
|
# IPs to send bait data to (wildcards, networks and ranges are supported)
|
|
|
|
|
bait_ips = ["127.0.0.1", "::1"]
|
|
|
|
|
# User agents to send bait data to (regex format)
|
|
|
|
|
bait_user_agents = ["curl", "wget"]
|
2023-10-16 05:34:07 +02:00
|
|
|
|
2023-10-16 08:04:03 +02:00
|
|
|
[smtp]
|
|
|
|
|
# SMTP server to use for sending emails
|
|
|
|
|
server = "smtp.example.com"
|
|
|
|
|
port = 465
|
|
|
|
|
username = "test@example.com"
|
2024-04-07 06:16:54 +02:00
|
|
|
password = "____________"
|
2023-10-16 08:04:03 +02:00
|
|
|
tls = true
|
2024-04-07 06:16:54 +02:00
|
|
|
# Disable all email functions (this will allow people to sign up without verifying
|
|
|
|
|
# their email)
|
|
|
|
|
enabled = false
|
2023-10-16 08:04:03 +02:00
|
|
|
|
2023-10-17 21:12:53 +02:00
|
|
|
[media]
|
|
|
|
|
# Can be "s3" or "local", where "local" uploads the file to the local filesystem
|
2023-10-19 21:53:59 +02:00
|
|
|
# If you need to change this value after setting up your instance, you must move all the files
|
2024-04-07 06:16:54 +02:00
|
|
|
# from one backend to the other manually (the CLI will have an option to do this later)
|
|
|
|
|
# TODO: Add CLI command to move files
|
|
|
|
|
backend = "local"
|
2023-10-17 21:12:53 +02:00
|
|
|
# Whether to check the hash of media when uploading to avoid duplication
|
2023-10-19 21:53:59 +02:00
|
|
|
deduplicate_media = true
|
2024-03-09 00:14:45 +01:00
|
|
|
# If media backend is "local", this is the folder where the files will be stored
|
2024-04-07 06:16:54 +02:00
|
|
|
# Can be any path
|
2024-03-09 00:14:45 +01:00
|
|
|
local_uploads_folder = "uploads"
|
2023-10-17 21:12:53 +02:00
|
|
|
|
|
|
|
|
[media.conversion]
|
2024-04-07 06:16:54 +02:00
|
|
|
# Whether to automatically convert images to another format on upload
|
2023-10-19 21:53:59 +02:00
|
|
|
convert_images = false
|
|
|
|
|
# Can be: "jxl", "webp", "avif", "png", "jpg", "heif"
|
|
|
|
|
# JXL support will likely not work
|
|
|
|
|
convert_to = "webp"
|
2023-10-17 21:12:53 +02:00
|
|
|
|
|
|
|
|
[s3]
|
|
|
|
|
# Can be left blank if you don't use the S3 media backend
|
2024-04-07 06:16:54 +02:00
|
|
|
endpoint = "myhostname.banana.com"
|
|
|
|
|
access_key = "_____________"
|
|
|
|
|
secret_access_key = "_________________"
|
|
|
|
|
region = ""
|
2023-10-17 21:12:53 +02:00
|
|
|
bucket_name = "lysand"
|
2024-04-07 06:16:54 +02:00
|
|
|
public_url = "https://cdn.test.com"
|
2023-10-17 21:12:53 +02:00
|
|
|
|
2023-10-16 08:04:03 +02:00
|
|
|
[email]
|
|
|
|
|
# Sends an email to moderators when a report is received
|
|
|
|
|
send_on_report = false
|
|
|
|
|
# Sends an email to moderators when a user is suspended
|
|
|
|
|
send_on_suspend = false
|
|
|
|
|
# Sends an email to moderators when a user is unsuspended
|
|
|
|
|
send_on_unsuspend = false
|
2024-04-07 06:16:54 +02:00
|
|
|
# Verify user emails when signing up (except via OIDC)
|
|
|
|
|
verify_email = false
|
2023-10-16 08:04:03 +02:00
|
|
|
|
2023-10-16 05:34:07 +02:00
|
|
|
[validation]
|
2024-04-07 06:16:54 +02:00
|
|
|
# Checks user data
|
|
|
|
|
# Does not retroactively apply to previously entered data
|
2023-10-16 05:34:07 +02:00
|
|
|
max_displayname_size = 50
|
|
|
|
|
max_bio_size = 160
|
|
|
|
|
max_note_size = 5000
|
|
|
|
|
max_avatar_size = 5_000_000
|
|
|
|
|
max_header_size = 5_000_000
|
2023-11-23 00:40:31 +01:00
|
|
|
max_media_size = 40_000_000
|
|
|
|
|
max_media_attachments = 10
|
|
|
|
|
max_media_description_size = 1000
|
|
|
|
|
max_poll_options = 20
|
|
|
|
|
max_poll_option_size = 500
|
|
|
|
|
min_poll_duration = 60
|
|
|
|
|
max_poll_duration = 1893456000
|
2023-10-16 05:34:07 +02:00
|
|
|
max_username_size = 30
|
2024-04-10 10:54:36 +02:00
|
|
|
max_field_count = 10
|
|
|
|
|
max_field_name_size = 1000
|
|
|
|
|
max_field_value_size = 1000
|
2024-04-07 06:16:54 +02:00
|
|
|
# Forbidden usernames, defaults are from Akkoma
|
2023-11-23 00:40:31 +01:00
|
|
|
username_blacklist = [
|
2024-04-14 13:20:55 +02:00
|
|
|
".well-known",
|
|
|
|
|
"~",
|
|
|
|
|
"about",
|
|
|
|
|
"activities",
|
|
|
|
|
"api",
|
|
|
|
|
"auth",
|
|
|
|
|
"dev",
|
|
|
|
|
"inbox",
|
|
|
|
|
"internal",
|
|
|
|
|
"main",
|
|
|
|
|
"media",
|
|
|
|
|
"nodeinfo",
|
|
|
|
|
"notice",
|
|
|
|
|
"oauth",
|
|
|
|
|
"objects",
|
|
|
|
|
"proxy",
|
|
|
|
|
"push",
|
|
|
|
|
"registration",
|
|
|
|
|
"relay",
|
|
|
|
|
"settings",
|
|
|
|
|
"status",
|
|
|
|
|
"tag",
|
|
|
|
|
"users",
|
|
|
|
|
"web",
|
|
|
|
|
"search",
|
|
|
|
|
"mfa",
|
2023-11-23 00:40:31 +01:00
|
|
|
]
|
2023-10-16 05:34:07 +02:00
|
|
|
# Whether to blacklist known temporary email providers
|
|
|
|
|
blacklist_tempmail = false
|
2024-04-07 06:16:54 +02:00
|
|
|
# Additional email providers to blacklist (list of domains)
|
2023-10-16 05:34:07 +02:00
|
|
|
email_blacklist = []
|
|
|
|
|
# Valid URL schemes, otherwise the URL is parsed as text
|
2023-11-23 00:40:31 +01:00
|
|
|
url_scheme_whitelist = [
|
2024-04-14 13:20:55 +02:00
|
|
|
"http",
|
|
|
|
|
"https",
|
|
|
|
|
"ftp",
|
|
|
|
|
"dat",
|
|
|
|
|
"dweb",
|
|
|
|
|
"gopher",
|
|
|
|
|
"hyper",
|
|
|
|
|
"ipfs",
|
|
|
|
|
"ipns",
|
|
|
|
|
"irc",
|
|
|
|
|
"xmpp",
|
|
|
|
|
"ircs",
|
|
|
|
|
"magnet",
|
|
|
|
|
"mailto",
|
|
|
|
|
"mumble",
|
|
|
|
|
"ssb",
|
|
|
|
|
"gemini",
|
2024-04-07 06:16:54 +02:00
|
|
|
]
|
|
|
|
|
# Only allow those MIME types of data to be uploaded
|
|
|
|
|
# This can easily be spoofed, but if it is spoofed it will appear broken
|
|
|
|
|
# to normal clients until despoofed
|
2023-11-27 01:56:16 +01:00
|
|
|
enforce_mime_types = false
|
2023-11-23 00:40:31 +01:00
|
|
|
allowed_mime_types = [
|
2024-04-14 13:20:55 +02:00
|
|
|
"image/jpeg",
|
|
|
|
|
"image/png",
|
|
|
|
|
"image/gif",
|
|
|
|
|
"image/heic",
|
|
|
|
|
"image/heif",
|
|
|
|
|
"image/webp",
|
|
|
|
|
"image/avif",
|
|
|
|
|
"video/webm",
|
|
|
|
|
"video/mp4",
|
|
|
|
|
"video/quicktime",
|
|
|
|
|
"video/ogg",
|
|
|
|
|
"audio/wave",
|
|
|
|
|
"audio/wav",
|
|
|
|
|
"audio/x-wav",
|
|
|
|
|
"audio/x-pn-wave",
|
|
|
|
|
"audio/vnd.wave",
|
|
|
|
|
"audio/ogg",
|
|
|
|
|
"audio/vorbis",
|
|
|
|
|
"audio/mpeg",
|
|
|
|
|
"audio/mp3",
|
|
|
|
|
"audio/webm",
|
|
|
|
|
"audio/flac",
|
|
|
|
|
"audio/aac",
|
|
|
|
|
"audio/m4a",
|
|
|
|
|
"audio/x-m4a",
|
|
|
|
|
"audio/mp4",
|
|
|
|
|
"audio/3gpp",
|
|
|
|
|
"video/x-ms-asf",
|
2023-11-27 01:56:16 +01:00
|
|
|
]
|
2023-10-16 05:34:07 +02:00
|
|
|
|
|
|
|
|
[defaults]
|
|
|
|
|
# Default visibility for new notes
|
2024-04-07 06:16:54 +02:00
|
|
|
# Can be public, unlisted, private or direct
|
|
|
|
|
# Private only sends to followers, unlisted doesn't show up in timelines
|
2023-10-16 05:34:07 +02:00
|
|
|
visibility = "public"
|
2024-04-07 06:16:54 +02:00
|
|
|
# Default language for new notes (ISO code)
|
2023-10-16 05:34:07 +02:00
|
|
|
language = "en"
|
2024-04-08 05:55:12 +02:00
|
|
|
# Default avatar, must be a valid URL or "" for a placeholder avatar
|
2023-10-16 05:34:07 +02:00
|
|
|
avatar = ""
|
2024-04-07 06:16:54 +02:00
|
|
|
# Default header, must be a valid URL or "" for none
|
2023-10-16 05:34:07 +02:00
|
|
|
header = ""
|
2024-04-08 05:55:12 +02:00
|
|
|
# A style name from https://www.dicebear.com/styles
|
|
|
|
|
placeholder_style = "thumbs"
|
2023-10-16 05:34:07 +02:00
|
|
|
|
2024-04-07 06:16:54 +02:00
|
|
|
[federation]
|
|
|
|
|
# This is a list of domain names, such as "mastodon.social" or "pleroma.site"
|
|
|
|
|
# These changes will not retroactively apply to existing data before they were changed
|
|
|
|
|
# For that, please use the CLI
|
2023-10-16 05:34:07 +02:00
|
|
|
|
2024-04-07 06:16:54 +02:00
|
|
|
# These instances will not be federated with
|
|
|
|
|
blocked = []
|
|
|
|
|
# These instances' data will only be shown to followers, not in public timelines
|
|
|
|
|
followers_only = []
|
2023-10-16 05:34:07 +02:00
|
|
|
|
2024-04-07 06:16:54 +02:00
|
|
|
[federation.discard]
|
|
|
|
|
# These objects will be discarded when received from these instances
|
|
|
|
|
reports = []
|
|
|
|
|
deletes = []
|
|
|
|
|
updates = []
|
|
|
|
|
media = []
|
|
|
|
|
follows = []
|
|
|
|
|
# If instance reactions are blocked, likes will also be discarded
|
|
|
|
|
likes = []
|
|
|
|
|
reactions = []
|
|
|
|
|
banners = []
|
|
|
|
|
avatars = []
|
2023-10-16 08:07:39 +02:00
|
|
|
|
2023-11-04 04:34:31 +01:00
|
|
|
[instance]
|
|
|
|
|
name = "Lysand"
|
|
|
|
|
description = "A test instance of Lysand"
|
|
|
|
|
# URL to your instance logo (jpg files should be renamed to jpeg)
|
|
|
|
|
logo = ""
|
|
|
|
|
# URL to your instance banner (jpg files should be renamed to jpeg)
|
|
|
|
|
banner = ""
|
|
|
|
|
|
2023-10-16 05:34:07 +02:00
|
|
|
|
|
|
|
|
[filters]
|
2024-04-07 06:16:54 +02:00
|
|
|
# Regex filters for federated and local data
|
|
|
|
|
# Does not apply retroactively (try the CLI for that)
|
|
|
|
|
|
|
|
|
|
# Note contents
|
|
|
|
|
note_content = [
|
2024-04-14 13:20:55 +02:00
|
|
|
# "(https?://)?(www\\.)?youtube\\.com/watch\\?v=[a-zA-Z0-9_-]+",
|
|
|
|
|
# "(https?://)?(www\\.)?youtu\\.be/[a-zA-Z0-9_-]+",
|
2023-10-16 05:34:07 +02:00
|
|
|
]
|
2024-04-07 06:16:54 +02:00
|
|
|
emoji = []
|
|
|
|
|
# These will drop users matching the filters
|
|
|
|
|
username = []
|
|
|
|
|
displayname = []
|
|
|
|
|
bio = []
|
2023-10-16 05:34:07 +02:00
|
|
|
|
|
|
|
|
[logging]
|
|
|
|
|
# Log all requests (warning: this is a lot of data)
|
2024-04-07 06:16:54 +02:00
|
|
|
log_requests = false
|
2023-10-16 05:34:07 +02:00
|
|
|
# Log request and their contents (warning: this is a lot of data)
|
|
|
|
|
log_requests_verbose = false
|
2024-04-14 13:20:55 +02:00
|
|
|
# Available levels: debug, info, warning, error, critical
|
|
|
|
|
log_level = "info"
|
2024-03-11 03:04:14 +01:00
|
|
|
# For GDPR compliance, you can disable logging of IPs
|
|
|
|
|
log_ip = false
|
2023-10-16 05:34:07 +02:00
|
|
|
|
|
|
|
|
# Log all filtered objects
|
|
|
|
|
log_filters = true
|
|
|
|
|
|
2024-04-07 06:16:54 +02:00
|
|
|
[logging.storage]
|
|
|
|
|
# Path to logfile for requests
|
|
|
|
|
requests = "logs/requests.log"
|
|
|
|
|
|
2023-10-16 05:34:07 +02:00
|
|
|
[ratelimits]
|
2024-04-07 06:16:54 +02:00
|
|
|
# These settings apply to every route at once
|
2023-10-16 05:34:07 +02:00
|
|
|
# Amount to multiply every route's duration by
|
|
|
|
|
duration_coeff = 1.0
|
2024-04-07 06:16:54 +02:00
|
|
|
# Amount to multiply every route's max requests per [duration] by
|
2023-10-16 05:34:07 +02:00
|
|
|
max_coeff = 1.0
|
|
|
|
|
|
|
|
|
|
[custom_ratelimits]
|
|
|
|
|
# Add in any API route in this style here
|
2024-04-07 06:16:54 +02:00
|
|
|
# Applies before the global ratelimit changes
|
|
|
|
|
"/api/v1/accounts/:id/block" = { duration = 30, max = 60 }
|
2023-11-23 00:40:31 +01:00
|
|
|
"/api/v1/timelines/public" = { duration = 60, max = 200 }
|