2021-05-20 18:55:37 +00:00
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 " ,
2020-08-25 09:44:51 +00:00
label : " Name " ,
2020-08-06 14:41:56 +00:00
type : :string ,
2020-08-25 09:44:51 +00:00
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 " ,
2020-08-25 09:44:51 +00:00
label : " Reference " ,
2020-08-06 14:41:56 +00:00
type : :string ,
2020-08-25 09:44:51 +00:00
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 " ,
2020-09-28 15:13:45 +00:00
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 "
2021-01-21 11:58:18 +00:00
} ,
%{
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 " ,
2020-07-12 15:23:33 +00:00
suggestions : { :list_behaviour_implementations , Pleroma.Uploaders.Uploader }
2019-08-30 10:20:09 +00:00
} ,
%{
key : :filters ,
type : { :list , :module } ,
2020-04-27 07:28:05 +00:00
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. " ,
2020-07-12 15:23:33 +00:00
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 :
2020-07-01 00:01:15 +00:00
" 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 ,
2020-07-01 00:01:15 +00:00
label : " Base URL " ,
2019-08-30 10:20:09 +00:00
type : :string ,
2021-02-08 17:45:50 +00:00
description :
2024-04-02 09:54:53 +00:00
" 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 : [
2024-04-02 09:54:53 +00:00
" 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 "
]
} ,
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 ,
2020-01-25 16:45:51 +00:00
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. " <>
2021-01-12 22:31:35 +00:00
" For example, when using CDN to S3 virtual host format, set \" \" . At this time, write CNAME to CDN in Upload base_url. "
2019-09-23 20:38:53 +00:00
} ,
%{
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 } ] ,
2020-06-26 06:03:07 +00:00
description :
" List of actions for the mogrify command. It's possible to add self-written settings as string. " <>
2020-08-03 22:45:18 +00:00
" 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 " <>
2020-01-25 16:45:51 +00:00
" 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
]
}
]
} ,
2024-04-18 18:05:29 +00:00
%{
group : :pleroma ,
key : Pleroma.Upload.Filter.Exiftool.StripMetadata ,
type : :group ,
description : " Strip specified metadata from image uploads " ,
children : [
%{
key : :purge ,
description : " Metadata fields or groups to strip " ,
type : { :list , :string } ,
suggestions : [ " all " , " CommonIFD0 " ]
} ,
%{
key : :preserve ,
description : " Metadata fields or groups to preserve (takes precedence over stripping) " ,
type : { :list , :string } ,
suggestions : [ " ColorSpaces " , " Orientation " ]
}
]
} ,
2019-08-30 10:20:09 +00:00
%{
group : :pleroma ,
key : Pleroma.Emails.Mailer ,
type : :group ,
description : " Mailer-related settings " ,
children : [
2021-02-06 18:34:32 +00:00
%{
key : :enabled ,
2021-02-06 19:18:48 +00:00
label : " Mailer Enabled " ,
2021-02-06 19:20:58 +00:00
type : :boolean
2021-02-06 18:34:32 +00:00
} ,
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 : [
2021-02-06 19:18:48 +00:00
Swoosh.Adapters.AmazonSES ,
Swoosh.Adapters.Dyn ,
Swoosh.Adapters.Gmail ,
2019-08-30 10:20:09 +00:00
Swoosh.Adapters.Mailgun ,
Swoosh.Adapters.Mailjet ,
2021-02-06 19:18:48 +00:00
Swoosh.Adapters.Mandrill ,
2019-08-30 10:20:09 +00:00
Swoosh.Adapters.Postmark ,
2021-02-06 19:18:48 +00:00
Swoosh.Adapters.SMTP ,
Swoosh.Adapters.Sendgrid ,
Swoosh.Adapters.Sendmail ,
2019-08-30 10:20:09 +00:00
Swoosh.Adapters.SocketLabs ,
2021-02-06 19:18:48 +00:00
Swoosh.Adapters.SparkPost
2019-08-30 10:20:09 +00:00
]
} ,
%{
group : { :subgroup , Swoosh.Adapters.SMTP } ,
key : :relay ,
type : :string ,
2021-02-06 17:55:01 +00:00
description : " Hostname or IP address " ,
suggestions : [ " smtp.example.com " ]
} ,
%{
group : { :subgroup , Swoosh.Adapters.SMTP } ,
key : :port ,
type : :integer ,
2021-02-06 19:18:48 +00:00
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 " ,
2021-02-06 17:55:01 +00:00
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 ,
2021-02-06 19:18:48 +00:00
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 " ,
2021-02-06 17:55:01 +00:00
type : { :dropdown , :atom } ,
2021-02-06 18:28:49 +00:00
description : " Explicit TLS (STARTTLS) enforcement mode " ,
2021-02-06 17:55:01 +00:00
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 " ,
2021-02-06 17:55:01 +00:00
type : { :dropdown , :atom } ,
2021-02-06 18:28:49 +00:00
description : " SMTP AUTH enforcement mode " ,
2021-02-06 17:55:01 +00:00
suggestions : [ :if_available , :always , :never ]
2019-08-30 10:20:09 +00:00
} ,
%{
group : { :subgroup , Swoosh.Adapters.SMTP } ,
key : :retries ,
type : :integer ,
2021-02-06 18:06:47 +00:00
description : " SMTP temporary (4xx) error retries " ,
suggestions : [ 1 ]
2019-08-30 10:20:09 +00:00
} ,
%{
group : { :subgroup , Swoosh.Adapters.Sendgrid } ,
key : :api_key ,
2021-02-06 19:18:48 +00:00
label : " SendGrid API Key " ,
2019-08-30 10:20:09 +00:00
type : :string ,
2021-02-06 19:18:48 +00:00
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 ,
2021-02-06 19:18:48 +00:00
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 ,
2021-02-06 19:18:48 +00:00
label : " Mandrill API Key " ,
2019-08-30 10:20:09 +00:00
type : :string ,
2021-02-06 19:18:48 +00:00
suggestions : [ " YOUR_API_KEY " ]
2019-08-30 10:20:09 +00:00
} ,
%{
group : { :subgroup , Swoosh.Adapters.Mailgun } ,
key : :api_key ,
2021-02-06 19:18:48 +00:00
label : " Mailgun API Key " ,
2019-08-30 10:20:09 +00:00
type : :string ,
2021-02-06 19:18:48 +00:00
suggestions : [ " YOUR_API_KEY " ]
2019-08-30 10:20:09 +00:00
} ,
%{
group : { :subgroup , Swoosh.Adapters.Mailgun } ,
key : :domain ,
type : :string ,
2021-02-06 19:18:48 +00:00
suggestions : [ " YOUR_DOMAIN_NAME " ]
2019-08-30 10:20:09 +00:00
} ,
%{
group : { :subgroup , Swoosh.Adapters.Mailjet } ,
key : :api_key ,
2021-02-06 19:18:48 +00:00
label : " MailJet Public API Key " ,
2019-08-30 10:20:09 +00:00
type : :string ,
2021-02-06 19:18:48 +00:00
suggestions : [ " MJ_APIKEY_PUBLIC " ]
2019-08-30 10:20:09 +00:00
} ,
%{
group : { :subgroup , Swoosh.Adapters.Mailjet } ,
key : :secret ,
2021-02-06 19:18:48 +00:00
label : " MailJet Private API Key " ,
2019-08-30 10:20:09 +00:00
type : :string ,
2021-02-06 19:18:48 +00:00
suggestions : [ " MJ_APIKEY_PRIVATE " ]
2019-08-30 10:20:09 +00:00
} ,
%{
group : { :subgroup , Swoosh.Adapters.Postmark } ,
key : :api_key ,
2021-02-06 19:18:48 +00:00
label : " Postmark API Key " ,
2019-08-30 10:20:09 +00:00
type : :string ,
2021-02-06 19:18:48 +00:00
suggestions : [ " X-Postmark-Server-Token " ]
2019-08-30 10:20:09 +00:00
} ,
%{
group : { :subgroup , Swoosh.Adapters.SparkPost } ,
key : :api_key ,
2021-02-06 19:18:48 +00:00
label : " SparkPost API key " ,
2019-08-30 10:20:09 +00:00
type : :string ,
2021-02-06 19:18:48 +00:00
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 } ,
2021-02-06 19:18:48 +00:00
key : :access_key ,
label : " AWS Access Key " ,
2019-09-29 08:17:38 +00:00
type : :string ,
2021-02-06 19:18:48 +00:00
suggestions : [ " AWS_ACCESS_KEY " ]
2019-08-30 10:20:09 +00:00
} ,
%{
group : { :subgroup , Swoosh.Adapters.AmazonSES } ,
2021-02-06 19:18:48 +00:00
key : :secret ,
label : " AWS Secret Key " ,
2019-08-30 10:20:09 +00:00
type : :string ,
2021-02-06 19:18:48 +00:00
suggestions : [ " AWS_SECRET_KEY " ]
2019-08-30 10:20:09 +00:00
} ,
%{
group : { :subgroup , Swoosh.Adapters.AmazonSES } ,
2021-02-06 19:18:48 +00:00
key : :region ,
label : " AWS Region " ,
2019-08-30 10:20:09 +00:00
type : :string ,
2021-02-06 19:18:48 +00:00
suggestions : [ " us-east-1 " , " us-east-2 " ]
2019-08-30 10:20:09 +00:00
} ,
%{
group : { :subgroup , Swoosh.Adapters.Dyn } ,
key : :api_key ,
2021-02-06 19:18:48 +00:00
label : " Dyn API Key " ,
2019-08-30 10:20:09 +00:00
type : :string ,
2021-02-06 19:18:48 +00:00
suggestions : [ " apikey " ]
2019-08-30 10:20:09 +00:00
} ,
%{
group : { :subgroup , Swoosh.Adapters.SocketLabs } ,
2021-02-06 19:18:48 +00:00
key : :api_key ,
label : " SocketLabs API Key " ,
2019-08-30 10:20:09 +00:00
type : :string ,
2021-02-06 19:18:48 +00:00
suggestions : [ " INJECTION_API_KEY " ]
2019-08-30 10:20:09 +00:00
} ,
%{
group : { :subgroup , Swoosh.Adapters.SocketLabs } ,
2021-02-06 19:18:48 +00:00
key : :server_id ,
label : " Server ID " ,
2019-08-30 10:20:09 +00:00
type : :string ,
2021-02-06 19:18:48 +00:00
suggestions : [ " SERVER_ID " ]
2019-08-30 10:20:09 +00:00
} ,
%{
group : { :subgroup , Swoosh.Adapters.Gmail } ,
key : :access_token ,
2021-02-06 19:18:48 +00:00
label : " GMail API Access Token " ,
2019-08-30 10:20:09 +00:00
type : :string ,
2021-02-06 19:18:48 +00:00
suggestions : [ " GMAIL_API_ACCESS_TOKEN " ]
2019-12-20 07:22:53 +00:00
}
]
} ,
2019-08-30 10:20:09 +00:00
%{
group : :pleroma ,
key : :uri_schemes ,
2020-07-01 00:01:15 +00:00
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
]
}
]
} ,
2021-02-07 19:24:12 +00:00
%{
group : :pleroma ,
2021-02-23 10:52:28 +00:00
key : :features ,
2021-02-07 19:24:12 +00:00
type : :group ,
2021-02-23 10:52:28 +00:00
description : " Customizable features " ,
2021-02-07 19:24:12 +00:00
children : [
%{
key : :improved_hashtag_timeline ,
2021-02-23 10:52:28 +00:00
type : { :dropdown , :atom } ,
2021-02-07 19:24:12 +00:00
description :
2021-02-23 10:52:28 +00:00
" 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 ]
2021-02-07 19:24:12 +00:00
}
]
} ,
2021-02-13 19:01:11 +00:00
%{
group : :pleroma ,
key : :populate_hashtags_table ,
type : :group ,
description : " `populate_hashtags_table` background migration settings " ,
children : [
2021-02-18 17:40:10 +00:00
%{
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. " ,
2021-02-18 17:40:10 +00:00
suggestions : [ 0.01 ]
} ,
2021-02-13 19:01:11 +00:00
%{
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 "
]
} ,
2022-08-25 16:11:21 +00:00
%{
key : :languages ,
type : { :list , :string } ,
description : " Languages the instance uses " ,
suggestions : [
" en " ,
" ja " ,
" fr "
]
} ,
2019-08-30 10:20:09 +00:00
%{
key : :email ,
2020-01-24 08:19:12 +00:00
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 ,
2020-01-24 08:19:12 +00:00
label : " Sender Email Address " ,
2019-08-30 10:20:09 +00:00
type : :string ,
2020-01-24 08:19:12 +00:00
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 :
2020-07-01 00:01:15 +00:00
" 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 ,
2020-07-01 00:01:15 +00:00
description : " Require users to confirm their emails before signing in "
2019-08-30 10:20:09 +00:00
} ,
2020-07-13 01:14:57 +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 ,
2020-07-01 00:01:15 +00:00
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 :
2020-02-15 17:41:38 +00:00
" Max. depth of reply-to and reply activities fetching on incoming federation, to prevent out-of-memory situations while " <>
2020-01-25 16:45:51 +00:00
" 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 :
2020-07-01 00:01:15 +00:00
" 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 :
2021-06-02 16:26:26 +00:00
" 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 :
2022-12-03 23:17:43 +00:00
" 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. " <>
2020-07-07 17:44:16 +00:00
" Note: when setting to `false`, please also check `:restrict_unauthenticated` setting. "
2019-08-30 10:20:09 +00:00
} ,
%{
key : :quarantined_instances ,
2020-10-03 10:08:09 +00:00
type : { :list , :tuple } ,
2021-01-17 13:32:42 +00:00
key_placeholder : " instance " ,
value_placeholder : " reason " ,
2019-08-30 10:20:09 +00:00
description :
2022-08-02 14:19:24 +00:00
" (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 : [
2020-10-03 10:08:09 +00:00
{ " 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 " ,
2022-12-07 15:39:19 +00:00
" text/bbcode " ,
" text/x.misskeymarkdown "
2019-08-30 10:20:09 +00:00
]
} ,
%{
key : :extended_nickname_format ,
type : :boolean ,
description :
2020-02-11 21:21:36 +00:00
" Enable to use extended local nicknames format (allows underscores/dashes). " <>
2020-01-25 16:45:51 +00:00
" 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 ,
2020-01-25 16:45:51 +00:00
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 :
2020-10-16 17:41:44 +00:00
" Set to nicknames of (local) users that every new user should automatically follow "
2019-08-30 10:20:09 +00:00
} ,
2020-10-16 17:32:05 +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 "
2020-10-16 17:32:05 +00:00
} ,
2019-08-30 10:20:09 +00:00
%{
2020-02-11 21:39:19 +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 ,
2020-01-25 16:45:51 +00:00
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 ,
2020-07-01 00:01:15 +00:00
label : " Safe DM mentions " ,
2019-08-30 10:20:09 +00:00
type : :boolean ,
description :
2020-02-11 21:21:36 +00:00
" If enabled, only mentions at the beginning of a post will be used to address people in direct messages. " <>
2020-01-25 16:45:51 +00:00
" This is to prevent accidental mentioning of people when talking about them (e.g. \" @admin please keep an eye on @bad_actor \" ). " <>
2020-02-11 21:21:36 +00:00
" Default: disabled "
2019-08-30 10:20:09 +00:00
} ,
%{
key : :healthcheck ,
type : :boolean ,
2023-02-18 13:59:46 +00:00
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 ,
2020-01-25 16:45:51 +00:00
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 ,
2020-01-25 16:45:51 +00:00
description : " A user name maximum length. Default: 100. " ,
2019-08-30 10:20:09 +00:00
suggestions : [
100
]
} ,
%{
key : :skip_thread_containment ,
type : :boolean ,
2020-07-01 00:01:15 +00:00
description : " Skip filtering out broken threads. Default: enabled. "