akkoma/config/description.exs

3518 lines
102 KiB
Elixir
Raw Permalink Normal View History

import Config
2019-08-30 10:20:09 +00:00
websocket_config = [
path: "/websocket",
serializer: [
{Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
{Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}
],
timeout: 60_000,
transport_log: false,
compress: false
]
2020-08-25 09:49:44 +00:00
installed_frontend_options = [
2020-08-06 14:41:56 +00:00
%{
key: "name",
label: "Name",
2020-08-06 14:41:56 +00:00
type: :string,
description:
2020-08-25 09:49:44 +00:00
"Name of the installed frontend. Valid config must include both `Name` and `Reference` values."
2020-08-06 14:41:56 +00:00
},
%{
key: "ref",
label: "Reference",
2020-08-06 14:41:56 +00:00
type: :string,
description:
2020-08-25 09:49:44 +00:00
"Reference of the installed frontend to be used. Valid config must include both `Name` and `Reference` values."
}
]
frontend_options = [
%{
key: "name",
label: "Name",
type: :string,
description: "Name of the frontend."
},
%{
key: "ref",
label: "Reference",
type: :string,
description: "Reference of the frontend to be used."
2020-08-06 14:41:56 +00:00
},
%{
key: "git",
2020-09-29 21:49:08 +00:00
label: "Git Repository URL",
2020-08-06 14:41:56 +00:00
type: :string,
description: "URL of the git repository of the frontend"
},
%{
key: "build_url",
label: "Build URL",
2020-08-06 14:41:56 +00:00
type: :string,
description:
"Either an url to a zip file containing the frontend or a template to build it by inserting the `ref`. The string `${ref}` will be replaced by the configured `ref`.",
example: "https://some.url/builds/${ref}.zip"
},
%{
key: "build_dir",
2020-09-29 21:50:53 +00:00
label: "Build directory",
2020-08-06 14:41:56 +00:00
type: :string,
description: "The directory inside the zip file "
},
%{
key: "custom-http-headers",
label: "Custom HTTP headers",
type: {:list, :string},
description: "The custom HTTP headers for the frontend"
2020-08-06 14:41:56 +00:00
}
]
2019-08-30 10:20:09 +00:00
config :pleroma, :config_description, [
%{
group: :pleroma,
key: Pleroma.Upload,
type: :group,
description: "Upload general settings",
children: [
%{
key: :uploader,
type: :module,
description: "Module which will be used for uploads",
suggestions: {:list_behaviour_implementations, Pleroma.Uploaders.Uploader}
2019-08-30 10:20:09 +00:00
},
%{
key: :filters,
type: {:list, :module},
description:
2020-05-11 06:35:20 +00:00
"List of filter modules for uploads. Module names are shortened (removed leading `Pleroma.Upload.Filter.` part), but on adding custom module you need to use full name.",
suggestions: {:list_behaviour_implementations, Pleroma.Upload.Filter}
2019-08-30 10:20:09 +00:00
},
%{
key: :link_name,
type: :boolean,
2019-09-03 08:56:21 +00:00
description:
"If enabled, a name parameter will be added to the URL of the upload. For example `https://instance.tld/media/imagehash.png?name=realname.png`."
2019-08-30 10:20:09 +00:00
},
%{
key: :base_url,
label: "Base URL",
2019-08-30 10:20:09 +00:00
type: :string,
description:
"Base URL for the uploads. Required if you use a CDN or host attachments under a different domain - it is HIGHLY recommended that you **do not** set this to be the same as the domain akkoma is hosted on.",
2019-08-30 10:20:09 +00:00
suggestions: [
"https://media.akkoma.dev/media/"
2019-08-30 10:20:09 +00:00
]
},
Sanitise Content-Type of uploads The lack thereof enables spoofing ActivityPub objects. A malicious user could upload fake activities as attachments and (if having access to remote search) trick local and remote fedi instances into fetching and processing it as a valid object. If uploads are hosted on the same domain as the instance itself, it is possible for anyone with upload access to impersonate(!) other users of the same instance. If uploads are exclusively hosted on a different domain, even the most basic check of domain of the object id and fetch url matching should prevent impersonation. However, it may still be possible to trick servers into accepting bogus users on the upload (sub)domain and bogus notes attributed to such users. Instances which later migrated to a different domain and have a permissive redirect rule in place can still be vulnerable. If — like Akkoma — the fetching server is overly permissive with redirects, impersonation still works. This was possible because Plug.Static also uses our custom MIME type mappings used for actually authentic AP objects. Provided external storage providers don’t somehow return ActivityStream Content-Types on their own, instances using those are also safe against their users being spoofed via uploads. Akkoma instances using the OnlyMedia upload filter cannot be exploited as a vector in this way — IF the fetching server validates the Content-Type of fetched objects (Akkoma itself does this already). However, restricting uploads to only multimedia files may be a bit too heavy-handed. Instead this commit will restrict the returned Content-Type headers for user uploaded files to a safe subset, falling back to generic 'application/octet-stream' for anything else. This will also protect against non-AP payloads as e.g. used in past frontend code injection attacks. It’s a slight regression in user comfort, if say PDFs are uploaded, but this trade-off seems fairly acceptable. (Note, just excluding our own custom types would offer no protection against non-AP payloads and bear a (perhaps small) risk of a silent regression should MIME ever decide to add a canonical extension for ActivityPub objects) Now, one might expect there to be other defence mechanisms besides Content-Type preventing counterfeits from being accepted, like e.g. validation of the queried URL and AP ID matching. Inserting a self-reference into our uploads is hard, but unfortunately *oma does not verify the id in such a way and happily accepts _anything_ from the same domain (without even considering redirects). E.g. Sharkey (and possibly other *keys) seem to attempt to guard against this by immediately refetching the object from its ID, but this is easily circumvented by just uploading two payloads with the ID of one linking to the other. Unfortunately *oma is thus _both_ a vector for spoofing and vulnerable to those spoof payloads, resulting in an easy way to impersonate our users. Similar flaws exists for emoji and media proxy. Subsequent commits will fix this by rigorously sanitising content types in more areas, hardening our checks, improving the default config and discouraging insecure config options.
2024-03-04 16:50:21 +00:00
%{
key: :allowed_mime_types,
label: "Allowed MIME types",
type: {:list, :string},
description:
"List of MIME (main) types uploads are allowed to identify themselves with. Other types may still be uploaded, but will identify as a generic binary to clients. WARNING: Loosening this over the defaults can lead to security issues. Removing types is safe, but only add to the list if you are sure you know what you are doing.",
suggestions: [
"image",
"audio",
"video",
"font"
]
},
2019-08-30 10:20:09 +00:00
%{
key: :proxy_remote,
type: :boolean,
2020-12-23 23:41:10 +00:00
description: """
Proxy requests to the remote uploader.\n
Useful if media upload endpoint is not internet accessible.
"""
2020-05-22 15:30:13 +00:00
},
%{
key: :filename_display_max_length,
type: :integer,
description: "Set max length of a filename to display. 0 = no limit. Default: 30"
2019-08-30 10:20:09 +00:00
}
]
},
%{
group: :pleroma,
key: Pleroma.Uploaders.Local,
type: :group,
description: "Local uploader-related settings",
children: [
%{
key: :uploads,
type: :string,
description: "Path where user's uploads will be saved",
2019-08-30 10:20:09 +00:00
suggestions: [
"uploads"
]
}
]
},
%{
group: :pleroma,
key: Pleroma.Uploaders.S3,
type: :group,
description: "S3 uploader-related settings",
children: [
%{
key: :bucket,
2019-08-30 16:14:01 +00:00
type: :string,
2019-08-30 10:20:09 +00:00
description: "S3 bucket",
suggestions: [
"bucket"
]
},
%{
key: :bucket_namespace,
type: :string,
description: "S3 bucket namespace",
suggestions: ["pleroma"]
},
%{
key: :truncated_namespace,
type: :string,
description:
"If you use S3 compatible service such as Digital Ocean Spaces or CDN, set folder name or \"\" etc." <>
" For example, when using CDN to S3 virtual host format, set \"\". At this time, write CNAME to CDN in Upload base_url."
},
%{
key: :streaming_enabled,
type: :boolean,
description:
"Enable streaming uploads, when enabled the file will be sent to the server in chunks as it's being read. This may be unsupported by some providers, try disabling this if you have upload problems."
2019-08-30 10:20:09 +00:00
}
]
},
%{
group: :pleroma,
key: Pleroma.Upload.Filter.Mogrify,
type: :group,
description: "Uploads mogrify filter settings",
children: [
%{
key: :args,
type: [:string, {:list, :string}, {:list, :tuple}],
description:
"List of actions for the mogrify command. It's possible to add self-written settings as string. " <>
"For example `auto-orient, strip, {\"resize\", \"3840x1080>\"}` value will be parsed into valid list of the settings.",
2019-08-30 10:20:09 +00:00
suggestions: [
"strip",
2019-09-29 08:17:38 +00:00
"auto-orient",
{"implode", "1"}
2019-08-30 10:20:09 +00:00
]
}
]
},
%{
group: :pleroma,
key: Pleroma.Upload.Filter.AnonymizeFilename,
type: :group,
description: "Filter replaces the filename of the upload",
children: [
%{
key: :text,
type: :string,
description:
"Text to replace filenames in links. If no setting, {random}.extension will be used. You can get the original" <>
" filename extension by using {extension}, for example custom-file-name.{extension}.",
2019-08-30 10:20:09 +00:00
suggestions: [
2019-09-29 08:17:38 +00:00
"custom-file-name.{extension}"
2019-08-30 10:20:09 +00:00
]
}
]
},
%{
group: :pleroma,
key: Pleroma.Emails.Mailer,
type: :group,
description: "Mailer-related settings",
children: [
%{
key: :enabled,
label: "Mailer Enabled",
2021-02-06 19:20:58 +00:00
type: :boolean
},
2019-08-30 10:20:09 +00:00
%{
key: :adapter,
type: :module,
description:
2021-02-06 18:04:28 +00:00
"One of the mail adapters listed in [Swoosh documentation](https://hexdocs.pm/swoosh/Swoosh.html#module-adapters)",
2019-08-30 10:20:09 +00:00
suggestions: [
Swoosh.Adapters.AmazonSES,
Swoosh.Adapters.Dyn,
Swoosh.Adapters.Gmail,
2019-08-30 10:20:09 +00:00
Swoosh.Adapters.Mailgun,
Swoosh.Adapters.Mailjet,
Swoosh.Adapters.Mandrill,
2019-08-30 10:20:09 +00:00
Swoosh.Adapters.Postmark,
Swoosh.Adapters.SMTP,
Swoosh.Adapters.Sendgrid,
Swoosh.Adapters.Sendmail,
2019-08-30 10:20:09 +00:00
Swoosh.Adapters.SocketLabs,
Swoosh.Adapters.SparkPost
2019-08-30 10:20:09 +00:00
]
},
%{
group: {:subgroup, Swoosh.Adapters.SMTP},
key: :relay,
type: :string,
description: "Hostname or IP address",
suggestions: ["smtp.example.com"]
},
%{
group: {:subgroup, Swoosh.Adapters.SMTP},
key: :port,
type: :integer,
description: "SMTP port",
suggestions: ["1025"]
2019-08-30 10:20:09 +00:00
},
%{
group: {:subgroup, Swoosh.Adapters.SMTP},
key: :username,
type: :string,
2021-02-06 18:28:49 +00:00
description: "SMTP AUTH username",
suggestions: ["user@example.com"]
2019-08-30 10:20:09 +00:00
},
%{
group: {:subgroup, Swoosh.Adapters.SMTP},
key: :password,
type: :string,
2021-02-06 18:28:49 +00:00
description: "SMTP AUTH password",
2019-08-30 10:20:09 +00:00
suggestions: ["password"]
},
%{
group: {:subgroup, Swoosh.Adapters.SMTP},
key: :ssl,
2021-02-06 18:28:49 +00:00
label: "Use SSL",
2019-08-30 10:20:09 +00:00
type: :boolean,
description: "Use Implicit SSL/TLS. e.g. port 465"
2019-08-30 10:20:09 +00:00
},
%{
group: {:subgroup, Swoosh.Adapters.SMTP},
key: :tls,
2021-02-06 18:28:49 +00:00
label: "STARTTLS Mode",
type: {:dropdown, :atom},
2021-02-06 18:28:49 +00:00
description: "Explicit TLS (STARTTLS) enforcement mode",
suggestions: [:if_available, :always, :never]
2019-08-30 10:20:09 +00:00
},
%{
group: {:subgroup, Swoosh.Adapters.SMTP},
key: :auth,
2021-02-06 18:28:49 +00:00
label: "AUTH Mode",
type: {:dropdown, :atom},
2021-02-06 18:28:49 +00:00
description: "SMTP AUTH enforcement mode",
suggestions: [:if_available, :always, :never]
2019-08-30 10:20:09 +00:00
},
%{
group: {:subgroup, Swoosh.Adapters.SMTP},
key: :retries,
type: :integer,
description: "SMTP temporary (4xx) error retries",
suggestions: [1]
2019-08-30 10:20:09 +00:00
},
%{
group: {:subgroup, Swoosh.Adapters.Sendgrid},
key: :api_key,
label: "SendGrid API Key",
2019-08-30 10:20:09 +00:00
type: :string,
suggestions: ["YOUR_API_KEY"]
2019-08-30 10:20:09 +00:00
},
%{
group: {:subgroup, Swoosh.Adapters.Sendmail},
key: :cmd_path,
type: :string,
suggestions: ["/usr/bin/sendmail"]
},
%{
group: {:subgroup, Swoosh.Adapters.Sendmail},
key: :cmd_args,
type: :string,
suggestions: ["-N delay,failure,success"]
},
%{
group: {:subgroup, Swoosh.Adapters.Sendmail},
key: :qmail,
label: "Qmail compat mode",
2021-02-06 19:20:58 +00:00
type: :boolean
2019-08-30 10:20:09 +00:00
},
%{
group: {:subgroup, Swoosh.Adapters.Mandrill},
key: :api_key,
label: "Mandrill API Key",
2019-08-30 10:20:09 +00:00
type: :string,
suggestions: ["YOUR_API_KEY"]
2019-08-30 10:20:09 +00:00
},
%{
group: {:subgroup, Swoosh.Adapters.Mailgun},
key: :api_key,
label: "Mailgun API Key",
2019-08-30 10:20:09 +00:00
type: :string,
suggestions: ["YOUR_API_KEY"]
2019-08-30 10:20:09 +00:00
},
%{
group: {:subgroup, Swoosh.Adapters.Mailgun},
key: :domain,
type: :string,
suggestions: ["YOUR_DOMAIN_NAME"]
2019-08-30 10:20:09 +00:00
},
%{
group: {:subgroup, Swoosh.Adapters.Mailjet},
key: :api_key,
label: "MailJet Public API Key",
2019-08-30 10:20:09 +00:00
type: :string,
suggestions: ["MJ_APIKEY_PUBLIC"]
2019-08-30 10:20:09 +00:00
},
%{
group: {:subgroup, Swoosh.Adapters.Mailjet},
key: :secret,
label: "MailJet Private API Key",
2019-08-30 10:20:09 +00:00
type: :string,
suggestions: ["MJ_APIKEY_PRIVATE"]
2019-08-30 10:20:09 +00:00
},
%{
group: {:subgroup, Swoosh.Adapters.Postmark},
key: :api_key,
label: "Postmark API Key",
2019-08-30 10:20:09 +00:00
type: :string,
suggestions: ["X-Postmark-Server-Token"]
2019-08-30 10:20:09 +00:00
},
%{
group: {:subgroup, Swoosh.Adapters.SparkPost},
key: :api_key,
label: "SparkPost API key",
2019-08-30 10:20:09 +00:00
type: :string,
suggestions: ["YOUR_API_KEY"]
2019-08-30 10:20:09 +00:00
},
%{
group: {:subgroup, Swoosh.Adapters.SparkPost},
key: :endpoint,
type: :string,
suggestions: ["https://api.sparkpost.com/api/v1"]
},
%{
group: {:subgroup, Swoosh.Adapters.AmazonSES},
key: :access_key,
label: "AWS Access Key",
2019-09-29 08:17:38 +00:00
type: :string,
suggestions: ["AWS_ACCESS_KEY"]
2019-08-30 10:20:09 +00:00
},
%{
group: {:subgroup, Swoosh.Adapters.AmazonSES},
key: :secret,
label: "AWS Secret Key",
2019-08-30 10:20:09 +00:00
type: :string,
suggestions: ["AWS_SECRET_KEY"]
2019-08-30 10:20:09 +00:00
},
%{
group: {:subgroup, Swoosh.Adapters.AmazonSES},
key: :region,
label: "AWS Region",
2019-08-30 10:20:09 +00:00
type: :string,
suggestions: ["us-east-1", "us-east-2"]
2019-08-30 10:20:09 +00:00
},
%{
group: {:subgroup, Swoosh.Adapters.Dyn},
key: :api_key,
label: "Dyn API Key",
2019-08-30 10:20:09 +00:00
type: :string,
suggestions: ["apikey"]
2019-08-30 10:20:09 +00:00
},
%{
group: {:subgroup, Swoosh.Adapters.SocketLabs},
key: :api_key,
label: "SocketLabs API Key",
2019-08-30 10:20:09 +00:00
type: :string,
suggestions: ["INJECTION_API_KEY"]
2019-08-30 10:20:09 +00:00
},
%{
group: {:subgroup, Swoosh.Adapters.SocketLabs},
key: :server_id,
label: "Server ID",
2019-08-30 10:20:09 +00:00
type: :string,
suggestions: ["SERVER_ID"]
2019-08-30 10:20:09 +00:00
},
%{
group: {:subgroup, Swoosh.Adapters.Gmail},
key: :access_token,
label: "GMail API Access Token",
2019-08-30 10:20:09 +00:00
type: :string,
suggestions: ["GMAIL_API_ACCESS_TOKEN"]
}
]
},
2019-08-30 10:20:09 +00:00
%{
group: :pleroma,
key: :uri_schemes,
label: "URI Schemes",
2019-08-30 10:20:09 +00:00
type: :group,
description: "URI schemes related settings",
children: [
%{
key: :valid_schemes,
type: {:list, :string},
description: "List of the scheme part that is considered valid to be an URL",
suggestions: [
2019-09-29 08:17:38 +00:00
"https",
"http",
"dat",
"dweb",
"gopher",
2020-07-07 07:05:54 +00:00
"hyper",
2019-09-29 08:17:38 +00:00
"ipfs",
"ipns",
"irc",
"ircs",
"magnet",
"mailto",
"mumble",
"ssb",
"xmpp"
2019-08-30 10:20:09 +00:00
]
}
]
},
%{
group: :pleroma,
key: :features,
type: :group,
description: "Customizable features",
children: [
%{
key: :improved_hashtag_timeline,
type: {:dropdown, :atom},
description:
"Setting to force toggle / force disable improved hashtags timeline. `:enabled` forces hashtags to be fetched from `hashtags` table for hashtags timeline. `:disabled` forces object-embedded hashtags to be used (slower). Keep it `:auto` for automatic behaviour (it is auto-set to `:enabled` [unless overridden] when HashtagsTableMigrator completes).",
suggestions: [:auto, :enabled, :disabled]
}
]
},
%{
group: :pleroma,
key: :populate_hashtags_table,
type: :group,
description: "`populate_hashtags_table` background migration settings",
children: [
%{
key: :fault_rate_allowance,
type: :float,
description:
2021-02-22 20:41:57 +00:00
"Max accepted rate of objects that failed in the migration. Any value from 0.0 which tolerates no errors to 1.0 which will enable the feature even if hashtags transfer failed for all records.",
suggestions: [0.01]
},
%{
key: :sleep_interval_ms,
type: :integer,
description:
"Sleep interval between each chunk of processed records in order to decrease the load on the system (defaults to 0 and should be keep default on most instances)."
}
]
},
2019-08-30 10:20:09 +00:00
%{
group: :pleroma,
key: :instance,
type: :group,
description: "Instance-related settings",
children: [
%{
key: :name,
type: :string,
description: "Name of the instance",
suggestions: [
"Pleroma"
]
},
%{
key: :languages,
type: {:list, :string},
description: "Languages the instance uses",
suggestions: [
"en",
"ja",
"fr"
]
},
2019-08-30 10:20:09 +00:00
%{
key: :email,
label: "Admin Email Address",
2019-08-30 10:20:09 +00:00
type: :string,
description: "Email used to reach an Administrator/Moderator of the instance",
suggestions: [
"email@example.com"
]
},
%{
key: :notify_email,
label: "Sender Email Address",
2019-08-30 10:20:09 +00:00
type: :string,
description: "Envelope FROM address for mail sent via Pleroma",
2019-08-30 10:20:09 +00:00
suggestions: [
"notify@example.com"
]
},
%{
key: :description,
type: :string,
2020-02-13 18:09:11 +00:00
description:
"The instance's description. It can be seen in nodeinfo and `/api/v1/instance`",
2019-08-30 10:20:09 +00:00
suggestions: [
"Very cool instance"
]
},
%{
key: :limit,
type: :integer,
description: "Posts character limit (CW/Subject included in the counter)",
suggestions: [
5_000
]
},
%{
key: :remote_limit,
type: :integer,
description: "Hard character limit beyond which remote posts will be dropped",
suggestions: [
100_000
]
},
%{
key: :upload_limit,
type: :integer,
description: "File size limit of uploads (except for avatar, background, banner)",
suggestions: [
16_000_000
]
},
%{
key: :avatar_upload_limit,
type: :integer,
description: "File size limit of user's profile avatars",
suggestions: [
2_000_000
]
},
%{
key: :background_upload_limit,
type: :integer,
description: "File size limit of user's profile backgrounds",
suggestions: [
4_000_000
]
},
%{
key: :banner_upload_limit,
type: :integer,
description: "File size limit of user's profile banners",
suggestions: [
4_000_000
]
},
%{
key: :poll_limits,
type: :map,
description: "A map with poll limits for local polls",
suggestions: [
%{
max_options: 20,
max_option_chars: 200,
min_expiration: 0,
max_expiration: 31_536_000
}
],
children: [
%{
key: :max_options,
type: :integer,
description: "Maximum number of options",
suggestions: [20]
},
%{
key: :max_option_chars,
type: :integer,
description: "Maximum number of characters per option",
suggestions: [200]
},
%{
key: :min_expiration,
type: :integer,
description: "Minimum expiration time (in seconds)",
suggestions: [0]
},
%{
key: :max_expiration,
type: :integer,
description: "Maximum expiration time (in seconds)",
suggestions: [3600]
}
]
},
%{
key: :registrations_open,
type: :boolean,
2020-02-13 14:01:39 +00:00
description:
"Enable registrations for anyone. Invitations require this setting to be disabled."
2019-08-30 10:20:09 +00:00
},
%{
key: :invites_enabled,
type: :boolean,
2020-02-13 14:01:39 +00:00
description:
"Enable user invitations for admins (depends on `registrations_open` being disabled)"
2019-08-30 10:20:09 +00:00
},
%{
key: :account_activation_required,
type: :boolean,
description: "Require users to confirm their emails before signing in"
2019-08-30 10:20:09 +00:00
},
%{
key: :account_approval_required,
type: :boolean,
description: "Require users to be manually approved by an admin before signing in"
},
2019-08-30 10:20:09 +00:00
%{
key: :federating,
type: :boolean,
description: "Enable federation with other instances"
2019-08-30 10:20:09 +00:00
},
%{
key: :federation_incoming_replies_max_depth,
2020-01-14 12:00:38 +00:00
label: "Fed. incoming replies max depth",
2019-08-30 10:20:09 +00:00
type: :integer,
description:
"Max. depth of reply-to and reply activities fetching on incoming federation, to prevent out-of-memory situations while" <>
" fetching very long threads. If set to `nil`, threads of any depth will be fetched. Lower this value if you experience out-of-memory crashes.",
2019-08-30 10:20:09 +00:00
suggestions: [
100
]
},
%{
key: :federation_reachability_timeout_days,
2020-01-14 12:00:38 +00:00
label: "Fed. reachability timeout days",
2019-08-30 10:20:09 +00:00
type: :integer,
description:
"Timeout (in days) of each external federation target being unreachable prior to pausing federating to it",
2019-08-30 10:20:09 +00:00
suggestions: [
7
]
},
%{
key: :allow_relay,
type: :boolean,
2021-06-02 16:21:04 +00:00
description:
"Permits remote instances to subscribe to all public posts of your instance. (Important!) This may increase the visibility of your instance."
2019-08-30 10:20:09 +00:00
},
%{
key: :public,
type: :boolean,
description:
"Switching this on will allow unauthenticated users access to all public resources on your instance" <>
" Switching it off is useful for disabling the Local Timeline and The Whole Known Network. " <>
" Note: when setting to `false`, please also check `:restrict_unauthenticated` setting."
2019-08-30 10:20:09 +00:00
},
%{
key: :quarantined_instances,
type: {:list, :tuple},
key_placeholder: "instance",
value_placeholder: "reason",
2019-08-30 10:20:09 +00:00
description:
"(Deprecated, will be removed in next release) List of ActivityPub instances where activities will not be sent, and the reason for doing so",
2019-08-30 10:20:09 +00:00
suggestions: [
{"quarantined.com", "Reason"},
{"*.quarantined.com", "Reason"}
2019-08-30 10:20:09 +00:00
]
},
%{
key: :static_dir,
type: :string,
description: "Instance static directory",
suggestions: [
"instance/static/"
]
},
%{
key: :allowed_post_formats,
type: {:list, :string},
description: "MIME-type list of formats allowed to be posted (transformed into HTML)",
suggestions: [
2019-12-16 15:13:22 +00:00
"text/plain",
"text/html",
"text/markdown",
"text/bbcode",
"text/x.misskeymarkdown"
2019-08-30 10:20:09 +00:00
]
},
%{
key: :extended_nickname_format,
type: :boolean,
description:
"Enable to use extended local nicknames format (allows underscores/dashes)." <>
" This will break federation with older software for theses nicknames."
2019-08-30 10:20:09 +00:00
},
2020-01-30 22:20:37 +00:00
%{
key: :cleanup_attachments,
type: :boolean,
description: """
2020-02-13 17:31:02 +00:00
Enable to remove associated attachments when status is removed.
2020-01-30 22:20:37 +00:00
This will not affect duplicates and attachments without status.
Enabling this will increase load to database when deleting statuses on larger instances.
"""
},
2019-08-30 10:20:09 +00:00
%{
key: :max_pinned_statuses,
type: :integer,
description: "The maximum number of pinned statuses. 0 will disable the feature.",
2019-08-30 10:20:09 +00:00
suggestions: [
0,
1,
3
]
},
%{
key: :autofollowed_nicknames,
type: {:list, :string},
description:
"Set to nicknames of (local) users that every new user should automatically follow"
2019-08-30 10:20:09 +00:00
},
%{
key: :autofollowing_nicknames,
type: {:list, :string},
description:
2020-10-16 17:43:44 +00:00
"Set to nicknames of (local) users that automatically follows every newly registered user"
},
2019-08-30 10:20:09 +00:00
%{
key: :attachment_links,
2019-08-30 10:20:09 +00:00
type: :boolean,
2020-02-13 14:02:33 +00:00
description: "Enable to automatically add attachment link text to statuses"
2019-08-30 10:20:09 +00:00
},
%{
key: :max_report_comment_size,
type: :integer,
description: "The maximum size of the report comment. Default: 1000.",
2019-08-30 10:20:09 +00:00
suggestions: [
1_000
]
},
%{
key: :safe_dm_mentions,
label: "Safe DM mentions",
2019-08-30 10:20:09 +00:00
type: :boolean,
description:
"If enabled, only mentions at the beginning of a post will be used to address people in direct messages." <>
" This is to prevent accidental mentioning of people when talking about them (e.g. \"@admin please keep an eye on @bad_actor\")." <>
" Default: disabled"
2019-08-30 10:20:09 +00:00
},
%{
key: :healthcheck,
type: :boolean,
description: "If enabled, system data will be shown on `/api/v1/pleroma/healthcheck`"
2019-08-30 10:20:09 +00:00
},
%{
key: :remote_post_retention_days,
type: :integer,
description:
"The default amount of days to retain remote posts when pruning the database",
suggestions: [
90
]
},
%{
key: :user_bio_length,
type: :integer,
description: "A user bio maximum length. Default: 5000.",
2019-08-30 10:20:09 +00:00
suggestions: [
5_000
]
},
%{
key: :user_name_length,
type: :integer,
description: "A user name maximum length. Default: 100.",
2019-08-30 10:20:09 +00:00
suggestions: [
100
]
},
%{
key: :skip_thread_containment,
type: :boolean,
description: "Skip filtering out broken threads. Default: enabled."
2019-08-30 10:20:09 +00:00
},
%{
key: :limit_to_local_content,
2020-02-05 16:05:20 +00:00
type: {:dropdown, :atom},
2019-08-30 10:20:09 +00:00
description:
"Limit unauthenticated users to search for local statutes and users only. Default: `:unauthenticated`.",
2019-08-30 10:20:09 +00:00
suggestions: [
:unauthenticated,
:all,
false
]
},
%{
key: :max_account_fields,
type: :integer,
description: "The maximum number of custom fields in the user profile. Default: 10.",
2019-08-30 10:20:09 +00:00
suggestions: [
10
]
},
%{
key: :max_remote_account_fields,
type: :integer,
description:
"The maximum number of custom fields in the remote user profile. Default: 20.",
2019-08-30 10:20:09 +00:00
suggestions: [
20
]
},
%{
key: :account_field_name_length,
type: :integer,
description: "An account field name maximum length. Default: 512.",
2019-08-30 10:20:09 +00:00
suggestions: [
512
]
},
%{
key: :account_field_value_length,
type: :integer,