total rebase
[anni] / config / description.exs
1 import Config
2
3 websocket_config = [
4   path: "/websocket",
5   serializer: [
6     {Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
7     {Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}
8   ],
9   timeout: 60_000,
10   transport_log: false,
11   compress: false
12 ]
13
14 installed_frontend_options = [
15   %{
16     key: "name",
17     label: "Name",
18     type: :string,
19     description:
20       "Name of the installed frontend. Valid config must include both `Name` and `Reference` values."
21   },
22   %{
23     key: "ref",
24     label: "Reference",
25     type: :string,
26     description:
27       "Reference of the installed frontend to be used. Valid config must include both `Name` and `Reference` values."
28   }
29 ]
30
31 frontend_options = [
32   %{
33     key: "name",
34     label: "Name",
35     type: :string,
36     description: "Name of the frontend."
37   },
38   %{
39     key: "ref",
40     label: "Reference",
41     type: :string,
42     description: "Reference of the frontend to be used."
43   },
44   %{
45     key: "git",
46     label: "Git Repository URL",
47     type: :string,
48     description: "URL of the git repository of the frontend"
49   },
50   %{
51     key: "build_url",
52     label: "Build URL",
53     type: :string,
54     description:
55       "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`.",
56     example: "https://some.url/builds/${ref}.zip"
57   },
58   %{
59     key: "build_dir",
60     label: "Build directory",
61     type: :string,
62     description: "The directory inside the zip file "
63   },
64   %{
65     key: "custom-http-headers",
66     label: "Custom HTTP headers",
67     type: {:list, :string},
68     description: "The custom HTTP headers for the frontend"
69   }
70 ]
71
72 config :pleroma, :config_description, [
73   %{
74     group: :pleroma,
75     key: Pleroma.Upload,
76     type: :group,
77     description: "Upload general settings",
78     children: [
79       %{
80         key: :uploader,
81         type: :module,
82         description: "Module which will be used for uploads",
83         suggestions: {:list_behaviour_implementations, Pleroma.Uploaders.Uploader}
84       },
85       %{
86         key: :filters,
87         type: {:list, :module},
88         description:
89           "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.",
90         suggestions: {:list_behaviour_implementations, Pleroma.Upload.Filter}
91       },
92       %{
93         key: :link_name,
94         type: :boolean,
95         description:
96           "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`."
97       },
98       %{
99         key: :base_url,
100         label: "Base URL",
101         type: :string,
102         description:
103           "Base URL for the uploads. Required if you use a CDN or host attachments under a different domain.",
104         suggestions: [
105           "https://cdn-host.com"
106         ]
107       },
108       %{
109         key: :proxy_remote,
110         type: :boolean,
111         description: """
112         Proxy requests to the remote uploader.\n
113         Useful if media upload endpoint is not internet accessible.
114         """
115       },
116       %{
117         key: :filename_display_max_length,
118         type: :integer,
119         description: "Set max length of a filename to display. 0 = no limit. Default: 30"
120       }
121     ]
122   },
123   %{
124     group: :pleroma,
125     key: Pleroma.Uploaders.Local,
126     type: :group,
127     description: "Local uploader-related settings",
128     children: [
129       %{
130         key: :uploads,
131         type: :string,
132         description: "Path where user's uploads will be saved",
133         suggestions: [
134           "uploads"
135         ]
136       }
137     ]
138   },
139   %{
140     group: :pleroma,
141     key: Pleroma.Uploaders.S3,
142     type: :group,
143     description: "S3 uploader-related settings",
144     children: [
145       %{
146         key: :bucket,
147         type: :string,
148         description: "S3 bucket",
149         suggestions: [
150           "bucket"
151         ]
152       },
153       %{
154         key: :bucket_namespace,
155         type: :string,
156         description: "S3 bucket namespace",
157         suggestions: ["pleroma"]
158       },
159       %{
160         key: :truncated_namespace,
161         type: :string,
162         description:
163           "If you use S3 compatible service such as Digital Ocean Spaces or CDN, set folder name or \"\" etc." <>
164             " For example, when using CDN to S3 virtual host format, set \"\". At this time, write CNAME to CDN in Upload base_url."
165       },
166       %{
167         key: :streaming_enabled,
168         type: :boolean,
169         description:
170           "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."
171       }
172     ]
173   },
174   %{
175     group: :pleroma,
176     key: Pleroma.Upload.Filter.Mogrify,
177     type: :group,
178     description: "Uploads mogrify filter settings",
179     children: [
180       %{
181         key: :args,
182         type: [:string, {:list, :string}, {:list, :tuple}],
183         description:
184           "List of actions for the mogrify command. It's possible to add self-written settings as string. " <>
185             "For example `auto-orient, strip, {\"resize\", \"3840x1080>\"}` value will be parsed into valid list of the settings.",
186         suggestions: [
187           "strip",
188           "auto-orient",
189           {"implode", "1"}
190         ]
191       }
192     ]
193   },
194   %{
195     group: :pleroma,
196     key: Pleroma.Upload.Filter.AnonymizeFilename,
197     type: :group,
198     description: "Filter replaces the filename of the upload",
199     children: [
200       %{
201         key: :text,
202         type: :string,
203         description:
204           "Text to replace filenames in links. If no setting, {random}.extension will be used. You can get the original" <>
205             " filename extension by using {extension}, for example custom-file-name.{extension}.",
206         suggestions: [
207           "custom-file-name.{extension}"
208         ]
209       }
210     ]
211   },
212   %{
213     group: :pleroma,
214     key: Pleroma.Emails.Mailer,
215     type: :group,
216     description: "Mailer-related settings",
217     children: [
218       %{
219         key: :enabled,
220         label: "Mailer Enabled",
221         type: :boolean
222       },
223       %{
224         key: :adapter,
225         type: :module,
226         description:
227           "One of the mail adapters listed in [Swoosh documentation](https://hexdocs.pm/swoosh/Swoosh.html#module-adapters)",
228         suggestions: [
229           Swoosh.Adapters.AmazonSES,
230           Swoosh.Adapters.Dyn,
231           Swoosh.Adapters.Gmail,
232           Swoosh.Adapters.Mailgun,
233           Swoosh.Adapters.Mailjet,
234           Swoosh.Adapters.Mandrill,
235           Swoosh.Adapters.Postmark,
236           Swoosh.Adapters.SMTP,
237           Swoosh.Adapters.Sendgrid,
238           Swoosh.Adapters.Sendmail,
239           Swoosh.Adapters.SocketLabs,
240           Swoosh.Adapters.SparkPost
241         ]
242       },
243       %{
244         group: {:subgroup, Swoosh.Adapters.SMTP},
245         key: :relay,
246         type: :string,
247         description: "Hostname or IP address",
248         suggestions: ["smtp.example.com"]
249       },
250       %{
251         group: {:subgroup, Swoosh.Adapters.SMTP},
252         key: :port,
253         type: :integer,
254         description: "SMTP port",
255         suggestions: ["1025"]
256       },
257       %{
258         group: {:subgroup, Swoosh.Adapters.SMTP},
259         key: :username,
260         type: :string,
261         description: "SMTP AUTH username",
262         suggestions: ["user@example.com"]
263       },
264       %{
265         group: {:subgroup, Swoosh.Adapters.SMTP},
266         key: :password,
267         type: :string,
268         description: "SMTP AUTH password",
269         suggestions: ["password"]
270       },
271       %{
272         group: {:subgroup, Swoosh.Adapters.SMTP},
273         key: :ssl,
274         label: "Use SSL",
275         type: :boolean,
276         description: "Use Implicit SSL/TLS. e.g. port 465"
277       },
278       %{
279         group: {:subgroup, Swoosh.Adapters.SMTP},
280         key: :tls,
281         label: "STARTTLS Mode",
282         type: {:dropdown, :atom},
283         description: "Explicit TLS (STARTTLS) enforcement mode",
284         suggestions: [:if_available, :always, :never]
285       },
286       %{
287         group: {:subgroup, Swoosh.Adapters.SMTP},
288         key: :auth,
289         label: "AUTH Mode",
290         type: {:dropdown, :atom},
291         description: "SMTP AUTH enforcement mode",
292         suggestions: [:if_available, :always, :never]
293       },
294       %{
295         group: {:subgroup, Swoosh.Adapters.SMTP},
296         key: :retries,
297         type: :integer,
298         description: "SMTP temporary (4xx) error retries",
299         suggestions: [1]
300       },
301       %{
302         group: {:subgroup, Swoosh.Adapters.Sendgrid},
303         key: :api_key,
304         label: "SendGrid API Key",
305         type: :string,
306         suggestions: ["YOUR_API_KEY"]
307       },
308       %{
309         group: {:subgroup, Swoosh.Adapters.Sendmail},
310         key: :cmd_path,
311         type: :string,
312         suggestions: ["/usr/bin/sendmail"]
313       },
314       %{
315         group: {:subgroup, Swoosh.Adapters.Sendmail},
316         key: :cmd_args,
317         type: :string,
318         suggestions: ["-N delay,failure,success"]
319       },
320       %{
321         group: {:subgroup, Swoosh.Adapters.Sendmail},
322         key: :qmail,
323         label: "Qmail compat mode",
324         type: :boolean
325       },
326       %{
327         group: {:subgroup, Swoosh.Adapters.Mandrill},
328         key: :api_key,
329         label: "Mandrill API Key",
330         type: :string,
331         suggestions: ["YOUR_API_KEY"]
332       },
333       %{
334         group: {:subgroup, Swoosh.Adapters.Mailgun},
335         key: :api_key,
336         label: "Mailgun API Key",
337         type: :string,
338         suggestions: ["YOUR_API_KEY"]
339       },
340       %{
341         group: {:subgroup, Swoosh.Adapters.Mailgun},
342         key: :domain,
343         type: :string,
344         suggestions: ["YOUR_DOMAIN_NAME"]
345       },
346       %{
347         group: {:subgroup, Swoosh.Adapters.Mailjet},
348         key: :api_key,
349         label: "MailJet Public API Key",
350         type: :string,
351         suggestions: ["MJ_APIKEY_PUBLIC"]
352       },
353       %{
354         group: {:subgroup, Swoosh.Adapters.Mailjet},
355         key: :secret,
356         label: "MailJet Private API Key",
357         type: :string,
358         suggestions: ["MJ_APIKEY_PRIVATE"]
359       },
360       %{
361         group: {:subgroup, Swoosh.Adapters.Postmark},
362         key: :api_key,
363         label: "Postmark API Key",
364         type: :string,
365         suggestions: ["X-Postmark-Server-Token"]
366       },
367       %{
368         group: {:subgroup, Swoosh.Adapters.SparkPost},
369         key: :api_key,
370         label: "SparkPost API key",
371         type: :string,
372         suggestions: ["YOUR_API_KEY"]
373       },
374       %{
375         group: {:subgroup, Swoosh.Adapters.SparkPost},
376         key: :endpoint,
377         type: :string,
378         suggestions: ["https://api.sparkpost.com/api/v1"]
379       },
380       %{
381         group: {:subgroup, Swoosh.Adapters.AmazonSES},
382         key: :access_key,
383         label: "AWS Access Key",
384         type: :string,
385         suggestions: ["AWS_ACCESS_KEY"]
386       },
387       %{
388         group: {:subgroup, Swoosh.Adapters.AmazonSES},
389         key: :secret,
390         label: "AWS Secret Key",
391         type: :string,
392         suggestions: ["AWS_SECRET_KEY"]
393       },
394       %{
395         group: {:subgroup, Swoosh.Adapters.AmazonSES},
396         key: :region,
397         label: "AWS Region",
398         type: :string,
399         suggestions: ["us-east-1", "us-east-2"]
400       },
401       %{
402         group: {:subgroup, Swoosh.Adapters.Dyn},
403         key: :api_key,
404         label: "Dyn API Key",
405         type: :string,
406         suggestions: ["apikey"]
407       },
408       %{
409         group: {:subgroup, Swoosh.Adapters.SocketLabs},
410         key: :api_key,
411         label: "SocketLabs API Key",
412         type: :string,
413         suggestions: ["INJECTION_API_KEY"]
414       },
415       %{
416         group: {:subgroup, Swoosh.Adapters.SocketLabs},
417         key: :server_id,
418         label: "Server ID",
419         type: :string,
420         suggestions: ["SERVER_ID"]
421       },
422       %{
423         group: {:subgroup, Swoosh.Adapters.Gmail},
424         key: :access_token,
425         label: "GMail API Access Token",
426         type: :string,
427         suggestions: ["GMAIL_API_ACCESS_TOKEN"]
428       }
429     ]
430   },
431   %{
432     group: :pleroma,
433     key: :uri_schemes,
434     label: "URI Schemes",
435     type: :group,
436     description: "URI schemes related settings",
437     children: [
438       %{
439         key: :valid_schemes,
440         type: {:list, :string},
441         description: "List of the scheme part that is considered valid to be an URL",
442         suggestions: [
443           "https",
444           "http",
445           "dat",
446           "dweb",
447           "gopher",
448           "hyper",
449           "ipfs",
450           "ipns",
451           "irc",
452           "ircs",
453           "magnet",
454           "mailto",
455           "mumble",
456           "ssb",
457           "xmpp"
458         ]
459       }
460     ]
461   },
462   %{
463     group: :pleroma,
464     key: :features,
465     type: :group,
466     description: "Customizable features",
467     children: [
468       %{
469         key: :improved_hashtag_timeline,
470         type: {:dropdown, :atom},
471         description:
472           "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).",
473         suggestions: [:auto, :enabled, :disabled]
474       }
475     ]
476   },
477   %{
478     group: :pleroma,
479     key: :populate_hashtags_table,
480     type: :group,
481     description: "`populate_hashtags_table` background migration settings",
482     children: [
483       %{
484         key: :fault_rate_allowance,
485         type: :float,
486         description:
487           "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.",
488         suggestions: [0.01]
489       },
490       %{
491         key: :sleep_interval_ms,
492         type: :integer,
493         description:
494           "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)."
495       }
496     ]
497   },
498   %{
499     group: :pleroma,
500     key: :delete_context_objects,
501     type: :group,
502     description: "`delete_context_objects` background migration settings",
503     children: [
504       %{
505         key: :fault_rate_allowance,
506         type: :float,
507         description:
508           "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 context object deletion failed for all records.",
509         suggestions: [0.01]
510       },
511       %{
512         key: :sleep_interval_ms,
513         type: :integer,
514         description:
515           "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)."
516       }
517     ]
518   },
519   %{
520     group: :pleroma,
521     key: :instance,
522     type: :group,
523     description: "Instance-related settings",
524     children: [
525       %{
526         key: :name,
527         type: :string,
528         description: "Name of the instance",
529         suggestions: [
530           "Pleroma"
531         ]
532       },
533       %{
534         key: :email,
535         label: "Admin Email Address",
536         type: :string,
537         description: "Email used to reach an Administrator/Moderator of the instance",
538         suggestions: [
539           "email@example.com"
540         ]
541       },
542       %{
543         key: :notify_email,
544         label: "Sender Email Address",
545         type: :string,
546         description: "Envelope FROM address for mail sent via Pleroma",
547         suggestions: [
548           "notify@example.com"
549         ]
550       },
551       %{
552         key: :description,
553         type: :string,
554         description:
555           "The instance's description. It can be seen in nodeinfo and `/api/v1/instance`",
556         suggestions: [
557           "Very cool instance"
558         ]
559       },
560       %{
561         key: :short_description,
562         type: :string,
563         description:
564           "Shorter version of instance description. It can be seen on `/api/v1/instance`",
565         suggestions: [
566           "Cool instance"
567         ]
568       },
569       %{
570         key: :status_page,
571         type: :string,
572         description: "A page where people can see the status of the server during an outage",
573         suggestions: [
574           "https://status.pleroma.example.org"
575         ]
576       },
577       %{
578         key: :contact_username,
579         type: :string,
580         description: "Instance owner username",
581         suggestions: ["admin"]
582       },
583       %{
584         key: :limit,
585         type: :integer,
586         description: "Posts character limit (CW/Subject included in the counter)",
587         suggestions: [
588           5_000
589         ]
590       },
591       %{
592         key: :remote_limit,
593         type: :integer,
594         description: "Hard character limit beyond which remote posts will be dropped",
595         suggestions: [
596           100_000
597         ]
598       },
599       %{
600         key: :max_media_attachments,
601         type: :integer,
602         description: "Maximum number of post media attachments",
603         suggestions: [
604           1_000_000
605         ]
606       },
607       %{
608         key: :upload_limit,
609         type: :integer,
610         description: "File size limit of uploads (except for avatar, background, banner)",
611         suggestions: [
612           16_000_000
613         ]
614       },
615       %{
616         key: :avatar_upload_limit,
617         type: :integer,
618         description: "File size limit of user's profile avatars",
619         suggestions: [
620           2_000_000
621         ]
622       },
623       %{
624         key: :background_upload_limit,
625         type: :integer,
626         description: "File size limit of user's profile backgrounds",
627         suggestions: [
628           4_000_000
629         ]
630       },
631       %{
632         key: :banner_upload_limit,
633         type: :integer,
634         description: "File size limit of user's profile banners",
635         suggestions: [
636           4_000_000
637         ]
638       },
639       %{
640         key: :poll_limits,
641         type: :map,
642         description: "A map with poll limits for local polls",
643         suggestions: [
644           %{
645             max_options: 20,
646             max_option_chars: 200,
647             min_expiration: 0,
648             max_expiration: 31_536_000
649           }
650         ],
651         children: [
652           %{
653             key: :max_options,
654             type: :integer,
655             description: "Maximum number of options",
656             suggestions: [20]
657           },
658           %{
659             key: :max_option_chars,
660             type: :integer,
661             description: "Maximum number of characters per option",
662             suggestions: [200]
663           },
664           %{
665             key: :min_expiration,
666             type: :integer,
667             description: "Minimum expiration time (in seconds)",
668             suggestions: [0]
669           },
670           %{
671             key: :max_expiration,
672             type: :integer,
673             description: "Maximum expiration time (in seconds)",
674             suggestions: [3600]
675           }
676         ]
677       },
678       %{
679         key: :registrations_open,
680         type: :boolean,
681         description:
682           "Enable registrations for anyone. Invitations require this setting to be disabled."
683       },
684       %{
685         key: :invites_enabled,
686         type: :boolean,
687         description:
688           "Enable user invitations for admins (depends on `registrations_open` being disabled)"
689       },
690       %{
691         key: :account_activation_required,
692         type: :boolean,
693         description: "Require users to confirm their emails before signing in"
694       },
695       %{
696         key: :account_approval_required,
697         type: :boolean,
698         description: "Require users to be manually approved by an admin before signing in"
699       },
700       %{
701         key: :federating,
702         type: :boolean,
703         description: "Enable federation with other instances"
704       },
705       %{
706         key: :federation_incoming_replies_max_depth,
707         label: "Fed. incoming replies max depth",
708         type: :integer,
709         description:
710           "Max. depth of reply-to and reply activities fetching on incoming federation, to prevent out-of-memory situations while" <>
711             " 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.",
712         suggestions: [
713           100
714         ]
715       },
716       %{
717         key: :federation_reachability_timeout_days,
718         label: "Fed. reachability timeout days",
719         type: :integer,
720         description:
721           "Timeout (in days) of each external federation target being unreachable prior to pausing federating to it",
722         suggestions: [
723           7
724         ]
725       },
726       %{
727         key: :allow_relay,
728         type: :boolean,
729         description:
730           "Permits remote instances to subscribe to all public posts of your instance. (Important!) This may increase the visibility of your instance."
731       },
732       %{
733         key: :public,
734         type: :boolean,
735         description:
736           "Makes the client API in authenticated mode-only except for user-profiles." <>
737             " Useful for disabling the Local Timeline and The Whole Known Network. " <>
738             " Note: when setting to `false`, please also check `:restrict_unauthenticated` setting."
739       },
740       %{
741         key: :quarantined_instances,
742         type: {:list, :tuple},
743         key_placeholder: "instance",
744         value_placeholder: "reason",
745         description:
746           "List of ActivityPub instances where private (DMs, followers-only) activities will not be sent and the reason for doing so",
747         suggestions: [
748           {"quarantined.com", "Reason"},
749           {"*.quarantined.com", "Reason"}
750         ]
751       },
752       %{
753         key: :static_dir,
754         type: :string,
755         description: "Instance static directory",
756         suggestions: [
757           "instance/static/"
758         ]
759       },
760       %{
761         key: :allowed_post_formats,
762         type: {:list, :string},
763         description: "MIME-type list of formats allowed to be posted (transformed into HTML)",
764         suggestions: [
765           "text/plain",
766           "text/html",
767           "text/markdown",
768           "text/bbcode"
769         ]
770       },
771       %{
772         key: :extended_nickname_format,
773         type: :boolean,
774         description:
775           "Enable to use extended local nicknames format (allows underscores/dashes)." <>
776             " This will break federation with older software for theses nicknames."
777       },
778       %{
779         key: :cleanup_attachments,
780         type: :boolean,
781         description: """
782         Enable to remove associated attachments when status is removed.
783         This will not affect duplicates and attachments without status.
784         Enabling this will increase load to database when deleting statuses on larger instances.
785         """
786       },
787       %{
788         key: :max_pinned_statuses,
789         type: :integer,
790         description: "The maximum number of pinned statuses. 0 will disable the feature.",
791         suggestions: [
792           0,
793           1,
794           3
795         ]
796       },
797       %{
798         key: :max_endorsed_users,
799         type: :integer,
800         description: "The maximum number of recommended accounts. 0 will disable the feature.",
801         suggestions: [
802           0,
803           1,
804           3
805         ]
806       },
807       %{
808         key: :autofollowed_nicknames,
809         type: {:list, :string},
810         description:
811           "Set to nicknames of (local) users that every new user should automatically follow"
812       },
813       %{
814         key: :autofollowing_nicknames,
815         type: {:list, :string},
816         description:
817           "Set to nicknames of (local) users that automatically follows every newly registered user"
818       },
819       %{
820         key: :attachment_links,
821         type: :boolean,
822         description: "Enable to automatically add attachment link text to statuses"
823       },
824       %{
825         key: :max_report_comment_size,
826         type: :integer,
827         description: "The maximum size of the report comment. Default: 1000.",
828         suggestions: [
829           1_000
830         ]
831       },
832       %{
833         key: :report_strip_status,
834         label: "Report strip status",
835         type: :boolean,
836         description:
837           "Strip associated statuses in reports to ids when closed/resolved, otherwise keep a copy"
838       },
839       %{
840         key: :safe_dm_mentions,
841         label: "Safe DM mentions",
842         type: :boolean,
843         description:
844           "If enabled, only mentions at the beginning of a post will be used to address people in direct messages." <>
845             " This is to prevent accidental mentioning of people when talking about them (e.g. \"@admin please keep an eye on @bad_actor\")." <>
846             " Default: disabled"
847       },
848       %{
849         key: :healthcheck,
850         type: :boolean,
851         description: "If enabled, system data will be shown on `/api/pleroma/healthcheck`"
852       },
853       %{
854         key: :remote_post_retention_days,
855         type: :integer,
856         description:
857           "The default amount of days to retain remote posts when pruning the database",
858         suggestions: [
859           90
860         ]
861       },
862       %{
863         key: :user_bio_length,
864         type: :integer,
865         description: "A user bio maximum length. Default: 5000.",
866         suggestions: [
867           5_000
868         ]
869       },
870       %{
871         key: :user_name_length,
872         type: :integer,
873         description: "A user name maximum length. Default: 100.",
874         suggestions: [
875           100
876         ]
877       },
878       %{
879         key: :skip_thread_containment,
880         type: :boolean,
881         description: "Skip filtering out broken threads. Default: enabled."
882       },
883       %{
884         key: :limit_to_local_content,
885         type: {:dropdown, :atom},
886         description:
887           "Limit unauthenticated users to search for local statutes and users only. Default: `:unauthenticated`.",
888         suggestions: [
889           :unauthenticated,
890           :all,
891           false
892         ]
893       },
894       %{
895         key: :max_account_fields,
896         type: :integer,
897         description: "The maximum number of custom fields in the user profile. Default: 10.",
898         suggestions: [
899           10
900         ]
901       },
902       %{
903         key: :max_remote_account_fields,
904         type: :integer,
905         description:
906           "The maximum number of custom fields in the remote user profile. Default: 20.",
907         suggestions: [
908           20
909         ]
910       },
911       %{
912         key: :account_field_name_length,
913         type: :integer,
914         description: "An account field name maximum length. Default: 512.",
915         suggestions: [
916           512
917         ]
918       },
919       %{
920         key: :account_field_value_length,
921         type: :integer,
922         description: "An account field value maximum length. Default: 2048.",
923         suggestions: [
924           2048
925         ]
926       },
927       %{
928         key: :registration_reason_length,
929         type: :integer,
930         description: "Maximum registration reason length. Default: 500.",
931         suggestions: [
932           500
933         ]
934       },
935       %{
936         key: :external_user_synchronization,
937         type: :boolean,
938         description: "Enabling following/followers counters synchronization for external users"
939       },
940       %{
941         key: :multi_factor_authentication,
942         type: :keyword,
943         description: "Multi-factor authentication settings",
944         suggestions: [
945           [
946             totp: [digits: 6, period: 30],
947             backup_codes: [number: 5, length: 16]
948           ]
949         ],
950         children: [
951           %{
952             key: :totp,
953             label: "TOTP settings",
954             type: :keyword,
955             description: "TOTP settings",
956             suggestions: [digits: 6, period: 30],
957             children: [
958               %{
959                 key: :digits,
960                 type: :integer,
961                 suggestions: [6],
962                 description:
963                   "Determines the length of a one-time pass-code, in characters. Defaults to 6 characters."
964               },
965               %{
966                 key: :period,
967                 type: :integer,
968                 suggestions: [30],
969                 description:
970                   "A period for which the TOTP code will be valid, in seconds. Defaults to 30 seconds."
971               }
972             ]
973           },
974           %{
975             key: :backup_codes,
976             type: :keyword,
977             description: "MFA backup codes settings",
978             suggestions: [number: 5, length: 16],
979             children: [
980               %{
981                 key: :number,
982                 type: :integer,
983                 suggestions: [5],
984                 description: "Number of backup codes to generate."
985               },
986               %{
987                 key: :length,
988                 type: :integer,
989                 suggestions: [16],
990                 description:
991                   "Determines the length of backup one-time pass-codes, in characters. Defaults to 16 characters."
992               }
993             ]
994           }
995         ]
996       },
997       %{
998         key: :instance_thumbnail,
999         type: {:string, :image},
1000         description:
1001           "The instance thumbnail can be any image that represents your instance and is used by some apps or services when they display information about your instance.",
1002         suggestions: ["/instance/thumbnail.jpeg"]
1003       },
1004       %{
1005         key: :favicon,
1006         type: {:string, :image},
1007         description: "Favicon of the instance",
1008         suggestions: ["/favicon.png"]
1009       },
1010       %{
1011         key: :show_reactions,
1012         type: :boolean,
1013         description: "Let favourites and emoji reactions be viewed through the API."
1014       },
1015       %{
1016         key: :profile_directory,
1017         type: :boolean,
1018         description: "Enable profile directory."
1019       },
1020       %{
1021         key: :admin_privileges,
1022         type: {:list, :atom},
1023         suggestions: [
1024           :users_read,
1025           :users_manage_invites,
1026           :users_manage_activation_state,
1027           :users_manage_tags,
1028           :users_manage_credentials,
1029           :users_delete,
1030           :messages_read,
1031           :messages_delete,
1032           :instances_delete,
1033           :reports_manage_reports,
1034           :moderation_log_read,
1035           :announcements_manage_announcements,
1036           :emoji_manage_emoji,
1037           :statistics_read
1038         ],
1039         description:
1040           "What extra privileges to allow admins (e.g. updating user credentials, get password reset token, delete users, index and read private statuses and chats)"
1041       },
1042       %{
1043         key: :moderator_privileges,
1044         type: {:list, :atom},
1045         suggestions: [
1046           :users_read,
1047           :users_manage_invites,
1048           :users_manage_activation_state,
1049           :users_manage_tags,
1050           :users_manage_credentials,
1051           :users_delete,
1052           :messages_read,
1053           :messages_delete,
1054           :instances_delete,
1055           :reports_manage_reports,
1056           :moderation_log_read,
1057           :announcements_manage_announcements,
1058           :emoji_manage_emoji,
1059           :statistics_read
1060         ],
1061         description:
1062           "What extra privileges to allow moderators (e.g. updating user credentials, get password reset token, delete users, index and read private statuses and chats)"
1063       },
1064       %{
1065         key: :birthday_required,
1066         type: :boolean,
1067         description: "Require users to enter their birthday."
1068       },
1069       %{
1070         key: :birthday_min_age,
1071         type: :integer,
1072         description:
1073           "Minimum required age (in days) for users to create account. Only used if birthday is required.",
1074         suggestions: [6570]
1075       },
1076       %{
1077         key: :languages,
1078         type: {:list, :string},
1079         description:
1080           "Languages to be exposed in /api/v1/instance. Should be in the format of BCP47 language codes.",
1081         suggestions: [
1082           "en"
1083         ]
1084       }
1085     ]
1086   },
1087   %{
1088     group: :pleroma,
1089     key: :welcome,
1090     type: :group,
1091     description: "Welcome messages settings",
1092     children: [
1093       %{
1094         key: :direct_message,
1095         type: :keyword,
1096         descpiption: "Direct message settings",
1097         children: [
1098           %{
1099             key: :enabled,
1100             type: :boolean,
1101             description: "Enables sending a direct message to newly registered users"
1102           },
1103           %{
1104             key: :message,
1105             type: :string,
1106             description: "A message that will be sent to newly registered users",
1107             suggestions: [
1108               "Hi, @username! Welcome on board!"
1109             ]
1110           },
1111           %{
1112             key: :sender_nickname,
1113             type: :string,
1114             description: "The nickname of the local user that sends a welcome message",
1115             suggestions: [
1116               "lain"
1117             ]
1118           }
1119         ]
1120       },
1121       %{
1122         key: :chat_message,
1123         type: :keyword,
1124         descpiption: "Chat message settings",
1125         children: [
1126           %{
1127             key: :enabled,
1128             type: :boolean,
1129             description: "Enables sending a chat message to newly registered users"
1130           },
1131           %{
1132             key: :message,
1133             type: :string,
1134             description:
1135               "A message that will be sent to newly registered users as a chat message",
1136             suggestions: [
1137               "Hello, welcome on board!"
1138             ]
1139           },
1140           %{
1141             key: :sender_nickname,
1142             type: :string,
1143             description: "The nickname of the local user that sends a welcome chat message",
1144             suggestions: [
1145               "lain"
1146             ]
1147           }
1148         ]
1149       },
1150       %{
1151         key: :email,
1152         type: :keyword,
1153         descpiption: "Email message settings",
1154         children: [
1155           %{
1156             key: :enabled,
1157             type: :boolean,
1158             description: "Enables sending an email to newly registered users"
1159           },
1160           %{
1161             key: :sender,
1162             type: [:string, :tuple],
1163             description:
1164               "Email address and/or nickname that will be used to send the welcome email.",
1165             suggestions: [
1166               {"Pleroma App", "welcome@pleroma.app"}
1167             ]
1168           },
1169           %{
1170             key: :subject,
1171             type: :string,
1172             description:
1173               "Subject of the welcome email. EEX template with user and instance_name variables can be used.",
1174             suggestions: ["Welcome to <%= instance_name%>"]
1175           },
1176           %{
1177             key: :html,
1178             type: :string,
1179             description:
1180               "HTML content of the welcome email. EEX template with user and instance_name variables can be used.",
1181             suggestions: ["<h1>Hello <%= user.name%>. Welcome to <%= instance_name%></h1>"]
1182           },
1183           %{
1184             key: :text,
1185             type: :string,
1186             description:
1187               "Text content of the welcome email. EEX template with user and instance_name variables can be used.",
1188             suggestions: ["Hello <%= user.name%>. \n Welcome to <%= instance_name%>\n"]
1189           }
1190         ]
1191       }
1192     ]
1193   },
1194   %{
1195     group: :logger,
1196     type: :group,
1197     description: "Logger-related settings",
1198     children: [
1199       %{
1200         key: :backends,
1201         type: [:atom, :tuple, :module],
1202         description:
1203           "Where logs will be sent, :console - send logs to stdout, { ExSyslogger, :ex_syslogger } - to syslog, Quack.Logger - to Slack.",
1204         suggestions: [:console, {ExSyslogger, :ex_syslogger}]
1205       }
1206     ]
1207   },
1208   %{
1209     group: :logger,
1210     type: :group,
1211     key: :ex_syslogger,
1212     label: "ExSyslogger",
1213     description: "ExSyslogger-related settings",
1214     children: [
1215       %{
1216         key: :level,
1217         type: {:dropdown, :atom},
1218         description: "Log level",
1219         suggestions: [:debug, :info, :warning, :error]
1220       },
1221       %{
1222         key: :ident,
1223         type: :string,
1224         description:
1225           "A string that's prepended to every message, and is typically set to the app name",
1226         suggestions: ["pleroma"]
1227       },
1228       %{
1229         key: :format,
1230         type: :string,
1231         description: "Default: \"$date $time [$level] $levelpad$node $metadata $message\"",
1232         suggestions: ["$metadata[$level] $message"]
1233       },
1234       %{
1235         key: :metadata,
1236         type: {:list, :atom},
1237         suggestions: [:request_id]
1238       }
1239     ]
1240   },
1241   %{
1242     group: :logger,
1243     type: :group,
1244     key: :console,
1245     label: "Console Logger",
1246     description: "Console logger settings",
1247     children: [
1248       %{
1249         key: :level,
1250         type: {:dropdown, :atom},
1251         description: "Log level",
1252         suggestions: [:debug, :info, :warning, :error]
1253       },
1254       %{
1255         key: :format,
1256         type: :string,
1257         description: "Default: \"$date $time [$level] $levelpad$node $metadata $message\"",
1258         suggestions: ["$metadata[$level] $message"]
1259       },
1260       %{
1261         key: :metadata,
1262         type: {:list, :atom},
1263         suggestions: [:request_id]
1264       }
1265     ]
1266   },
1267   %{
1268     group: :pleroma,
1269     key: :frontend_configurations,
1270     type: :group,
1271     description:
1272       "This form can be used to configure a keyword list that keeps the configuration data for any " <>
1273         "kind of frontend. By default, settings for pleroma_fe are configured. If you want to " <>
1274         "add your own configuration your settings all fields must be complete.",
1275     children: [
1276       %{
1277         key: :pleroma_fe,
1278         label: "Pleroma FE",
1279         type: :map,
1280         description: "Settings for Pleroma FE",
1281         suggestions: [
1282           %{
1283             alwaysShowSubjectInput: true,
1284             background: "/static/aurora_borealis.jpg",
1285             collapseMessageWithSubject: false,
1286             greentext: false,
1287             hideFilteredStatuses: false,
1288             hideMutedPosts: false,
1289             hidePostStats: false,
1290             hideSitename: false,
1291             hideUserStats: false,
1292             loginMethod: "password",
1293             logo: "/static/logo.svg",
1294             logoMargin: ".1em",
1295             logoMask: true,
1296             minimalScopesMode: false,
1297             noAttachmentLinks: false,
1298             nsfwCensorImage: "/static/img/nsfw.74818f9.png",
1299             postContentType: "text/plain",
1300             redirectRootLogin: "/main/friends",
1301             redirectRootNoLogin: "/main/all",
1302             scopeCopy: true,
1303             sidebarRight: false,
1304             showFeaturesPanel: true,
1305             showInstanceSpecificPanel: false,
1306             subjectLineBehavior: "email",
1307             theme: "pleroma-dark",
1308             webPushNotifications: false
1309           }
1310         ],
1311         children: [
1312           %{
1313             key: :alwaysShowSubjectInput,
1314             label: "Always show subject input",
1315             type: :boolean,
1316             description: "When disabled, auto-hide the subject field if it's empty"
1317           },
1318           %{
1319             key: :background,
1320             type: {:string, :image},
1321             description:
1322               "URL of the background, unless viewing a user profile with a background that is set",
1323             suggestions: ["/images/city.jpg"]
1324           },
1325           %{
1326             key: :collapseMessageWithSubject,
1327             label: "Collapse message with subject",
1328             type: :boolean,
1329             description:
1330               "When a message has a subject (aka Content Warning), collapse it by default"
1331           },
1332           %{
1333             key: :greentext,
1334             label: "Greentext",
1335             type: :boolean,
1336             description: "Enables green text on lines prefixed with the > character"
1337           },
1338           %{
1339             key: :hideFilteredStatuses,
1340             label: "Hide Filtered Statuses",
1341             type: :boolean,
1342             description: "Hides filtered statuses from timelines"
1343           },
1344           %{
1345             key: :hideMutedPosts,
1346             label: "Hide Muted Posts",
1347             type: :boolean,
1348             description: "Hides muted statuses from timelines"
1349           },
1350           %{
1351             key: :hidePostStats,
1352             label: "Hide post stats",
1353             type: :boolean,
1354             description: "Hide notices statistics (repeats, favorites, ...)"
1355           },
1356           %{
1357             key: :hideSitename,
1358             label: "Hide Sitename",
1359             type: :boolean,
1360             description: "Hides instance name from PleromaFE banner"
1361           },
1362           %{
1363             key: :hideUserStats,
1364             label: "Hide user stats",
1365             type: :boolean,
1366             description:
1367               "Hide profile statistics (posts, posts per day, followers, followings, ...)"
1368           },
1369           %{
1370             key: :logo,
1371             type: {:string, :image},
1372             description: "URL of the logo, defaults to Pleroma's logo",
1373             suggestions: ["/static/logo.svg"]
1374           },
1375           %{
1376             key: :logoMargin,
1377             label: "Logo margin",
1378             type: :string,
1379             description:
1380               "Allows you to adjust vertical margins between logo boundary and navbar borders. " <>
1381                 "The idea is that to have logo's image without any extra margins and instead adjust them to your need in layout.",
1382             suggestions: [".1em"]
1383           },
1384           %{
1385             key: :logoMask,
1386             label: "Logo mask",
1387             type: :boolean,
1388             description:
1389               "By default it assumes logo used will be monochrome with alpha channel to be compatible with both light and dark themes. " <>
1390                 "If you want a colorful logo you must disable logoMask."
1391           },
1392           %{
1393             key: :minimalScopesMode,
1394             label: "Minimal scopes mode",
1395             type: :boolean,
1396             description:
1397               "Limit scope selection to Direct, User default, and Scope of post replying to. " <>
1398                 "Also prevents replying to a DM with a public post from PleromaFE."
1399           },
1400           %{
1401             key: :nsfwCensorImage,
1402             label: "NSFW Censor Image",
1403             type: {:string, :image},
1404             description:
1405               "URL of the image to use for hiding NSFW media attachments in the timeline",
1406             suggestions: ["/static/img/nsfw.74818f9.png"]
1407           },
1408           %{
1409             key: :postContentType,
1410             label: "Post Content Type",
1411             type: {:dropdown, :atom},
1412             description: "Default post formatting option",
1413             suggestions: ["text/plain", "text/html", "text/markdown", "text/bbcode"]
1414           },
1415           %{
1416             key: :redirectRootNoLogin,
1417             label: "Redirect root no login",
1418             type: :string,
1419             description:
1420               "Relative URL which indicates where to redirect when a user isn't logged in",
1421             suggestions: ["/main/all"]
1422           },
1423           %{
1424             key: :redirectRootLogin,
1425             label: "Redirect root login",
1426             type: :string,
1427             description:
1428               "Relative URL which indicates where to redirect when a user is logged in",
1429             suggestions: ["/main/friends"]
1430           },
1431           %{
1432             key: :scopeCopy,
1433             label: "Scope copy",
1434             type: :boolean,
1435             description: "Copy the scope (private/unlisted/public) in replies to posts by default"
1436           },
1437           %{
1438             key: :sidebarRight,
1439             label: "Sidebar on Right",
1440             type: :boolean,
1441             description: "Change alignment of sidebar and panels to the right"
1442           },
1443           %{
1444             key: :showFeaturesPanel,
1445             label: "Show instance features panel",
1446             type: :boolean,
1447             description:
1448               "Enables panel displaying functionality of the instance on the About page"
1449           },
1450           %{
1451             key: :showInstanceSpecificPanel,
1452             label: "Show instance specific panel",
1453             type: :boolean,
1454             description: "Whether to show the instance's custom panel"
1455           },
1456           %{
1457             key: :subjectLineBehavior,
1458             label: "Subject line behavior",
1459             type: :string,
1460             description: "Allows changing the default behaviour of subject lines in replies.
1461           `email`: copy and prepend re:, as in email,
1462           `masto`: copy verbatim, as in Mastodon,
1463           `noop`: don't copy the subject.",
1464             suggestions: ["email", "masto", "noop"]
1465           },
1466           %{
1467             key: :theme,
1468             type: :string,
1469             description: "Which theme to use. Available themes are defined in styles.json",
1470             suggestions: ["pleroma-dark"]
1471           }
1472         ]
1473       }
1474     ]
1475   },
1476   %{
1477     group: :pleroma,
1478     key: :assets,
1479     type: :group,
1480     description:
1481       "This section configures assets to be used with various frontends. Currently the only option relates to mascots on the mastodon frontend",
1482     children: [
1483       %{
1484         key: :mascots,
1485         type: {:keyword, :map},
1486         description:
1487           "Keyword of mascots, each element must contain both an URL and a mime_type key",
1488         suggestions: [
1489           pleroma_fox_tan: %{
1490             url: "/images/pleroma-fox-tan-smol.png",
1491             mime_type: "image/png"
1492           },
1493           pleroma_fox_tan_shy: %{
1494             url: "/images/pleroma-fox-tan-shy.png",
1495             mime_type: "image/png"
1496           }
1497         ]
1498       },
1499       %{
1500         key: :default_mascot,
1501         type: :atom,
1502         description:
1503           "This will be used as the default mascot on MastoFE. Default: `:pleroma_fox_tan`",
1504         suggestions: [
1505           :pleroma_fox_tan
1506         ]
1507       },
1508       %{
1509         key: :default_user_avatar,
1510         type: {:string, :image},
1511         description: "URL of the default user avatar",
1512         suggestions: ["/images/avi.png"]
1513       }
1514     ]
1515   },
1516   %{
1517     group: :pleroma,
1518     key: :manifest,
1519     type: :group,
1520     description:
1521       "This section describe PWA manifest instance-specific values. Currently this option relate only for MastoFE.",
1522     children: [
1523       %{
1524         key: :icons,
1525         type: {:list, :map},
1526         description: "Describe the icons of the app",
1527         suggestion: [
1528           %{
1529             src: "/static/logo.png"
1530           },
1531           %{
1532             src: "/static/icon.png",
1533             type: "image/png"
1534           },
1535           %{
1536             src: "/static/icon.ico",
1537             sizes: "72x72 96x96 128x128 256x256"
1538           }
1539         ]
1540       },
1541       %{
1542         key: :theme_color,
1543         type: :string,
1544         description: "Describe the theme color of the app",
1545         suggestions: ["#282c37", "mediumpurple"]
1546       },
1547       %{
1548         key: :background_color,
1549         type: :string,
1550         description: "Describe the background color of the app",
1551         suggestions: ["#191b22", "aliceblue"]
1552       }
1553     ]
1554   },
1555   %{
1556     group: :pleroma,
1557     key: :media_proxy,
1558     type: :group,
1559     description: "Media proxy",
1560     children: [
1561       %{
1562         key: :enabled,
1563         type: :boolean,
1564         description: "Enables proxying of remote media via the instance's proxy"
1565       },
1566       %{
1567         key: :base_url,
1568         label: "Base URL",
1569         type: :string,
1570         description:
1571           "The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host/CDN fronts.",
1572         suggestions: ["https://example.com"]
1573       },
1574       %{
1575         key: :invalidation,
1576         type: :keyword,
1577         descpiption: "",
1578         suggestions: [
1579           enabled: true,
1580           provider: Pleroma.Web.MediaProxy.Invalidation.Script
1581         ],
1582         children: [
1583           %{
1584             key: :enabled,
1585             type: :boolean,
1586             description: "Enables media cache object invalidation."
1587           },
1588           %{
1589             key: :provider,
1590             type: :module,
1591             description: "Module which will be used to purge objects from the cache.",
1592             suggestions: [
1593               Pleroma.Web.MediaProxy.Invalidation.Script,
1594               Pleroma.Web.MediaProxy.Invalidation.Http
1595             ]
1596           }
1597         ]
1598       },
1599       %{
1600         key: :proxy_opts,
1601         label: "Advanced MediaProxy Options",
1602         type: :keyword,
1603         description: "Internal Pleroma.ReverseProxy settings",
1604         suggestions: [
1605           redirect_on_failure: false,
1606           max_body_length: 25 * 1_048_576,
1607           max_read_duration: 30_000
1608         ],
1609         children: [
1610           %{
1611             key: :redirect_on_failure,
1612             type: :boolean,
1613             description: """
1614             Redirects the client to the origin server upon encountering HTTP errors.\n
1615             Note that files larger than Max Body Length will trigger an error. (e.g., Peertube videos)\n\n
1616             **WARNING:** This setting will allow larger files to be accessed, but exposes the\n
1617             IP addresses of your users to the other servers, bypassing the MediaProxy.
1618             """
1619           },
1620           %{
1621             key: :max_body_length,
1622             type: :integer,
1623             description:
1624               "Maximum file size (in bytes) allowed through the Pleroma MediaProxy cache."
1625           },
1626           %{
1627             key: :max_read_duration,
1628             type: :integer,
1629             description: "Timeout (in milliseconds) of GET request to the remote URI."
1630           }
1631         ]
1632       },
1633       %{
1634         key: :whitelist,
1635         type: {:list, :string},
1636         description: "List of hosts with scheme to bypass the MediaProxy",
1637         suggestions: ["http://example.com"]
1638       }
1639     ]
1640   },
1641   %{
1642     group: :pleroma,
1643     key: :media_preview_proxy,
1644     type: :group,
1645     description: "Media preview proxy",
1646     children: [
1647       %{
1648         key: :enabled,
1649         type: :boolean,
1650         description:
1651           "Enables proxying of remote media preview to the instance's proxy. Requires enabled media proxy."
1652       },
1653       %{
1654         key: :thumbnail_max_width,
1655         type: :integer,
1656         description:
1657           "Max width of preview thumbnail for images (video preview always has original dimensions)."
1658       },
1659       %{
1660         key: :thumbnail_max_height,
1661         type: :integer,
1662         description:
1663           "Max height of preview thumbnail for images (video preview always has original dimensions)."
1664       },
1665       %{
1666         key: :image_quality,
1667         type: :integer,
1668         description: "Quality of the output. Ranges from 0 (min quality) to 100 (max quality)."
1669       },
1670       %{
1671         key: :min_content_length,
1672         type: :integer,
1673         description:
1674           "Min content length (in bytes) to perform preview. Media smaller in size will be served without thumbnailing."
1675       }
1676     ]
1677   },
1678   %{
1679     group: :pleroma,
1680     key: Pleroma.Web.MediaProxy.Invalidation.Http,
1681     type: :group,
1682     description: "HTTP invalidate settings",
1683     children: [
1684       %{
1685         key: :method,
1686         type: :atom,
1687         description: "HTTP method of request. Default: :purge"
1688       },
1689       %{
1690         key: :headers,
1691         type: {:keyword, :string},
1692         description: "HTTP headers of request",
1693         suggestions: [{"x-refresh", 1}]
1694       },
1695       %{
1696         key: :options,
1697         type: :keyword,
1698         description: "Request options",
1699         children: [
1700           %{
1701             key: :params,
1702             type: {:map, :string}
1703           }
1704         ]
1705       }
1706     ]
1707   },
1708   %{
1709     group: :pleroma,
1710     key: Pleroma.Web.MediaProxy.Invalidation.Script,
1711     type: :group,
1712     description: "Invalidation script settings",
1713     children: [
1714       %{
1715         key: :script_path,
1716         type: :string,
1717         description: "Path to executable script which will purge cached items.",
1718         suggestions: ["./installation/nginx-cache-purge.sh.example"]
1719       },
1720       %{
1721         key: :url_format,
1722         label: "URL Format",
1723         type: :string,
1724         description:
1725           "Optional URL format preprocessing. Only required for Apache's htcacheclean.",
1726         suggestions: [":htcacheclean"]
1727       }
1728     ]
1729   },
1730   %{
1731     group: :pleroma,
1732     key: :gopher,
1733     type: :group,
1734     description: "Gopher settings",
1735     children: [
1736       %{
1737         key: :enabled,
1738         type: :boolean,
1739         description: "Enables the gopher interface"
1740       },
1741       %{
1742         key: :ip,
1743         label: "IP",
1744         type: :tuple,
1745         description: "IP address to bind to",
1746         suggestions: [{0, 0, 0, 0}]
1747       },
1748       %{
1749         key: :port,
1750         type: :integer,
1751         description: "Port to bind to",
1752         suggestions: [9999]
1753       },
1754       %{
1755         key: :dstport,
1756         type: :integer,
1757         description: "Port advertised in URLs (optional, defaults to port)",
1758         suggestions: [9999]
1759       }
1760     ]
1761   },
1762   %{
1763     group: :pleroma,
1764     key: :activitypub,
1765     label: "ActivityPub",
1766     type: :group,
1767     description: "ActivityPub-related settings",
1768     children: [
1769       %{
1770         key: :unfollow_blocked,
1771         type: :boolean,
1772         description: "Whether blocks result in people getting unfollowed"
1773       },
1774       %{
1775         key: :outgoing_blocks,
1776         type: :boolean,
1777         description: "Whether to federate blocks to other instances"
1778       },
1779       %{
1780         key: :blockers_visible,
1781         type: :boolean,
1782         description: "Whether a user can see someone who has blocked them"
1783       },
1784       %{
1785         key: :sign_object_fetches,
1786         type: :boolean,
1787         description: "Sign object fetches with HTTP signatures"
1788       },
1789       %{
1790         key: :authorized_fetch_mode,
1791         type: :boolean,
1792         description: "Require HTTP signatures for AP fetches"
1793       },
1794       %{
1795         key: :note_replies_output_limit,
1796         type: :integer,
1797         description:
1798           "The number of Note replies' URIs to be included with outgoing federation (`5` to match Mastodon hardcoded value, `0` to disable the output)"
1799       },
1800       %{
1801         key: :follow_handshake_timeout,
1802         type: :integer,
1803         description: "Following handshake timeout",
1804         suggestions: [500]
1805       }
1806     ]
1807   },
1808   %{
1809     group: :pleroma,
1810     key: :http_security,
1811     label: "HTTP security",
1812     type: :group,
1813     description: "HTTP security settings",
1814     children: [
1815       %{
1816         key: :enabled,
1817         type: :boolean,
1818         description: "Whether the managed content security policy is enabled"
1819       },
1820       %{
1821         key: :sts,
1822         label: "STS",
1823         type: :boolean,
1824         description: "Whether to additionally send a Strict-Transport-Security header"
1825       },
1826       %{
1827         key: :sts_max_age,
1828         label: "STS max age",
1829         type: :integer,
1830         description: "The maximum age for the Strict-Transport-Security header if sent",
1831         suggestions: [31_536_000]
1832       },
1833       %{
1834         key: :ct_max_age,
1835         label: "CT max age",
1836         type: :integer,
1837         description: "The maximum age for the Expect-CT header if sent",
1838         suggestions: [2_592_000]
1839       },
1840       %{
1841         key: :referrer_policy,
1842         type: :string,
1843         description: "The referrer policy to use, either \"same-origin\" or \"no-referrer\"",
1844         suggestions: ["same-origin", "no-referrer"]
1845       },
1846       %{
1847         key: :report_uri,
1848         label: "Report URI",
1849         type: :string,
1850         description: "Adds the specified URL to report-uri and report-to group in CSP header",
1851         suggestions: ["https://example.com/report-uri"]
1852       }
1853     ]
1854   },
1855   %{
1856     group: :web_push_encryption,
1857     key: :vapid_details,
1858     label: "Vapid Details",
1859     type: :group,
1860     description:
1861       "Web Push Notifications configuration. You can use the mix task mix web_push.gen.keypair to generate it.",
1862     children: [
1863       %{
1864         key: :subject,
1865         type: :string,
1866         description:
1867           "A mailto link for the administrative contact." <>
1868             " It's best if this email is not a personal email address, but rather a group email to the instance moderation team.",
1869         suggestions: ["mailto:moderators@pleroma.com"]
1870       },
1871       %{
1872         key: :public_key,
1873         type: :string,
1874         description: "VAPID public key",
1875         suggestions: ["Public key"]
1876       },
1877       %{
1878         key: :private_key,
1879         type: :string,
1880         description: "VAPID private key",
1881         suggestions: ["Private key"]
1882       }
1883     ]
1884   },
1885   %{
1886     group: :pleroma,
1887     key: Pleroma.Captcha,
1888     type: :group,
1889     description: "Captcha-related settings",
1890     children: [
1891       %{
1892         key: :enabled,
1893         type: :boolean,
1894         description: "Whether the captcha should be shown on registration"
1895       },
1896       %{
1897         key: :method,
1898         type: :module,
1899         description: "The method/service to use for captcha",
1900         suggestions: [Pleroma.Captcha.Kocaptcha, Pleroma.Captcha.Native]
1901       },
1902       %{
1903         key: :seconds_valid,
1904         type: :integer,
1905         description: "The time in seconds for which the captcha is valid",
1906         suggestions: [60]
1907       }
1908     ]
1909   },
1910   %{
1911     group: :pleroma,
1912     key: Pleroma.Captcha.Kocaptcha,
1913     type: :group,
1914     description:
1915       "Kocaptcha is a very simple captcha service with a single API endpoint, the source code is" <>
1916         " here: https://github.com/koto-bank/kocaptcha. The default endpoint (https://captcha.kotobank.ch) is hosted by the developer.",
1917     children: [
1918       %{
1919         key: :endpoint,
1920         type: :string,
1921         description: "The kocaptcha endpoint to use",
1922         suggestions: ["https://captcha.kotobank.ch"]
1923       }
1924     ]
1925   },
1926   %{
1927     group: :pleroma,
1928     label: "Pleroma Admin Token",
1929     type: :group,
1930     description:
1931       "Allows setting a token that can be used to authenticate requests with admin privileges without a normal user account token. Append the `admin_token` parameter to requests to utilize it. (Please reconsider using HTTP Basic Auth or OAuth-based authentication if possible)",
1932     children: [
1933       %{
1934         key: :admin_token,
1935         type: :string,
1936         description: "Admin token",
1937         suggestions: [
1938           "Please use a high entropy string or UUID"
1939         ]
1940       }
1941     ]
1942   },
1943   %{
1944     group: :pleroma,
1945     key: Oban,
1946     type: :group,
1947     description:
1948       "[Oban](https://github.com/sorentwo/oban) asynchronous job processor configuration.",
1949     children: [
1950       %{
1951         key: :log,
1952         type: {:dropdown, :atom},
1953         description: "Logs verbose mode",
1954         suggestions: [false, :error, :warning, :info, :debug]
1955       },
1956       %{
1957         key: :queues,
1958         type: {:keyword, :integer},
1959         description:
1960           "Background jobs queues (keys: queues, values: max numbers of concurrent jobs)",
1961         suggestions: [
1962           activity_expiration: 10,
1963           attachments_cleanup: 5,
1964           background: 5,
1965           federator_incoming: 50,
1966           federator_outgoing: 50,
1967           mailer: 10,
1968           scheduled_activities: 10,
1969           transmogrifier: 20,
1970           web_push: 50
1971         ],
1972         children: [
1973           %{
1974             key: :activity_expiration,
1975             type: :integer,
1976             description: "Activity expiration queue",
1977             suggestions: [10]
1978           },
1979           %{
1980             key: :backup,
1981             type: :integer,
1982             description: "Backup queue",
1983             suggestions: [1]
1984           },
1985           %{
1986             key: :attachments_cleanup,
1987             type: :integer,
1988             description: "Attachment deletion queue",
1989             suggestions: [5]
1990           },
1991           %{
1992             key: :background,
1993             type: :integer,
1994             description: "Background queue",
1995             suggestions: [5]
1996           },
1997           %{
1998             key: :federator_incoming,
1999             type: :integer,
2000             description: "Incoming federation queue",
2001             suggestions: [50]
2002           },
2003           %{
2004             key: :federator_outgoing,
2005             type: :integer,
2006             description: "Outgoing federation queue",
2007             suggestions: [50]
2008           },
2009           %{
2010             key: :mailer,
2011             type: :integer,
2012             description: "Email sender queue, see Pleroma.Emails.Mailer",
2013             suggestions: [10]
2014           },
2015           %{
2016             key: :scheduled_activities,
2017             type: :integer,
2018             description: "Scheduled activities queue, see Pleroma.ScheduledActivities",
2019             suggestions: [10]
2020           },
2021           %{
2022             key: :transmogrifier,
2023             type: :integer,
2024             description: "Transmogrifier queue",
2025             suggestions: [20]
2026           },
2027           %{
2028             key: :web_push,
2029             type: :integer,
2030             description: "Web push notifications queue",
2031             suggestions: [50]
2032           }
2033         ]
2034       },
2035       %{
2036         key: :crontab,
2037         type: {:list, :tuple},
2038         description: "Settings for cron background jobs",
2039         suggestions: [
2040           {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker},
2041           {"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker}
2042         ]
2043       }
2044     ]
2045   },
2046   %{
2047     group: :pleroma,
2048     key: :workers,
2049     type: :group,
2050     description: "Includes custom worker options not interpretable directly by `Oban`",
2051     children: [
2052       %{
2053         key: :retries,
2054         type: {:keyword, :integer},
2055         description: "Max retry attempts for failed jobs, per `Oban` queue",
2056         suggestions: [
2057           federator_incoming: 5,
2058           federator_outgoing: 5
2059         ]
2060       }
2061     ]
2062   },
2063   %{
2064     group: :pleroma,
2065     key: Pleroma.Web.Metadata,
2066     type: :group,
2067     description: "Metadata-related settings",
2068     children: [
2069       %{
2070         key: :providers,
2071         type: {:list, :module},
2072         description: "List of metadata providers to enable",
2073         suggestions: [
2074           Pleroma.Web.Metadata.Providers.OpenGraph,
2075           Pleroma.Web.Metadata.Providers.TwitterCard,
2076           Pleroma.Web.Metadata.Providers.RelMe,
2077           Pleroma.Web.Metadata.Providers.Feed
2078         ]
2079       },
2080       %{
2081         key: :unfurl_nsfw,
2082         label: "Unfurl NSFW",
2083         type: :boolean,
2084         description: "When enabled NSFW attachments will be shown in previews"
2085       }
2086     ]
2087   },
2088   %{
2089     group: :pleroma,
2090     key: :rich_media,
2091     type: :group,
2092     description:
2093       "If enabled the instance will parse metadata from attached links to generate link previews",
2094     children: [
2095       %{
2096         key: :enabled,
2097         type: :boolean,
2098         description: "Enables RichMedia parsing of URLs"
2099       },
2100       %{
2101         key: :ignore_hosts,
2102         type: {:list, :string},
2103         description: "List of hosts which will be ignored by the metadata parser",
2104         suggestions: ["accounts.google.com", "xss.website"]
2105       },
2106       %{
2107         key: :ignore_tld,
2108         label: "Ignore TLD",
2109         type: {:list, :string},
2110         description: "List TLDs (top-level domains) which will ignore for parse metadata",
2111         suggestions: ["local", "localdomain", "lan"]
2112       },
2113       %{
2114         key: :parsers,
2115         type: {:list, :module},
2116         description:
2117           "List of Rich Media parsers. Module names are shortened (removed leading `Pleroma.Web.RichMedia.Parsers.` part), but on adding custom module you need to use full name.",
2118         suggestions: [
2119           Pleroma.Web.RichMedia.Parsers.OEmbed,
2120           Pleroma.Web.RichMedia.Parsers.TwitterCard
2121         ]
2122       },
2123       %{
2124         key: :ttl_setters,
2125         label: "TTL setters",
2126         type: {:list, :module},
2127         description:
2128           "List of rich media TTL setters. Module names are shortened (removed leading `Pleroma.Web.RichMedia.Parser.` part), but on adding custom module you need to use full name.",
2129         suggestions: [
2130           Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl
2131         ]
2132       },
2133       %{
2134         key: :failure_backoff,
2135         type: :integer,
2136         description:
2137           "Amount of milliseconds after request failure, during which the request will not be retried.",
2138         suggestions: [60_000]
2139       }
2140     ]
2141   },
2142   %{
2143     group: :pleroma,
2144     key: Pleroma.Formatter,
2145     label: "Linkify",
2146     type: :group,
2147     description:
2148       "Configuration for Pleroma's link formatter which parses mentions, hashtags, and URLs.",
2149     children: [
2150       %{
2151         key: :class,
2152         type: [:string, :boolean],
2153         description: "Specify the class to be added to the generated link. Disable to clear.",
2154         suggestions: ["auto-linker", false]
2155       },
2156       %{
2157         key: :rel,
2158         type: [:string, :boolean],
2159         description: "Override the rel attribute. Disable to clear.",
2160         suggestions: ["ugc", "noopener noreferrer", false]
2161       },
2162       %{
2163         key: :new_window,
2164         type: :boolean,
2165         description: "Link URLs will open in a new window/tab."
2166       },
2167       %{
2168         key: :truncate,
2169         type: [:integer, :boolean],
2170         description:
2171           "Set to a number to truncate URLs longer than the number. Truncated URLs will end in `...`",
2172         suggestions: [15, false]
2173       },
2174       %{
2175         key: :strip_prefix,
2176         type: :boolean,
2177         description: "Strip the scheme prefix."
2178       },
2179       %{
2180         key: :extra,
2181         type: :boolean,
2182         description: "Link URLs with rarely used schemes (magnet, ipfs, irc, etc.)"
2183       },
2184       %{
2185         key: :validate_tld,
2186         type: [:atom, :boolean],
2187         description:
2188           "Set to false to disable TLD validation for URLs/emails. Can be set to :no_scheme to validate TLDs only for URLs without a scheme (e.g `example.com` will be validated, but `http://example.loki` won't)",
2189         suggestions: [:no_scheme, true]
2190       }
2191     ]
2192   },
2193   %{
2194     group: :pleroma,
2195     key: Pleroma.ScheduledActivity,
2196     type: :group,
2197     description: "Scheduled activities settings",
2198     children: [
2199       %{
2200         key: :daily_user_limit,
2201         type: :integer,
2202         description:
2203           "The number of scheduled activities a user is allowed to create in a single day. Default: 25.",
2204         suggestions: [25]
2205       },
2206       %{
2207         key: :total_user_limit,
2208         type: :integer,
2209         description:
2210           "The number of scheduled activities a user is allowed to create in total. Default: 300.",
2211         suggestions: [300]
2212       },
2213       %{
2214         key: :enabled,
2215         type: :boolean,
2216         description: "Whether scheduled activities are sent to the job queue to be executed"
2217       }
2218     ]
2219   },
2220   %{
2221     group: :pleroma,
2222     key: Pleroma.Workers.PurgeExpiredActivity,
2223     type: :group,
2224     description: "Expired activities settings",
2225     children: [
2226       %{
2227         key: :enabled,
2228         type: :boolean,
2229         description: "Enables expired activities addition & deletion"
2230       },
2231       %{
2232         key: :min_lifetime,
2233         type: :integer,
2234         description: "Minimum lifetime for ephemeral activity (in seconds)",
2235         suggestions: [600]
2236       }
2237     ]
2238   },
2239   %{
2240     group: :pleroma,
2241     label: "Pleroma Authenticator",
2242     type: :group,
2243     description: "Authenticator",
2244     children: [
2245       %{
2246         key: Pleroma.Web.Auth.Authenticator,
2247         type: :module,
2248         suggestions: [Pleroma.Web.Auth.PleromaAuthenticator, Pleroma.Web.Auth.LDAPAuthenticator]
2249       }
2250     ]
2251   },
2252   %{
2253     group: :pleroma,
2254     key: :ldap,
2255     label: "LDAP",
2256     type: :group,
2257     description:
2258       "Use LDAP for user authentication. When a user logs in to the Pleroma instance, the name and password" <>
2259         " will be verified by trying to authenticate (bind) to a LDAP server." <>
2260         " If a user exists in the LDAP directory but there is no account with the same name yet on the" <>
2261         " Pleroma instance then a new Pleroma account will be created with the same name as the LDAP user name.",
2262     children: [
2263       %{
2264         key: :enabled,
2265         type: :boolean,
2266         description: "Enables LDAP authentication"
2267       },
2268       %{
2269         key: :host,
2270         type: :string,
2271         description: "LDAP server hostname",
2272         suggestions: ["localhosts"]
2273       },
2274       %{
2275         key: :port,
2276         type: :integer,
2277         description: "LDAP port, e.g. 389 or 636",
2278         suggestions: [389, 636]
2279       },
2280       %{
2281         key: :ssl,
2282         label: "SSL",
2283         type: :boolean,
2284         description: "Enable to use SSL, usually implies the port 636"
2285       },
2286       %{
2287         key: :sslopts,
2288         label: "SSL options",
2289         type: :keyword,
2290         description: "Additional SSL options",
2291         suggestions: [cacertfile: "path/to/file/with/PEM/cacerts", verify: :verify_peer],
2292         children: [
2293           %{
2294             key: :cacertfile,
2295             type: :string,
2296             description: "Path to file with PEM encoded cacerts",
2297             suggestions: ["path/to/file/with/PEM/cacerts"]
2298           },
2299           %{
2300             key: :verify,
2301             type: :atom,
2302             description: "Type of cert verification",
2303             suggestions: [:verify_peer]
2304           }
2305         ]
2306       },
2307       %{
2308         key: :tls,
2309         label: "TLS",
2310         type: :boolean,
2311         description: "Enable to use STARTTLS, usually implies the port 389"
2312       },
2313       %{
2314         key: :tlsopts,
2315         label: "TLS options",
2316         type: :keyword,
2317         description: "Additional TLS options",
2318         suggestions: [cacertfile: "path/to/file/with/PEM/cacerts", verify: :verify_peer],
2319         children: [
2320           %{
2321             key: :cacertfile,
2322             type: :string,
2323             description: "Path to file with PEM encoded cacerts",
2324             suggestions: ["path/to/file/with/PEM/cacerts"]
2325           },
2326           %{
2327             key: :verify,
2328             type: :atom,
2329             description: "Type of cert verification",
2330             suggestions: [:verify_peer]
2331           }
2332         ]
2333       },
2334       %{
2335         key: :base,
2336         type: :string,
2337         description: "LDAP base, e.g. \"dc=example,dc=com\"",
2338         suggestions: ["dc=example,dc=com"]
2339       },
2340       %{
2341         key: :uid,
2342         label: "UID",
2343         type: :string,
2344         description:
2345           "LDAP attribute name to authenticate the user, e.g. when \"cn\", the filter will be \"cn=username,base\"",
2346         suggestions: ["cn"]
2347       }
2348     ]
2349   },
2350   %{
2351     group: :pleroma,
2352     key: :auth,
2353     type: :group,
2354     description: "Authentication / authorization settings",
2355     children: [
2356       %{
2357         key: :enforce_oauth_admin_scope_usage,
2358         label: "Enforce OAuth admin scope usage",
2359         type: :boolean,
2360         description:
2361           "OAuth admin scope requirement toggle. " <>
2362             "If enabled, admin actions explicitly demand admin OAuth scope(s) presence in OAuth token " <>
2363             "(client app must support admin scopes). If disabled and token doesn't have admin scope(s), " <>
2364             "`is_admin` user flag grants access to admin-specific actions."
2365       },
2366       %{
2367         key: :auth_template,
2368         type: :string,
2369         description:
2370           "Authentication form template. By default it's `show.html` which corresponds to `lib/pleroma/web/templates/o_auth/o_auth/show.html.ee`.",
2371         suggestions: ["show.html"]
2372       },
2373       %{
2374         key: :oauth_consumer_template,
2375         label: "OAuth consumer template",
2376         type: :string,
2377         description:
2378           "OAuth consumer mode authentication form template. By default it's `consumer.html` which corresponds to" <>
2379             " `lib/pleroma/web/templates/o_auth/o_auth/consumer.html.eex`.",
2380         suggestions: ["consumer.html"]
2381       },
2382       %{
2383         key: :oauth_consumer_strategies,
2384         label: "OAuth consumer strategies",
2385         type: {:list, :string},
2386         description:
2387           "The list of enabled OAuth consumer strategies. By default it's set by OAUTH_CONSUMER_STRATEGIES environment variable." <>
2388             " Each entry in this space-delimited string should be of format \"strategy\" or \"strategy:dependency\"" <>
2389             " (e.g. twitter or keycloak:ueberauth_keycloak_strategy in case dependency is named differently than ueberauth_<strategy>).",
2390         suggestions: ["twitter", "keycloak:ueberauth_keycloak_strategy"]
2391       }
2392     ]
2393   },
2394   %{
2395     group: :pleroma,
2396     key: :email_notifications,
2397     type: :group,
2398     description: "Email notifications settings",
2399     children: [
2400       %{
2401         key: :digest,
2402         type: :map,
2403         description:
2404           "emails of \"what you've missed\" for users who have been inactive for a while",
2405         suggestions: [
2406           %{
2407             active: false,
2408             schedule: "0 0 * * 0",
2409             interval: 7,
2410             inactivity_threshold: 7
2411           }
2412         ],
2413         children: [
2414           %{
2415             key: :active,
2416             label: "Enabled",
2417             type: :boolean,
2418             description: "Globally enable or disable digest emails"
2419           },
2420           %{
2421             key: :schedule,
2422             type: :string,
2423             description:
2424               "When to send digest email, in crontab format. \"0 0 0\" is the default, meaning \"once a week at midnight on Sunday morning\".",
2425             suggestions: ["0 0 * * 0"]
2426           },
2427           %{
2428             key: :interval,
2429             type: :integer,
2430             description: "Minimum interval between digest emails to one user",
2431             suggestions: [7]
2432           },
2433           %{
2434             key: :inactivity_threshold,
2435             type: :integer,
2436             description: "Minimum user inactivity threshold",
2437             suggestions: [7]
2438           }
2439         ]
2440       }
2441     ]
2442   },
2443   %{
2444     group: :pleroma,
2445     key: Pleroma.Emails.UserEmail,
2446     type: :group,
2447     description: "Email template settings",
2448     children: [
2449       %{
2450         key: :logo,
2451         type: {:string, :image},
2452         description: "A path to a custom logo. Set it to `nil` to use the default Pleroma logo.",
2453         suggestions: ["some/path/logo.png"]
2454       },
2455       %{
2456         key: :styling,
2457         type: :map,
2458         description: "A map with color settings for email templates.",
2459         suggestions: [
2460           %{
2461             link_color: "#d8a070",
2462             background_color: "#2C3645",
2463             content_background_color: "#1B2635",
2464             header_color: "#d8a070",
2465             text_color: "#b9b9ba",
2466             text_muted_color: "#b9b9ba"
2467           }
2468         ],
2469         children: [
2470           %{
2471             key: :link_color,
2472             type: :string,
2473             suggestions: ["#d8a070"]
2474           },
2475           %{
2476             key: :background_color,
2477             type: :string,
2478             suggestions: ["#2C3645"]
2479           },
2480           %{
2481             key: :content_background_color,
2482             type: :string,
2483             suggestions: ["#1B2635"]
2484           },
2485           %{
2486             key: :header_color,
2487             type: :string,
2488             suggestions: ["#d8a070"]
2489           },
2490           %{
2491             key: :text_color,
2492             type: :string,
2493             suggestions: ["#b9b9ba"]
2494           },
2495           %{
2496             key: :text_muted_color,
2497             type: :string,
2498             suggestions: ["#b9b9ba"]
2499           }
2500         ]
2501       }
2502     ]
2503   },
2504   %{
2505     group: :pleroma,
2506     key: Pleroma.Emails.NewUsersDigestEmail,
2507     type: :group,
2508     description: "New users admin email digest",
2509     children: [
2510       %{
2511         key: :enabled,
2512         type: :boolean,
2513         description: "Enables new users admin digest email when `true`"
2514       }
2515     ]
2516   },
2517   %{
2518     group: :pleroma,
2519     key: :oauth2,
2520     label: "OAuth2",
2521     type: :group,
2522     description: "Configure OAuth 2 provider capabilities",
2523     children: [
2524       %{
2525         key: :token_expires_in,
2526         type: :integer,
2527         description: "The lifetime in seconds of the access token",
2528         suggestions: [2_592_000]
2529       },
2530       %{
2531         key: :issue_new_refresh_token,
2532         type: :boolean,
2533         description:
2534           "Keeps old refresh token or generate new refresh token when to obtain an access token"
2535       },
2536       %{
2537         key: :clean_expired_tokens,
2538         type: :boolean,
2539         description: "Enable a background job to clean expired OAuth tokens. Default: disabled."
2540       }
2541     ]
2542   },
2543   %{
2544     group: :pleroma,
2545     key: :emoji,
2546     type: :group,
2547     children: [
2548       %{
2549         key: :shortcode_globs,
2550         type: {:list, :string},
2551         description: "Location of custom emoji files. * can be used as a wildcard.",
2552         suggestions: ["/emoji/custom/**/*.png"]
2553       },
2554       %{
2555         key: :pack_extensions,
2556         type: {:list, :string},
2557         description:
2558           "A list of file extensions for emojis, when no emoji.txt for a pack is present",
2559         suggestions: [".png", ".gif"]
2560       },
2561       %{
2562         key: :groups,
2563         type: {:keyword, {:list, :string}},
2564         description:
2565           "Emojis are ordered in groups (tags). This is an array of key-value pairs where the key is the group name" <>
2566             " and the value is the location or array of locations. * can be used as a wildcard.",
2567         suggestions: [
2568           Custom: ["/emoji/*.png", "/emoji/**/*.png"]
2569         ]
2570       },
2571       %{
2572         key: :default_manifest,
2573         type: :string,
2574         description:
2575           "Location of the JSON-manifest. This manifest contains information about the emoji-packs you can download." <>
2576             " Currently only one manifest can be added (no arrays).",
2577         suggestions: ["https://git.pleroma.social/pleroma/emoji-index/raw/master/index.json"]
2578       },
2579       %{
2580         key: :shared_pack_cache_seconds_per_file,
2581         label: "Shared pack cache s/file",
2582         type: :integer,
2583         descpiption:
2584           "When an emoji pack is shared, the archive is created and cached in memory" <>
2585             " for this amount of seconds multiplied by the number of files.",
2586         suggestions: [60]
2587       }
2588     ]
2589   },
2590   %{
2591     group: :pleroma,
2592     key: :rate_limit,
2593     type: :group,
2594     description:
2595       "Rate limit settings. This is an advanced feature enabled only for :authentication by default.",
2596     children: [
2597       %{
2598         key: :search,
2599         type: [:tuple, {:list, :tuple}],
2600         description: "For the search requests (account & status search etc.)",
2601         suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2602       },
2603       %{
2604         key: :timeline,
2605         type: [:tuple, {:list, :tuple}],
2606         description: "For requests to timelines (each timeline has it's own limiter)",
2607         suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2608       },
2609       %{
2610         key: :app_account_creation,
2611         type: [:tuple, {:list, :tuple}],
2612         description: "For registering user accounts from the same IP address",
2613         suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2614       },
2615       %{
2616         key: :relations_actions,
2617         type: [:tuple, {:list, :tuple}],
2618         description: "For actions on relationships with all users (follow, unfollow)",
2619         suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2620       },
2621       %{
2622         key: :relation_id_action,
2623         label: "Relation ID action",
2624         type: [:tuple, {:list, :tuple}],
2625         description: "For actions on relation with a specific user (follow, unfollow)",
2626         suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2627       },
2628       %{
2629         key: :statuses_actions,
2630         type: [:tuple, {:list, :tuple}],
2631         description:
2632           "For create / delete / fav / unfav / reblog / unreblog actions on any statuses",
2633         suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2634       },
2635       %{
2636         key: :status_id_action,
2637         label: "Status ID action",
2638         type: [:tuple, {:list, :tuple}],
2639         description:
2640           "For fav / unfav or reblog / unreblog actions on the same status by the same user",
2641         suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2642       },
2643       %{
2644         key: :authentication,
2645         type: [:tuple, {:list, :tuple}],
2646         description: "For authentication create / password check / user existence check requests",
2647         suggestions: [{60_000, 15}]
2648       }
2649     ]
2650   },
2651   %{
2652     group: :mime,
2653     label: "Mime Types",
2654     type: :group,
2655     description: "Mime Types settings",
2656     children: [
2657       %{
2658         key: :types,
2659         type: :map,
2660         suggestions: [
2661           %{
2662             "application/xml" => ["xml"],
2663             "application/xrd+xml" => ["xrd+xml"],
2664             "application/jrd+json" => ["jrd+json"],
2665             "application/activity+json" => ["activity+json"],
2666             "application/ld+json" => ["activity+json"]
2667           }
2668         ],
2669         children: [
2670           %{
2671             key: "application/xml",
2672             type: {:list, :string},
2673             suggestions: ["xml"]
2674           },
2675           %{
2676             key: "application/xrd+xml",
2677             type: {:list, :string},
2678             suggestions: ["xrd+xml"]
2679           },
2680           %{
2681             key: "application/jrd+json",
2682             type: {:list, :string},
2683             suggestions: ["jrd+json"]
2684           },
2685           %{
2686             key: "application/activity+json",
2687             type: {:list, :string},
2688             suggestions: ["activity+json"]
2689           },
2690           %{
2691             key: "application/ld+json",
2692             type: {:list, :string},
2693             suggestions: ["activity+json"]
2694           }
2695         ]
2696       }
2697     ]
2698   },
2699   %{
2700     group: :pleroma,
2701     key: :shout,
2702     type: :group,
2703     description: "Pleroma shout settings",
2704     children: [
2705       %{
2706         key: :enabled,
2707         type: :boolean,
2708         description: "Enables the backend Shoutbox chat feature."
2709       },
2710       %{
2711         key: :limit,
2712         type: :integer,
2713         description: "Shout message character limit.",
2714         suggestions: [
2715           5_000
2716         ]
2717       }
2718     ]
2719   },
2720   %{
2721     group: :pleroma,
2722     key: :http,
2723     label: "HTTP",
2724     type: :group,
2725     description: "HTTP settings",
2726     children: [
2727       %{
2728         key: :proxy_url,
2729         label: "Proxy URL",
2730         type: [:string, :tuple],
2731         description: "Proxy URL",
2732         suggestions: ["localhost:9020", {:socks5, :localhost, 3090}]
2733       },
2734       %{
2735         key: :send_user_agent,
2736         type: :boolean
2737       },
2738       %{
2739         key: :user_agent,
2740         type: [:string, :atom],
2741         description:
2742           "What user agent to use. Must be a string or an atom `:default`. Default value is `:default`.",
2743         suggestions: ["Pleroma", :default]
2744       },
2745       %{
2746         key: :adapter,
2747         type: :keyword,
2748         description: "Adapter specific options",
2749         suggestions: [],
2750         children: [
2751           %{
2752             key: :ssl_options,
2753             type: :keyword,
2754             label: "SSL Options",
2755             description: "SSL options for HTTP adapter",
2756             children: [
2757               %{
2758                 key: :versions,
2759                 type: {:list, :atom},
2760                 description: "List of TLS version to use",
2761                 suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2", ":tlsv1.3"]
2762               }
2763             ]
2764           }
2765         ]
2766       }
2767     ]
2768   },
2769   %{
2770     group: :pleroma,
2771     key: :markup,
2772     label: "Markup Settings",
2773     type: :group,
2774     children: [
2775       %{
2776         key: :allow_inline_images,
2777         type: :boolean
2778       },
2779       %{
2780         key: :allow_headings,
2781         type: :boolean
2782       },
2783       %{
2784         key: :allow_tables,
2785         type: :boolean
2786       },
2787       %{
2788         key: :allow_fonts,
2789         type: :boolean
2790       },
2791       %{
2792         key: :scrub_policy,
2793         type: {:list, :module},
2794         description:
2795           "Module names are shortened (removed leading `Pleroma.HTML.` part), but on adding custom module you need to use full name.",
2796         suggestions: [Pleroma.HTML.Transform.MediaProxy, Pleroma.HTML.Scrubber.Default]
2797       }
2798     ]
2799   },
2800   %{
2801     group: :pleroma,
2802     key: :user,
2803     type: :group,
2804     children: [
2805       %{
2806         key: :deny_follow_blocked,
2807         type: :boolean
2808       }
2809     ]
2810   },
2811   %{
2812     group: :pleroma,
2813     key: Pleroma.User,
2814     type: :group,
2815     children: [
2816       %{
2817         key: :restricted_nicknames,
2818         type: {:list, :string},
2819         description: "List of nicknames users may not register with.",
2820         suggestions: [
2821           ".well-known",
2822           "~",
2823           "about",
2824           "activities",
2825           "api",
2826           "auth",
2827           "check_password",
2828           "dev",
2829           "friend-requests",
2830           "inbox",
2831           "internal",
2832           "main",
2833           "media",
2834           "nodeinfo",
2835           "notice",
2836           "oauth",
2837           "objects",
2838           "ostatus_subscribe",
2839           "pleroma",
2840           "proxy",
2841           "push",
2842           "registration",
2843           "relay",
2844           "settings",
2845           "status",
2846           "tag",
2847           "user-search",
2848           "user_exists",
2849           "users",
2850           "web"
2851         ]
2852       },
2853       %{
2854         key: :email_blacklist,
2855         type: {:list, :string},
2856         description: "List of email domains users may not register with.",
2857         suggestions: ["mailinator.com", "maildrop.cc"]
2858       }
2859     ]
2860   },
2861   %{
2862     group: :cors_plug,
2863     label: "CORS plug config",
2864     type: :group,
2865     children: [
2866       %{
2867         key: :max_age,
2868         type: :integer,
2869         suggestions: [86_400]
2870       },
2871       %{
2872         key: :methods,
2873         type: {:list, :string},
2874         suggestions: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"]
2875       },
2876       %{
2877         key: :expose,
2878         type: {:list, :string},
2879         suggestions: [
2880           "Link",
2881           "X-RateLimit-Reset",
2882           "X-RateLimit-Limit",
2883           "X-RateLimit-Remaining",
2884           "X-Request-Id",
2885           "Idempotency-Key"
2886         ]
2887       },
2888       %{
2889         key: :credentials,
2890         type: :boolean
2891       },
2892       %{
2893         key: :headers,
2894         type: {:list, :string},
2895         suggestions: ["Authorization", "Content-Type", "Idempotency-Key"]
2896       }
2897     ]
2898   },
2899   %{
2900     group: :pleroma,
2901     key: Pleroma.Web.Plugs.RemoteIp,
2902     type: :group,
2903     description: """
2904     `Pleroma.Web.Plugs.RemoteIp` is a shim to call [`RemoteIp`](https://git.pleroma.social/pleroma/remote_ip) but with runtime configuration.
2905     **If your instance is not behind at least one reverse proxy, you should not enable this plug.**
2906     """,
2907     children: [
2908       %{
2909         key: :enabled,
2910         type: :boolean,
2911         description: "Enable/disable the plug. Default: disabled."
2912       },
2913       %{
2914         key: :headers,
2915         type: {:list, :string},
2916         description: """
2917           A list of strings naming the HTTP headers to use when deriving the true client IP. Default: `["x-forwarded-for"]`.
2918         """
2919       },
2920       %{
2921         key: :proxies,
2922         type: {:list, :string},
2923         description:
2924           "A list of upstream proxy IP subnets in CIDR notation from which we will parse the content of `headers`. Defaults to `[]`. IPv4 entries without a bitmask will be assumed to be /32 and IPv6 /128."
2925       },
2926       %{
2927         key: :reserved,
2928         type: {:list, :string},
2929         description: """
2930           A list of reserved IP subnets in CIDR notation which should be ignored if found in `headers`. Defaults to `["127.0.0.0/8", "::1/128", "fc00::/7", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]`
2931         """
2932       }
2933     ]
2934   },
2935   %{
2936     group: :pleroma,
2937     key: :web_cache_ttl,
2938     label: "Web cache TTL",
2939     type: :group,
2940     description:
2941       "The expiration time for the web responses cache. Values should be in milliseconds or `nil` to disable expiration.",
2942     children: [
2943       %{
2944         key: :activity_pub,
2945         type: :integer,
2946         description:
2947           "Activity pub routes (except question activities). Default: `nil` (no expiration).",
2948         suggestions: [nil]
2949       },
2950       %{
2951         key: :activity_pub_question,
2952         type: :integer,
2953         description: "Activity pub routes (question activities). Default: `30_000` (30 seconds).",
2954         suggestions: [30_000]
2955       }
2956     ]
2957   },
2958   %{
2959     group: :pleroma,
2960     key: :static_fe,
2961     label: "Static FE",
2962     type: :group,
2963     description:
2964       "Render profiles and posts using server-generated HTML that is viewable without using JavaScript",
2965     children: [
2966       %{
2967         key: :enabled,
2968         type: :boolean,
2969         description: "Enables the rendering of static HTML. Default: disabled."
2970       }
2971     ]
2972   },
2973   %{
2974     group: :pleroma,
2975     key: :feed,
2976     type: :group,
2977     description: "Configure feed rendering",
2978     children: [
2979       %{
2980         key: :post_title,
2981         type: :map,
2982         description: "Configure title rendering",
2983         children: [
2984           %{
2985             key: :max_length,
2986             type: :integer,
2987             description: "Maximum number of characters before truncating title",
2988             suggestions: [100]
2989           },
2990           %{
2991             key: :omission,
2992             type: :string,
2993             description: "Replacement which will be used after truncating string",
2994             suggestions: ["..."]
2995           }
2996         ]
2997       }
2998     ]
2999   },
3000   %{
3001     group: :pleroma,
3002     key: :mrf_follow_bot,
3003     tab: :mrf,
3004     related_policy: "Pleroma.Web.ActivityPub.MRF.FollowBotPolicy",
3005     label: "MRF FollowBot Policy",
3006     type: :group,
3007     description: "Automatically follows newly discovered accounts.",
3008     children: [
3009       %{
3010         key: :follower_nickname,
3011         type: :string,
3012         description: "The name of the bot account to use for following newly discovered users.",
3013         suggestions: ["followbot"]
3014       }
3015     ]
3016   },
3017   %{
3018     group: :pleroma,
3019     key: :modules,
3020     type: :group,
3021     description: "Custom Runtime Modules",
3022     children: [
3023       %{
3024         key: :runtime_dir,
3025         type: :string,
3026         description: "A path to custom Elixir modules (such as MRF policies)."
3027       }
3028     ]
3029   },
3030   %{
3031     group: :pleroma,
3032     key: :streamer,
3033     type: :group,
3034     description: "Settings for notifications streamer",
3035     children: [
3036       %{
3037         key: :workers,
3038         type: :integer,
3039         description: "Number of workers to send notifications",
3040         suggestions: [3]
3041       },
3042       %{
3043         key: :overflow_workers,
3044         type: :integer,
3045         description: "Maximum number of workers created if pool is empty",
3046         suggestions: [2]
3047       }
3048     ]
3049   },
3050   %{
3051     group: :pleroma,
3052     key: :connections_pool,
3053     type: :group,
3054     description: "Advanced settings for `Gun` connections pool",
3055     children: [
3056       %{
3057         key: :connection_acquisition_wait,
3058         type: :integer,
3059         description:
3060           "Timeout to acquire a connection from pool. The total max time is this value multiplied by the number of retries. Default: 250ms.",
3061         suggestions: [250]
3062       },
3063       %{
3064         key: :connection_acquisition_retries,
3065         type: :integer,
3066         description:
3067           "Number of attempts to acquire the connection from the pool if it is overloaded. Default: 5",
3068         suggestions: [5]
3069       },
3070       %{
3071         key: :max_connections,
3072         type: :integer,
3073         description: "Maximum number of connections in the pool. Default: 250 connections.",
3074         suggestions: [250]
3075       },
3076       %{
3077         key: :connect_timeout,
3078         type: :integer,
3079         description: "Timeout while `gun` will wait until connection is up. Default: 5000ms.",
3080         suggestions: [5000]
3081       },
3082       %{
3083         key: :reclaim_multiplier,
3084         type: :integer,
3085         description:
3086           "Multiplier for the number of idle connection to be reclaimed if the pool is full. For example if the pool maxes out at 250 connections and this setting is set to 0.3, the pool will reclaim at most 75 idle connections if it's overloaded. Default: 0.1",
3087         suggestions: [0.1]
3088       }
3089     ]
3090   },
3091   %{
3092     group: :pleroma,
3093     key: :pools,
3094     type: :group,
3095     description: "Advanced settings for `Gun` workers pools",
3096     children:
3097       Enum.map([:federation, :media, :upload, :default], fn pool_name ->
3098         %{
3099           key: pool_name,
3100           type: :keyword,
3101           description: "Settings for #{pool_name} pool.",
3102           children: [
3103             %{
3104               key: :size,
3105               type: :integer,
3106               description: "Maximum number of concurrent requests in the pool.",
3107               suggestions: [50]
3108             },
3109             %{
3110               key: :max_waiting,
3111               type: :integer,
3112               description:
3113                 "Maximum number of requests waiting for other requests to finish. After this number is reached, the pool will start returning errors when a new request is made",
3114               suggestions: [10]
3115             },
3116             %{
3117               key: :recv_timeout,
3118               type: :integer,
3119               description: "Timeout for the pool while gun will wait for response",
3120               suggestions: [10_000]
3121             }
3122           ]
3123         }
3124       end)
3125   },
3126   %{
3127     group: :pleroma,
3128     key: :hackney_pools,
3129     type: :group,
3130     description: "Advanced settings for `Hackney` connections pools",
3131     children: [
3132       %{
3133         key: :federation,
3134         type: :keyword,
3135         description: "Settings for federation pool.",
3136         children: [
3137           %{
3138             key: :max_connections,
3139             type: :integer,
3140             description: "Number workers in the pool.",
3141             suggestions: [50]
3142           },
3143           %{
3144             key: :timeout,
3145             type: :integer,
3146             description: "Timeout while `hackney` will wait for response.",
3147             suggestions: [150_000]
3148           }
3149         ]
3150       },
3151       %{
3152         key: :media,
3153         type: :keyword,
3154         description: "Settings for media pool.",
3155         children: [
3156           %{
3157             key: :max_connections,
3158             type: :integer,
3159             description: "Number workers in the pool.",
3160             suggestions: [50]
3161           },
3162           %{
3163             key: :timeout,
3164             type: :integer,
3165             description: "Timeout while `hackney` will wait for response.",
3166             suggestions: [150_000]
3167           }
3168         ]
3169       },
3170       %{
3171         key: :upload,
3172         type: :keyword,
3173         description: "Settings for upload pool.",
3174         children: [
3175           %{
3176             key: :max_connections,
3177             type: :integer,
3178             description: "Number workers in the pool.",
3179             suggestions: [25]
3180           },
3181           %{
3182             key: :timeout,
3183             type: :integer,
3184             description: "Timeout while `hackney` will wait for response.",
3185             suggestions: [300_000]
3186           }
3187         ]
3188       }
3189     ]
3190   },
3191   %{
3192     group: :pleroma,
3193     key: :restrict_unauthenticated,
3194     label: "Restrict Unauthenticated",
3195     type: :group,
3196     description:
3197       "Disallow viewing timelines, user profiles and statuses for unauthenticated users.",
3198     children: [
3199       %{
3200         key: :timelines,
3201         type: :map,
3202         description: "Settings for public and federated timelines.",
3203         children: [
3204           %{
3205             key: :local,
3206             type: :boolean,
3207             description: "Disallow view public timeline."
3208           },
3209           %{
3210             key: :federated,
3211             type: :boolean,
3212             description: "Disallow view federated timeline."
3213           }
3214         ]
3215       },
3216       %{
3217         key: :profiles,
3218         type: :map,
3219         description: "Settings for user profiles.",
3220         children: [
3221           %{
3222             key: :local,
3223             type: :boolean,
3224             description: "Disallow view local user profiles."
3225           },
3226           %{
3227             key: :remote,
3228             type: :boolean,
3229             description: "Disallow view remote user profiles."
3230           }
3231         ]
3232       },
3233       %{
3234         key: :activities,
3235         type: :map,
3236         description: "Settings for statuses.",
3237         children: [
3238           %{
3239             key: :local,
3240             type: :boolean,
3241             description: "Disallow view local statuses."
3242           },
3243           %{
3244             key: :remote,
3245             type: :boolean,
3246             description: "Disallow view remote statuses."
3247           }
3248         ]
3249       }
3250     ]
3251   },
3252   %{
3253     group: :pleroma,
3254     key: Pleroma.Web.ApiSpec.CastAndValidate,
3255     type: :group,
3256     children: [
3257       %{
3258         key: :strict,
3259         type: :boolean,
3260         description:
3261           "Enables strict input validation (useful in development, not recommended in production)"
3262       }
3263     ]
3264   },
3265   %{
3266     group: :pleroma,
3267     key: :instances_favicons,
3268     type: :group,
3269     description: "Control favicons for instances",
3270     children: [
3271       %{
3272         key: :enabled,
3273         type: :boolean,
3274         description: "Allow/disallow displaying and getting instances favicons"
3275       }
3276     ]
3277   },
3278   %{
3279     group: :ex_aws,
3280     key: :s3,
3281     type: :group,
3282     descriptions: "S3 service related settings",
3283     children: [
3284       %{
3285         key: :access_key_id,
3286         type: :string,
3287         description: "S3 access key ID",
3288         suggestions: ["AKIAQ8UKHTGIYN7DMWWJ"]
3289       },
3290       %{
3291         key: :secret_access_key,
3292         type: :string,
3293         description: "Secret access key",
3294         suggestions: ["JFGt+fgH1UQ7vLUQjpW+WvjTdV/UNzVxcwn7DkaeFKtBS5LvoXvIiME4NQBsT6ZZ"]
3295       },
3296       %{
3297         key: :host,
3298         type: :string,
3299         description: "S3 host",
3300         suggestions: ["s3.eu-central-1.amazonaws.com"]
3301       },
3302       %{
3303         key: :region,
3304         type: :string,
3305         description: "S3 region (for AWS)",
3306         suggestions: ["us-east-1"]
3307       }
3308     ]
3309   },
3310   %{
3311     group: :pleroma,
3312     key: :frontends,
3313     type: :group,
3314     description: "Installed frontends management",
3315     children: [
3316       %{
3317         key: :primary,
3318         type: :map,
3319         description: "Primary frontend, the one that is served for all pages by default",
3320         children: installed_frontend_options
3321       },
3322       %{
3323         key: :admin,
3324         type: :map,
3325         description: "Admin frontend",
3326         children: installed_frontend_options
3327       },
3328       %{
3329         key: :available,
3330         type: :map,
3331         description:
3332           "A map containing available frontends and parameters for their installation.",
3333         children: frontend_options
3334       }
3335     ]
3336   },
3337   %{
3338     group: :pleroma,
3339     key: Pleroma.Web.Preload,
3340     type: :group,
3341     description: "Preload-related settings",
3342     children: [
3343       %{
3344         key: :providers,
3345         type: {:list, :module},
3346         description: "List of preload providers to enable",
3347         suggestions: [
3348           Pleroma.Web.Preload.Providers.Instance,
3349           Pleroma.Web.Preload.Providers.User,
3350           Pleroma.Web.Preload.Providers.Timelines,
3351           Pleroma.Web.Preload.Providers.StatusNet
3352         ]
3353       }
3354     ]
3355   },
3356   %{
3357     group: :pleroma,
3358     key: :majic_pool,
3359     type: :group,
3360     description: "Majic/libmagic configuration",
3361     children: [
3362       %{
3363         key: :size,
3364         type: :integer,
3365         description: "Number of majic workers to start.",
3366         suggestions: [2]
3367       }
3368     ]
3369   },
3370   %{
3371     group: :pleroma,
3372     key: Pleroma.User.Backup,
3373     type: :group,
3374     description: "Account Backup",
3375     children: [
3376       %{
3377         key: :purge_after_days,
3378         type: :integer,
3379         description: "Remove backup archives after N days",
3380         suggestions: [30]
3381       },
3382       %{
3383         key: :limit_days,
3384         type: :integer,
3385         description: "Limit user to export not more often than once per N days",
3386         suggestions: [7]
3387       },
3388       %{
3389         key: :process_wait_time,
3390         type: :integer,
3391         label: "Process Wait Time",
3392         description:
3393           "The amount of time to wait for backup to report progress, in milliseconds. If no progress is received from the backup job for that much time, terminate it and deem it failed.",
3394         suggestions: [30_000]
3395       },
3396       %{
3397         key: :process_chunk_size,
3398         type: :integer,
3399         label: "Process Chunk Size",
3400         description: "The number of activities to fetch in the backup job for each chunk.",
3401         suggestions: [100]
3402       }
3403     ]
3404   },
3405   %{
3406     group: :prometheus,
3407     key: Pleroma.Web.Endpoint.MetricsExporter,
3408     type: :group,
3409     description: "Prometheus app metrics endpoint configuration",
3410     children: [
3411       %{
3412         key: :enabled,
3413         type: :boolean,
3414         description: "[Pleroma extension] Enables app metrics endpoint."
3415       },
3416       %{
3417         key: :ip_whitelist,
3418         label: "IP Whitelist",
3419         type: [{:list, :string}, {:list, :charlist}, {:list, :tuple}],
3420         description: "Restrict access of app metrics endpoint to the specified IP addresses."
3421       },
3422       %{
3423         key: :auth,
3424         type: [:boolean, :tuple],
3425         description: "Enables HTTP Basic Auth for app metrics endpoint.",
3426         suggestion: [false, {:basic, "myusername", "mypassword"}]
3427       },
3428       %{
3429         key: :path,
3430         type: :string,
3431         description: "App metrics endpoint URI path.",
3432         suggestions: ["/api/pleroma/app_metrics"]
3433       },
3434       %{
3435         key: :format,
3436         type: :atom,
3437         description: "App metrics endpoint output format.",
3438         suggestions: [:text, :protobuf]
3439       }
3440     ]
3441   },
3442   %{
3443     group: :pleroma,
3444     key: ConcurrentLimiter,
3445     type: :group,
3446     description: "Limits configuration for background tasks.",
3447     children: [
3448       %{
3449         key: Pleroma.Web.RichMedia.Helpers,
3450         type: :keyword,
3451         description: "Concurrent limits configuration for getting RichMedia for activities.",
3452         suggestions: [max_running: 5, max_waiting: 5],
3453         children: [
3454           %{
3455             key: :max_running,
3456             type: :integer,
3457             description: "Max running concurrently jobs.",
3458             suggestion: [5]
3459           },
3460           %{
3461             key: :max_waiting,
3462             type: :integer,
3463             description: "Max waiting jobs.",
3464             suggestion: [5]
3465           }
3466         ]
3467       },
3468       %{
3469         key: Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy,
3470         type: :keyword,
3471         description: "Concurrent limits configuration for MediaProxyWarmingPolicy.",
3472         suggestions: [max_running: 5, max_waiting: 5],
3473         children: [
3474           %{
3475             key: :max_running,
3476             type: :integer,
3477             description: "Max running concurrently jobs.",
3478             suggestion: [5]
3479           },
3480           %{
3481             key: :max_waiting,
3482             type: :integer,
3483             description: "Max waiting jobs.",
3484             suggestion: [5]
3485           }
3486         ]
3487       }
3488     ]
3489   },
3490   %{
3491     group: :pleroma,
3492     key: Pleroma.Search,
3493     type: :group,
3494     description: "General search settings.",
3495     children: [
3496       %{
3497         key: :module,
3498         type: :keyword,
3499         description: "Selected search module.",
3500         suggestion: [Pleroma.Search.DatabaseSearch, Pleroma.Search.Meilisearch]
3501       }
3502     ]
3503   },
3504   %{
3505     group: :pleroma,
3506     key: Pleroma.Search.Meilisearch,
3507     type: :group,
3508     description: "Meilisearch settings.",
3509     children: [
3510       %{
3511         key: :url,
3512         type: :string,
3513         description: "Meilisearch URL.",
3514         suggestion: ["http://127.0.0.1:7700/"]
3515       },
3516       %{
3517         key: :private_key,
3518         type: :string,
3519         description:
3520           "Private key for meilisearch authentication, or `nil` to disable private key authentication.",
3521         suggestion: [nil]
3522       },
3523       %{
3524         key: :initial_indexing_chunk_size,
3525         type: :integer,
3526         description:
3527           "Amount of posts in a batch when running the initial indexing operation. Should probably not be more than 100000" <>
3528             " since there's a limit on maximum insert size",
3529         suggestion: [100_000]
3530       }
3531     ]
3532   }
3533 ]