purge chat and shout endpoints
[akkoma] / 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: :instance,
501 type: :group,
502 description: "Instance-related settings",
503 children: [
504 %{
505 key: :name,
506 type: :string,
507 description: "Name of the instance",
508 suggestions: [
509 "Pleroma"
510 ]
511 },
512 %{
513 key: :email,
514 label: "Admin Email Address",
515 type: :string,
516 description: "Email used to reach an Administrator/Moderator of the instance",
517 suggestions: [
518 "email@example.com"
519 ]
520 },
521 %{
522 key: :notify_email,
523 label: "Sender Email Address",
524 type: :string,
525 description: "Envelope FROM address for mail sent via Pleroma",
526 suggestions: [
527 "notify@example.com"
528 ]
529 },
530 %{
531 key: :description,
532 type: :string,
533 description:
534 "The instance's description. It can be seen in nodeinfo and `/api/v1/instance`",
535 suggestions: [
536 "Very cool instance"
537 ]
538 },
539 %{
540 key: :limit,
541 type: :integer,
542 description: "Posts character limit (CW/Subject included in the counter)",
543 suggestions: [
544 5_000
545 ]
546 },
547 %{
548 key: :remote_limit,
549 type: :integer,
550 description: "Hard character limit beyond which remote posts will be dropped",
551 suggestions: [
552 100_000
553 ]
554 },
555 %{
556 key: :upload_limit,
557 type: :integer,
558 description: "File size limit of uploads (except for avatar, background, banner)",
559 suggestions: [
560 16_000_000
561 ]
562 },
563 %{
564 key: :avatar_upload_limit,
565 type: :integer,
566 description: "File size limit of user's profile avatars",
567 suggestions: [
568 2_000_000
569 ]
570 },
571 %{
572 key: :background_upload_limit,
573 type: :integer,
574 description: "File size limit of user's profile backgrounds",
575 suggestions: [
576 4_000_000
577 ]
578 },
579 %{
580 key: :banner_upload_limit,
581 type: :integer,
582 description: "File size limit of user's profile banners",
583 suggestions: [
584 4_000_000
585 ]
586 },
587 %{
588 key: :poll_limits,
589 type: :map,
590 description: "A map with poll limits for local polls",
591 suggestions: [
592 %{
593 max_options: 20,
594 max_option_chars: 200,
595 min_expiration: 0,
596 max_expiration: 31_536_000
597 }
598 ],
599 children: [
600 %{
601 key: :max_options,
602 type: :integer,
603 description: "Maximum number of options",
604 suggestions: [20]
605 },
606 %{
607 key: :max_option_chars,
608 type: :integer,
609 description: "Maximum number of characters per option",
610 suggestions: [200]
611 },
612 %{
613 key: :min_expiration,
614 type: :integer,
615 description: "Minimum expiration time (in seconds)",
616 suggestions: [0]
617 },
618 %{
619 key: :max_expiration,
620 type: :integer,
621 description: "Maximum expiration time (in seconds)",
622 suggestions: [3600]
623 }
624 ]
625 },
626 %{
627 key: :registrations_open,
628 type: :boolean,
629 description:
630 "Enable registrations for anyone. Invitations require this setting to be disabled."
631 },
632 %{
633 key: :invites_enabled,
634 type: :boolean,
635 description:
636 "Enable user invitations for admins (depends on `registrations_open` being disabled)"
637 },
638 %{
639 key: :account_activation_required,
640 type: :boolean,
641 description: "Require users to confirm their emails before signing in"
642 },
643 %{
644 key: :account_approval_required,
645 type: :boolean,
646 description: "Require users to be manually approved by an admin before signing in"
647 },
648 %{
649 key: :federating,
650 type: :boolean,
651 description: "Enable federation with other instances"
652 },
653 %{
654 key: :federation_incoming_replies_max_depth,
655 label: "Fed. incoming replies max depth",
656 type: :integer,
657 description:
658 "Max. depth of reply-to and reply activities fetching on incoming federation, to prevent out-of-memory situations while" <>
659 " 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.",
660 suggestions: [
661 100
662 ]
663 },
664 %{
665 key: :federation_reachability_timeout_days,
666 label: "Fed. reachability timeout days",
667 type: :integer,
668 description:
669 "Timeout (in days) of each external federation target being unreachable prior to pausing federating to it",
670 suggestions: [
671 7
672 ]
673 },
674 %{
675 key: :allow_relay,
676 type: :boolean,
677 description:
678 "Permits remote instances to subscribe to all public posts of your instance. (Important!) This may increase the visibility of your instance."
679 },
680 %{
681 key: :public,
682 type: :boolean,
683 description:
684 "Makes the client API in authenticated mode-only except for user-profiles." <>
685 " Useful for disabling the Local Timeline and The Whole Known Network. " <>
686 " Note: when setting to `false`, please also check `:restrict_unauthenticated` setting."
687 },
688 %{
689 key: :quarantined_instances,
690 type: {:list, :tuple},
691 key_placeholder: "instance",
692 value_placeholder: "reason",
693 description:
694 "List of ActivityPub instances where private (DMs, followers-only) activities will not be sent and the reason for doing so",
695 suggestions: [
696 {"quarantined.com", "Reason"},
697 {"*.quarantined.com", "Reason"}
698 ]
699 },
700 %{
701 key: :static_dir,
702 type: :string,
703 description: "Instance static directory",
704 suggestions: [
705 "instance/static/"
706 ]
707 },
708 %{
709 key: :allowed_post_formats,
710 type: {:list, :string},
711 description: "MIME-type list of formats allowed to be posted (transformed into HTML)",
712 suggestions: [
713 "text/plain",
714 "text/html",
715 "text/markdown",
716 "text/bbcode"
717 ]
718 },
719 %{
720 key: :extended_nickname_format,
721 type: :boolean,
722 description:
723 "Enable to use extended local nicknames format (allows underscores/dashes)." <>
724 " This will break federation with older software for theses nicknames."
725 },
726 %{
727 key: :cleanup_attachments,
728 type: :boolean,
729 description: """
730 Enable to remove associated attachments when status is removed.
731 This will not affect duplicates and attachments without status.
732 Enabling this will increase load to database when deleting statuses on larger instances.
733 """
734 },
735 %{
736 key: :max_pinned_statuses,
737 type: :integer,
738 description: "The maximum number of pinned statuses. 0 will disable the feature.",
739 suggestions: [
740 0,
741 1,
742 3
743 ]
744 },
745 %{
746 key: :autofollowed_nicknames,
747 type: {:list, :string},
748 description:
749 "Set to nicknames of (local) users that every new user should automatically follow"
750 },
751 %{
752 key: :autofollowing_nicknames,
753 type: {:list, :string},
754 description:
755 "Set to nicknames of (local) users that automatically follows every newly registered user"
756 },
757 %{
758 key: :attachment_links,
759 type: :boolean,
760 description: "Enable to automatically add attachment link text to statuses"
761 },
762 %{
763 key: :max_report_comment_size,
764 type: :integer,
765 description: "The maximum size of the report comment. Default: 1000.",
766 suggestions: [
767 1_000
768 ]
769 },
770 %{
771 key: :safe_dm_mentions,
772 label: "Safe DM mentions",
773 type: :boolean,
774 description:
775 "If enabled, only mentions at the beginning of a post will be used to address people in direct messages." <>
776 " This is to prevent accidental mentioning of people when talking about them (e.g. \"@admin please keep an eye on @bad_actor\")." <>
777 " Default: disabled"
778 },
779 %{
780 key: :healthcheck,
781 type: :boolean,
782 description: "If enabled, system data will be shown on `/api/pleroma/healthcheck`"
783 },
784 %{
785 key: :remote_post_retention_days,
786 type: :integer,
787 description:
788 "The default amount of days to retain remote posts when pruning the database",
789 suggestions: [
790 90
791 ]
792 },
793 %{
794 key: :user_bio_length,
795 type: :integer,
796 description: "A user bio maximum length. Default: 5000.",
797 suggestions: [
798 5_000
799 ]
800 },
801 %{
802 key: :user_name_length,
803 type: :integer,
804 description: "A user name maximum length. Default: 100.",
805 suggestions: [
806 100
807 ]
808 },
809 %{
810 key: :skip_thread_containment,
811 type: :boolean,
812 description: "Skip filtering out broken threads. Default: enabled."
813 },
814 %{
815 key: :limit_to_local_content,
816 type: {:dropdown, :atom},
817 description:
818 "Limit unauthenticated users to search for local statutes and users only. Default: `:unauthenticated`.",
819 suggestions: [
820 :unauthenticated,
821 :all,
822 false
823 ]
824 },
825 %{
826 key: :max_account_fields,
827 type: :integer,
828 description: "The maximum number of custom fields in the user profile. Default: 10.",
829 suggestions: [
830 10
831 ]
832 },
833 %{
834 key: :max_remote_account_fields,
835 type: :integer,
836 description:
837 "The maximum number of custom fields in the remote user profile. Default: 20.",
838 suggestions: [
839 20
840 ]
841 },
842 %{
843 key: :account_field_name_length,
844 type: :integer,
845 description: "An account field name maximum length. Default: 512.",
846 suggestions: [
847 512
848 ]
849 },
850 %{
851 key: :account_field_value_length,
852 type: :integer,
853 description: "An account field value maximum length. Default: 2048.",
854 suggestions: [
855 2048
856 ]
857 },
858 %{
859 key: :registration_reason_length,
860 type: :integer,
861 description: "Maximum registration reason length. Default: 500.",
862 suggestions: [
863 500
864 ]
865 },
866 %{
867 key: :external_user_synchronization,
868 type: :boolean,
869 description: "Enabling following/followers counters synchronization for external users"
870 },
871 %{
872 key: :multi_factor_authentication,
873 type: :keyword,
874 description: "Multi-factor authentication settings",
875 suggestions: [
876 [
877 totp: [digits: 6, period: 30],
878 backup_codes: [number: 5, length: 16]
879 ]
880 ],
881 children: [
882 %{
883 key: :totp,
884 label: "TOTP settings",
885 type: :keyword,
886 description: "TOTP settings",
887 suggestions: [digits: 6, period: 30],
888 children: [
889 %{
890 key: :digits,
891 type: :integer,
892 suggestions: [6],
893 description:
894 "Determines the length of a one-time pass-code, in characters. Defaults to 6 characters."
895 },
896 %{
897 key: :period,
898 type: :integer,
899 suggestions: [30],
900 description:
901 "A period for which the TOTP code will be valid, in seconds. Defaults to 30 seconds."
902 }
903 ]
904 },
905 %{
906 key: :backup_codes,
907 type: :keyword,
908 description: "MFA backup codes settings",
909 suggestions: [number: 5, length: 16],
910 children: [
911 %{
912 key: :number,
913 type: :integer,
914 suggestions: [5],
915 description: "Number of backup codes to generate."
916 },
917 %{
918 key: :length,
919 type: :integer,
920 suggestions: [16],
921 description:
922 "Determines the length of backup one-time pass-codes, in characters. Defaults to 16 characters."
923 }
924 ]
925 }
926 ]
927 },
928 %{
929 key: :instance_thumbnail,
930 type: {:string, :image},
931 description:
932 "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.",
933 suggestions: ["/instance/thumbnail.jpeg"]
934 },
935 %{
936 key: :show_reactions,
937 type: :boolean,
938 description: "Let favourites and emoji reactions be viewed through the API."
939 },
940 %{
941 key: :profile_directory,
942 type: :boolean,
943 description: "Enable profile directory."
944 },
945 %{
946 key: :privileged_staff,
947 type: :boolean,
948 description:
949 "Let moderators access sensitive data (e.g. updating user credentials, get password reset token, delete users, index and read private statuses)"
950 }
951 ]
952 },
953 %{
954 group: :pleroma,
955 key: :welcome,
956 type: :group,
957 description: "Welcome messages settings",
958 children: [
959 %{
960 key: :direct_message,
961 type: :keyword,
962 descpiption: "Direct message settings",
963 children: [
964 %{
965 key: :enabled,
966 type: :boolean,
967 description: "Enables sending a direct message to newly registered users"
968 },
969 %{
970 key: :message,
971 type: :string,
972 description: "A message that will be sent to newly registered users",
973 suggestions: [
974 "Hi, @username! Welcome on board!"
975 ]
976 },
977 %{
978 key: :sender_nickname,
979 type: :string,
980 description: "The nickname of the local user that sends a welcome message",
981 suggestions: [
982 "lain"
983 ]
984 }
985 ]
986 },
987 %{
988 key: :email,
989 type: :keyword,
990 descpiption: "Email message settings",
991 children: [
992 %{
993 key: :enabled,
994 type: :boolean,
995 description: "Enables sending an email to newly registered users"
996 },
997 %{
998 key: :sender,
999 type: [:string, :tuple],
1000 description:
1001 "Email address and/or nickname that will be used to send the welcome email.",
1002 suggestions: [
1003 {"Pleroma App", "welcome@pleroma.app"}
1004 ]
1005 },
1006 %{
1007 key: :subject,
1008 type: :string,
1009 description:
1010 "Subject of the welcome email. EEX template with user and instance_name variables can be used.",
1011 suggestions: ["Welcome to <%= instance_name%>"]
1012 },
1013 %{
1014 key: :html,
1015 type: :string,
1016 description:
1017 "HTML content of the welcome email. EEX template with user and instance_name variables can be used.",
1018 suggestions: ["<h1>Hello <%= user.name%>. Welcome to <%= instance_name%></h1>"]
1019 },
1020 %{
1021 key: :text,
1022 type: :string,
1023 description:
1024 "Text content of the welcome email. EEX template with user and instance_name variables can be used.",
1025 suggestions: ["Hello <%= user.name%>. \n Welcome to <%= instance_name%>\n"]
1026 }
1027 ]
1028 }
1029 ]
1030 },
1031 %{
1032 group: :logger,
1033 type: :group,
1034 description: "Logger-related settings",
1035 children: [
1036 %{
1037 key: :backends,
1038 type: [:atom, :tuple, :module],
1039 description:
1040 "Where logs will be sent, :console - send logs to stdout, { ExSyslogger, :ex_syslogger } - to syslog, Quack.Logger - to Slack.",
1041 suggestions: [:console, {ExSyslogger, :ex_syslogger}, Quack.Logger]
1042 }
1043 ]
1044 },
1045 %{
1046 group: :logger,
1047 type: :group,
1048 key: :ex_syslogger,
1049 label: "ExSyslogger",
1050 description: "ExSyslogger-related settings",
1051 children: [
1052 %{
1053 key: :level,
1054 type: {:dropdown, :atom},
1055 description: "Log level",
1056 suggestions: [:debug, :info, :warn, :error]
1057 },
1058 %{
1059 key: :ident,
1060 type: :string,
1061 description:
1062 "A string that's prepended to every message, and is typically set to the app name",
1063 suggestions: ["pleroma"]
1064 },
1065 %{
1066 key: :format,
1067 type: :string,
1068 description: "Default: \"$date $time [$level] $levelpad$node $metadata $message\"",
1069 suggestions: ["$metadata[$level] $message"]
1070 },
1071 %{
1072 key: :metadata,
1073 type: {:list, :atom},
1074 suggestions: [:request_id]
1075 }
1076 ]
1077 },
1078 %{
1079 group: :logger,
1080 type: :group,
1081 key: :console,
1082 label: "Console Logger",
1083 description: "Console logger settings",
1084 children: [
1085 %{
1086 key: :level,
1087 type: {:dropdown, :atom},
1088 description: "Log level",
1089 suggestions: [:debug, :info, :warn, :error]
1090 },
1091 %{
1092 key: :format,
1093 type: :string,
1094 description: "Default: \"$date $time [$level] $levelpad$node $metadata $message\"",
1095 suggestions: ["$metadata[$level] $message"]
1096 },
1097 %{
1098 key: :metadata,
1099 type: {:list, :atom},
1100 suggestions: [:request_id]
1101 }
1102 ]
1103 },
1104 %{
1105 group: :quack,
1106 type: :group,
1107 label: "Quack Logger",
1108 description: "Quack-related settings",
1109 children: [
1110 %{
1111 key: :level,
1112 type: {:dropdown, :atom},
1113 description: "Log level",
1114 suggestions: [:debug, :info, :warn, :error]
1115 },
1116 %{
1117 key: :meta,
1118 type: {:list, :atom},
1119 description: "Configure which metadata you want to report on",
1120 suggestions: [
1121 :application,
1122 :module,
1123 :file,
1124 :function,
1125 :line,
1126 :pid,
1127 :crash_reason,
1128 :initial_call,
1129 :registered_name,
1130 :all,
1131 :none
1132 ]
1133 },
1134 %{
1135 key: :webhook_url,
1136 label: "Webhook URL",
1137 type: :string,
1138 description: "Configure the Slack incoming webhook",
1139 suggestions: ["https://hooks.slack.com/services/YOUR-KEY-HERE"]
1140 }
1141 ]
1142 },
1143 %{
1144 group: :pleroma,
1145 key: :frontend_configurations,
1146 type: :group,
1147 description:
1148 "This form can be used to configure a keyword list that keeps the configuration data for any " <>
1149 "kind of frontend. By default, settings for pleroma_fe and masto_fe are configured. If you want to " <>
1150 "add your own configuration your settings all fields must be complete.",
1151 children: [
1152 %{
1153 key: :pleroma_fe,
1154 label: "Pleroma FE",
1155 type: :map,
1156 description: "Settings for Pleroma FE",
1157 suggestions: [
1158 %{
1159 alwaysShowSubjectInput: true,
1160 background: "/static/aurora_borealis.jpg",
1161 collapseMessageWithSubject: false,
1162 greentext: false,
1163 hideFilteredStatuses: false,
1164 hideMutedPosts: false,
1165 hidePostStats: false,
1166 hideSitename: false,
1167 hideUserStats: false,
1168 loginMethod: "password",
1169 logo: "/static/logo.svg",
1170 logoMargin: ".1em",
1171 logoMask: true,
1172 minimalScopesMode: false,
1173 noAttachmentLinks: false,
1174 nsfwCensorImage: "/static/img/nsfw.74818f9.png",
1175 postContentType: "text/plain",
1176 redirectRootLogin: "/main/friends",
1177 redirectRootNoLogin: "/main/all",
1178 scopeCopy: true,
1179 sidebarRight: false,
1180 showFeaturesPanel: true,
1181 showInstanceSpecificPanel: false,
1182 subjectLineBehavior: "email",
1183 theme: "pleroma-dark",
1184 webPushNotifications: false
1185 }
1186 ],
1187 children: [
1188 %{
1189 key: :alwaysShowSubjectInput,
1190 label: "Always show subject input",
1191 type: :boolean,
1192 description: "When disabled, auto-hide the subject field if it's empty"
1193 },
1194 %{
1195 key: :background,
1196 type: {:string, :image},
1197 description:
1198 "URL of the background, unless viewing a user profile with a background that is set",
1199 suggestions: ["/images/city.jpg"]
1200 },
1201 %{
1202 key: :collapseMessageWithSubject,
1203 label: "Collapse message with subject",
1204 type: :boolean,
1205 description:
1206 "When a message has a subject (aka Content Warning), collapse it by default"
1207 },
1208 %{
1209 key: :greentext,
1210 label: "Greentext",
1211 type: :boolean,
1212 description: "Enables green text on lines prefixed with the > character"
1213 },
1214 %{
1215 key: :hideFilteredStatuses,
1216 label: "Hide Filtered Statuses",
1217 type: :boolean,
1218 description: "Hides filtered statuses from timelines"
1219 },
1220 %{
1221 key: :hideMutedPosts,
1222 label: "Hide Muted Posts",
1223 type: :boolean,
1224 description: "Hides muted statuses from timelines"
1225 },
1226 %{
1227 key: :hidePostStats,
1228 label: "Hide post stats",
1229 type: :boolean,
1230 description: "Hide notices statistics (repeats, favorites, ...)"
1231 },
1232 %{
1233 key: :hideSitename,
1234 label: "Hide Sitename",
1235 type: :boolean,
1236 description: "Hides instance name from PleromaFE banner"
1237 },
1238 %{
1239 key: :hideUserStats,
1240 label: "Hide user stats",
1241 type: :boolean,
1242 description:
1243 "Hide profile statistics (posts, posts per day, followers, followings, ...)"
1244 },
1245 %{
1246 key: :logo,
1247 type: {:string, :image},
1248 description: "URL of the logo, defaults to Pleroma's logo",
1249 suggestions: ["/static/logo.svg"]
1250 },
1251 %{
1252 key: :logoMargin,
1253 label: "Logo margin",
1254 type: :string,
1255 description:
1256 "Allows you to adjust vertical margins between logo boundary and navbar borders. " <>
1257 "The idea is that to have logo's image without any extra margins and instead adjust them to your need in layout.",
1258 suggestions: [".1em"]
1259 },
1260 %{
1261 key: :logoMask,
1262 label: "Logo mask",
1263 type: :boolean,
1264 description:
1265 "By default it assumes logo used will be monochrome with alpha channel to be compatible with both light and dark themes. " <>
1266 "If you want a colorful logo you must disable logoMask."
1267 },
1268 %{
1269 key: :minimalScopesMode,
1270 label: "Minimal scopes mode",
1271 type: :boolean,
1272 description:
1273 "Limit scope selection to Direct, User default, and Scope of post replying to. " <>
1274 "Also prevents replying to a DM with a public post from PleromaFE."
1275 },
1276 %{
1277 key: :nsfwCensorImage,
1278 label: "NSFW Censor Image",
1279 type: {:string, :image},
1280 description:
1281 "URL of the image to use for hiding NSFW media attachments in the timeline",
1282 suggestions: ["/static/img/nsfw.74818f9.png"]
1283 },
1284 %{
1285 key: :postContentType,
1286 label: "Post Content Type",
1287 type: {:dropdown, :atom},
1288 description: "Default post formatting option",
1289 suggestions: ["text/plain", "text/html", "text/markdown", "text/bbcode"]
1290 },
1291 %{
1292 key: :redirectRootNoLogin,
1293 label: "Redirect root no login",
1294 type: :string,
1295 description:
1296 "Relative URL which indicates where to redirect when a user isn't logged in",
1297 suggestions: ["/main/all"]
1298 },
1299 %{
1300 key: :redirectRootLogin,
1301 label: "Redirect root login",
1302 type: :string,
1303 description:
1304 "Relative URL which indicates where to redirect when a user is logged in",
1305 suggestions: ["/main/friends"]
1306 },
1307 %{
1308 key: :scopeCopy,
1309 label: "Scope copy",
1310 type: :boolean,
1311 description: "Copy the scope (private/unlisted/public) in replies to posts by default"
1312 },
1313 %{
1314 key: :sidebarRight,
1315 label: "Sidebar on Right",
1316 type: :boolean,
1317 description: "Change alignment of sidebar and panels to the right"
1318 },
1319 %{
1320 key: :showFeaturesPanel,
1321 label: "Show instance features panel",
1322 type: :boolean,
1323 description:
1324 "Enables panel displaying functionality of the instance on the About page"
1325 },
1326 %{
1327 key: :showInstanceSpecificPanel,
1328 label: "Show instance specific panel",
1329 type: :boolean,
1330 description: "Whether to show the instance's custom panel"
1331 },
1332 %{
1333 key: :subjectLineBehavior,
1334 label: "Subject line behavior",
1335 type: :string,
1336 description: "Allows changing the default behaviour of subject lines in replies.
1337 `email`: copy and preprend re:, as in email,
1338 `masto`: copy verbatim, as in Mastodon,
1339 `noop`: don't copy the subject.",
1340 suggestions: ["email", "masto", "noop"]
1341 },
1342 %{
1343 key: :theme,
1344 type: :string,
1345 description: "Which theme to use. Available themes are defined in styles.json",
1346 suggestions: ["pleroma-dark"]
1347 }
1348 ]
1349 },
1350 %{
1351 key: :masto_fe,
1352 label: "Masto FE",
1353 type: :map,
1354 description: "Settings for Masto FE",
1355 suggestions: [
1356 %{
1357 showInstanceSpecificPanel: true
1358 }
1359 ],
1360 children: [
1361 %{
1362 key: :showInstanceSpecificPanel,
1363 label: "Show instance specific panel",
1364 type: :boolean,
1365 description: "Whenether to show the instance's specific panel"
1366 }
1367 ]
1368 }
1369 ]
1370 },
1371 %{
1372 group: :pleroma,
1373 key: :assets,
1374 type: :group,
1375 description:
1376 "This section configures assets to be used with various frontends. Currently the only option relates to mascots on the mastodon frontend",
1377 children: [
1378 %{
1379 key: :mascots,
1380 type: {:keyword, :map},
1381 description:
1382 "Keyword of mascots, each element must contain both an URL and a mime_type key",
1383 suggestions: [
1384 pleroma_fox_tan: %{
1385 url: "/images/pleroma-fox-tan-smol.png",
1386 mime_type: "image/png"
1387 },
1388 pleroma_fox_tan_shy: %{
1389 url: "/images/pleroma-fox-tan-shy.png",
1390 mime_type: "image/png"
1391 }
1392 ]
1393 },
1394 %{
1395 key: :default_mascot,
1396 type: :atom,
1397 description:
1398 "This will be used as the default mascot on MastoFE. Default: `:pleroma_fox_tan`",
1399 suggestions: [
1400 :pleroma_fox_tan
1401 ]
1402 },
1403 %{
1404 key: :default_user_avatar,
1405 type: {:string, :image},
1406 description: "URL of the default user avatar",
1407 suggestions: ["/images/avi.png"]
1408 }
1409 ]
1410 },
1411 %{
1412 group: :pleroma,
1413 key: :manifest,
1414 type: :group,
1415 description:
1416 "This section describe PWA manifest instance-specific values. Currently this option relate only for MastoFE.",
1417 children: [
1418 %{
1419 key: :icons,
1420 type: {:list, :map},
1421 description: "Describe the icons of the app",
1422 suggestion: [
1423 %{
1424 src: "/static/logo.png"
1425 },
1426 %{
1427 src: "/static/icon.png",
1428 type: "image/png"
1429 },
1430 %{
1431 src: "/static/icon.ico",
1432 sizes: "72x72 96x96 128x128 256x256"
1433 }
1434 ]
1435 },
1436 %{
1437 key: :theme_color,
1438 type: :string,
1439 description: "Describe the theme color of the app",
1440 suggestions: ["#282c37", "mediumpurple"]
1441 },
1442 %{
1443 key: :background_color,
1444 type: :string,
1445 description: "Describe the background color of the app",
1446 suggestions: ["#191b22", "aliceblue"]
1447 }
1448 ]
1449 },
1450 %{
1451 group: :pleroma,
1452 key: :media_proxy,
1453 type: :group,
1454 description: "Media proxy",
1455 children: [
1456 %{
1457 key: :enabled,
1458 type: :boolean,
1459 description: "Enables proxying of remote media via the instance's proxy"
1460 },
1461 %{
1462 key: :base_url,
1463 label: "Base URL",
1464 type: :string,
1465 description:
1466 "The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host/CDN fronts.",
1467 suggestions: ["https://example.com"]
1468 },
1469 %{
1470 key: :invalidation,
1471 type: :keyword,
1472 descpiption: "",
1473 suggestions: [
1474 enabled: true,
1475 provider: Pleroma.Web.MediaProxy.Invalidation.Script
1476 ],
1477 children: [
1478 %{
1479 key: :enabled,
1480 type: :boolean,
1481 description: "Enables media cache object invalidation."
1482 },
1483 %{
1484 key: :provider,
1485 type: :module,
1486 description: "Module which will be used to purge objects from the cache.",
1487 suggestions: [
1488 Pleroma.Web.MediaProxy.Invalidation.Script,
1489 Pleroma.Web.MediaProxy.Invalidation.Http
1490 ]
1491 }
1492 ]
1493 },
1494 %{
1495 key: :proxy_opts,
1496 label: "Advanced MediaProxy Options",
1497 type: :keyword,
1498 description: "Internal Pleroma.ReverseProxy settings",
1499 suggestions: [
1500 redirect_on_failure: false,
1501 max_body_length: 25 * 1_048_576,
1502 max_read_duration: 30_000
1503 ],
1504 children: [
1505 %{
1506 key: :redirect_on_failure,
1507 type: :boolean,
1508 description: """
1509 Redirects the client to the origin server upon encountering HTTP errors.\n
1510 Note that files larger than Max Body Length will trigger an error. (e.g., Peertube videos)\n\n
1511 **WARNING:** This setting will allow larger files to be accessed, but exposes the\n
1512 IP addresses of your users to the other servers, bypassing the MediaProxy.
1513 """
1514 },
1515 %{
1516 key: :max_body_length,
1517 type: :integer,
1518 description:
1519 "Maximum file size (in bytes) allowed through the Pleroma MediaProxy cache."
1520 },
1521 %{
1522 key: :max_read_duration,
1523 type: :integer,
1524 description: "Timeout (in milliseconds) of GET request to the remote URI."
1525 }
1526 ]
1527 },
1528 %{
1529 key: :whitelist,
1530 type: {:list, :string},
1531 description: "List of hosts with scheme to bypass the MediaProxy",
1532 suggestions: ["http://example.com"]
1533 }
1534 ]
1535 },
1536 %{
1537 group: :pleroma,
1538 key: :media_preview_proxy,
1539 type: :group,
1540 description: "Media preview proxy",
1541 children: [
1542 %{
1543 key: :enabled,
1544 type: :boolean,
1545 description:
1546 "Enables proxying of remote media preview to the instance's proxy. Requires enabled media proxy."
1547 },
1548 %{
1549 key: :thumbnail_max_width,
1550 type: :integer,
1551 description:
1552 "Max width of preview thumbnail for images (video preview always has original dimensions)."
1553 },
1554 %{
1555 key: :thumbnail_max_height,
1556 type: :integer,
1557 description:
1558 "Max height of preview thumbnail for images (video preview always has original dimensions)."
1559 },
1560 %{
1561 key: :image_quality,
1562 type: :integer,
1563 description: "Quality of the output. Ranges from 0 (min quality) to 100 (max quality)."
1564 },
1565 %{
1566 key: :min_content_length,
1567 type: :integer,
1568 description:
1569 "Min content length (in bytes) to perform preview. Media smaller in size will be served without thumbnailing."
1570 }
1571 ]
1572 },
1573 %{
1574 group: :pleroma,
1575 key: Pleroma.Web.MediaProxy.Invalidation.Http,
1576 type: :group,
1577 description: "HTTP invalidate settings",
1578 children: [
1579 %{
1580 key: :method,
1581 type: :atom,
1582 description: "HTTP method of request. Default: :purge"
1583 },
1584 %{
1585 key: :headers,
1586 type: {:keyword, :string},
1587 description: "HTTP headers of request",
1588 suggestions: [{"x-refresh", 1}]
1589 },
1590 %{
1591 key: :options,
1592 type: :keyword,
1593 description: "Request options",
1594 children: [
1595 %{
1596 key: :params,
1597 type: {:map, :string}
1598 }
1599 ]
1600 }
1601 ]
1602 },
1603 %{
1604 group: :pleroma,
1605 key: Pleroma.Web.MediaProxy.Invalidation.Script,
1606 type: :group,
1607 description: "Invalidation script settings",
1608 children: [
1609 %{
1610 key: :script_path,
1611 type: :string,
1612 description: "Path to executable script which will purge cached items.",
1613 suggestions: ["./installation/nginx-cache-purge.sh.example"]
1614 },
1615 %{
1616 key: :url_format,
1617 label: "URL Format",
1618 type: :string,
1619 description:
1620 "Optional URL format preprocessing. Only required for Apache's htcacheclean.",
1621 suggestions: [":htcacheclean"]
1622 }
1623 ]
1624 },
1625 %{
1626 group: :pleroma,
1627 key: :activitypub,
1628 label: "ActivityPub",
1629 type: :group,
1630 description: "ActivityPub-related settings",
1631 children: [
1632 %{
1633 key: :unfollow_blocked,
1634 type: :boolean,
1635 description: "Whether blocks result in people getting unfollowed"
1636 },
1637 %{
1638 key: :outgoing_blocks,
1639 type: :boolean,
1640 description: "Whether to federate blocks to other instances"
1641 },
1642 %{
1643 key: :blockers_visible,
1644 type: :boolean,
1645 description: "Whether a user can see someone who has blocked them"
1646 },
1647 %{
1648 key: :sign_object_fetches,
1649 type: :boolean,
1650 description: "Sign object fetches with HTTP signatures"
1651 },
1652 %{
1653 key: :note_replies_output_limit,
1654 type: :integer,
1655 description:
1656 "The number of Note replies' URIs to be included with outgoing federation (`5` to match Mastodon hardcoded value, `0` to disable the output)"
1657 },
1658 %{
1659 key: :follow_handshake_timeout,
1660 type: :integer,
1661 description: "Following handshake timeout",
1662 suggestions: [500]
1663 },
1664 %{
1665 key: :max_collection_objects,
1666 type: :integer,
1667 description:
1668 "The maximum number of items to fetch from a remote collections. Setting this too low can lead to only getting partial collections, but too high and you can end up fetching far too many objects.",
1669 suggestions: [50]
1670 }
1671 ]
1672 },
1673 %{
1674 group: :pleroma,
1675 key: :http_security,
1676 label: "HTTP security",
1677 type: :group,
1678 description: "HTTP security settings",
1679 children: [
1680 %{
1681 key: :enabled,
1682 type: :boolean,
1683 description: "Whether the managed content security policy is enabled"
1684 },
1685 %{
1686 key: :sts,
1687 label: "STS",
1688 type: :boolean,
1689 description: "Whether to additionally send a Strict-Transport-Security header"
1690 },
1691 %{
1692 key: :sts_max_age,
1693 label: "STS max age",
1694 type: :integer,
1695 description: "The maximum age for the Strict-Transport-Security header if sent",
1696 suggestions: [31_536_000]
1697 },
1698 %{
1699 key: :ct_max_age,
1700 label: "CT max age",
1701 type: :integer,
1702 description: "The maximum age for the Expect-CT header if sent",
1703 suggestions: [2_592_000]
1704 },
1705 %{
1706 key: :referrer_policy,
1707 type: :string,
1708 description: "The referrer policy to use, either \"same-origin\" or \"no-referrer\"",
1709 suggestions: ["same-origin", "no-referrer"]
1710 },
1711 %{
1712 key: :report_uri,
1713 label: "Report URI",
1714 type: :string,
1715 description: "Adds the specified URL to report-uri and report-to group in CSP header",
1716 suggestions: ["https://example.com/report-uri"]
1717 }
1718 ]
1719 },
1720 %{
1721 group: :web_push_encryption,
1722 key: :vapid_details,
1723 label: "Vapid Details",
1724 type: :group,
1725 description:
1726 "Web Push Notifications configuration. You can use the mix task mix web_push.gen.keypair to generate it.",
1727 children: [
1728 %{
1729 key: :subject,
1730 type: :string,
1731 description:
1732 "A mailto link for the administrative contact." <>
1733 " It's best if this email is not a personal email address, but rather a group email to the instance moderation team.",
1734 suggestions: ["mailto:moderators@pleroma.com"]
1735 },
1736 %{
1737 key: :public_key,
1738 type: :string,
1739 description: "VAPID public key",
1740 suggestions: ["Public key"]
1741 },
1742 %{
1743 key: :private_key,
1744 type: :string,
1745 description: "VAPID private key",
1746 suggestions: ["Private key"]
1747 }
1748 ]
1749 },
1750 %{
1751 group: :pleroma,
1752 key: Pleroma.Captcha,
1753 type: :group,
1754 description: "Captcha-related settings",
1755 children: [
1756 %{
1757 key: :enabled,
1758 type: :boolean,
1759 description: "Whether the captcha should be shown on registration"
1760 },
1761 %{
1762 key: :method,
1763 type: :module,
1764 description: "The method/service to use for captcha",
1765 suggestions: [Pleroma.Captcha.Kocaptcha, Pleroma.Captcha.Native]
1766 },
1767 %{
1768 key: :seconds_valid,
1769 type: :integer,
1770 description: "The time in seconds for which the captcha is valid",
1771 suggestions: [60]
1772 }
1773 ]
1774 },
1775 %{
1776 group: :pleroma,
1777 key: Pleroma.Captcha.Kocaptcha,
1778 type: :group,
1779 description:
1780 "Kocaptcha is a very simple captcha service with a single API endpoint, the source code is" <>
1781 " here: https://github.com/koto-bank/kocaptcha. The default endpoint (https://captcha.kotobank.ch) is hosted by the developer.",
1782 children: [
1783 %{
1784 key: :endpoint,
1785 type: :string,
1786 description: "The kocaptcha endpoint to use",
1787 suggestions: ["https://captcha.kotobank.ch"]
1788 }
1789 ]
1790 },
1791 %{
1792 group: :pleroma,
1793 label: "Pleroma Admin Token",
1794 type: :group,
1795 description:
1796 "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)",
1797 children: [
1798 %{
1799 key: :admin_token,
1800 type: :string,
1801 description: "Admin token",
1802 suggestions: [
1803 "Please use a high entropy string or UUID"
1804 ]
1805 }
1806 ]
1807 },
1808 %{
1809 group: :pleroma,
1810 key: Oban,
1811 type: :group,
1812 description:
1813 "[Oban](https://github.com/sorentwo/oban) asynchronous job processor configuration.",
1814 children: [
1815 %{
1816 key: :log,
1817 type: {:dropdown, :atom},
1818 description: "Logs verbose mode",
1819 suggestions: [false, :error, :warn, :info, :debug]
1820 },
1821 %{
1822 key: :queues,
1823 type: {:keyword, :integer},
1824 description:
1825 "Background jobs queues (keys: queues, values: max numbers of concurrent jobs)",
1826 suggestions: [
1827 activity_expiration: 10,
1828 attachments_cleanup: 5,
1829 background: 5,
1830 federator_incoming: 50,
1831 federator_outgoing: 50,
1832 mailer: 10,
1833 scheduled_activities: 10,
1834 transmogrifier: 20,
1835 web_push: 50
1836 ],
1837 children: [
1838 %{
1839 key: :activity_expiration,
1840 type: :integer,
1841 description: "Activity expiration queue",
1842 suggestions: [10]
1843 },
1844 %{
1845 key: :backup,
1846 type: :integer,
1847 description: "Backup queue",
1848 suggestions: [1]
1849 },
1850 %{
1851 key: :attachments_cleanup,
1852 type: :integer,
1853 description: "Attachment deletion queue",
1854 suggestions: [5]
1855 },
1856 %{
1857 key: :background,
1858 type: :integer,
1859 description: "Background queue",
1860 suggestions: [5]
1861 },
1862 %{
1863 key: :federator_incoming,
1864 type: :integer,
1865 description: "Incoming federation queue",
1866 suggestions: [50]
1867 },
1868 %{
1869 key: :federator_outgoing,
1870 type: :integer,
1871 description: "Outgoing federation queue",
1872 suggestions: [50]
1873 },
1874 %{
1875 key: :mailer,
1876 type: :integer,
1877 description: "Email sender queue, see Pleroma.Emails.Mailer",
1878 suggestions: [10]
1879 },
1880 %{
1881 key: :scheduled_activities,
1882 type: :integer,
1883 description: "Scheduled activities queue, see Pleroma.ScheduledActivities",
1884 suggestions: [10]
1885 },
1886 %{
1887 key: :transmogrifier,
1888 type: :integer,
1889 description: "Transmogrifier queue",
1890 suggestions: [20]
1891 },
1892 %{
1893 key: :web_push,
1894 type: :integer,
1895 description: "Web push notifications queue",
1896 suggestions: [50]
1897 }
1898 ]
1899 },
1900 %{
1901 key: :crontab,
1902 type: {:list, :tuple},
1903 description: "Settings for cron background jobs",
1904 suggestions: [
1905 {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker},
1906 {"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker}
1907 ]
1908 }
1909 ]
1910 },
1911 %{
1912 group: :pleroma,
1913 key: :workers,
1914 type: :group,
1915 description: "Includes custom worker options not interpretable directly by `Oban`",
1916 children: [
1917 %{
1918 key: :retries,
1919 type: {:keyword, :integer},
1920 description: "Max retry attempts for failed jobs, per `Oban` queue",
1921 suggestions: [
1922 federator_incoming: 5,
1923 federator_outgoing: 5
1924 ]
1925 }
1926 ]
1927 },
1928 %{
1929 group: :pleroma,
1930 key: Pleroma.Web.Metadata,
1931 type: :group,
1932 description: "Metadata-related settings",
1933 children: [
1934 %{
1935 key: :providers,
1936 type: {:list, :module},
1937 description: "List of metadata providers to enable",
1938 suggestions: [
1939 Pleroma.Web.Metadata.Providers.OpenGraph,
1940 Pleroma.Web.Metadata.Providers.TwitterCard,
1941 Pleroma.Web.Metadata.Providers.RelMe,
1942 Pleroma.Web.Metadata.Providers.Feed
1943 ]
1944 },
1945 %{
1946 key: :unfurl_nsfw,
1947 label: "Unfurl NSFW",
1948 type: :boolean,
1949 description: "When enabled NSFW attachments will be shown in previews"
1950 }
1951 ]
1952 },
1953 %{
1954 group: :pleroma,
1955 key: Pleroma.Web.Metadata.Providers.Theme,
1956 type: :group,
1957 description: "Specific provider to hand out themes to instances that scrape index.html",
1958 children: [
1959 %{
1960 key: :theme_color,
1961 type: :string,
1962 description:
1963 "The 'accent color' of the instance, used in places like misskey's instance ticker",
1964 suggestions: ["#593196"]
1965 }
1966 ]
1967 },
1968 %{
1969 group: :pleroma,
1970 key: :rich_media,
1971 type: :group,
1972 description:
1973 "If enabled the instance will parse metadata from attached links to generate link previews",
1974 children: [
1975 %{
1976 key: :enabled,
1977 type: :boolean,
1978 description: "Enables RichMedia parsing of URLs"
1979 },
1980 %{
1981 key: :ignore_hosts,
1982 type: {:list, :string},
1983 description: "List of hosts which will be ignored by the metadata parser",
1984 suggestions: ["accounts.google.com", "xss.website"]
1985 },
1986 %{
1987 key: :ignore_tld,
1988 label: "Ignore TLD",
1989 type: {:list, :string},
1990 description: "List TLDs (top-level domains) which will ignore for parse metadata",
1991 suggestions: ["local", "localdomain", "lan"]
1992 },
1993 %{
1994 key: :parsers,
1995 type: {:list, :module},
1996 description:
1997 "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.",
1998 suggestions: [
1999 Pleroma.Web.RichMedia.Parsers.OEmbed,
2000 Pleroma.Web.RichMedia.Parsers.TwitterCard
2001 ]
2002 },
2003 %{
2004 key: :ttl_setters,
2005 label: "TTL setters",
2006 type: {:list, :module},
2007 description:
2008 "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.",
2009 suggestions: [
2010 Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl
2011 ]
2012 },
2013 %{
2014 key: :failure_backoff,
2015 type: :integer,
2016 description:
2017 "Amount of milliseconds after request failure, during which the request will not be retried.",
2018 suggestions: [60_000]
2019 }
2020 ]
2021 },
2022 %{
2023 group: :pleroma,
2024 key: Pleroma.Formatter,
2025 label: "Linkify",
2026 type: :group,
2027 description:
2028 "Configuration for Pleroma's link formatter which parses mentions, hashtags, and URLs.",
2029 children: [
2030 %{
2031 key: :class,
2032 type: [:string, :boolean],
2033 description: "Specify the class to be added to the generated link. Disable to clear.",
2034 suggestions: ["auto-linker", false]
2035 },
2036 %{
2037 key: :rel,
2038 type: [:string, :boolean],
2039 description: "Override the rel attribute. Disable to clear.",
2040 suggestions: ["ugc", "noopener noreferrer", false]
2041 },
2042 %{
2043 key: :new_window,
2044 type: :boolean,
2045 description: "Link URLs will open in a new window/tab."
2046 },
2047 %{
2048 key: :truncate,
2049 type: [:integer, :boolean],
2050 description:
2051 "Set to a number to truncate URLs longer than the number. Truncated URLs will end in `...`",
2052 suggestions: [15, false]
2053 },
2054 %{
2055 key: :strip_prefix,
2056 type: :boolean,
2057 description: "Strip the scheme prefix."
2058 },
2059 %{
2060 key: :extra,
2061 type: :boolean,
2062 description: "Link URLs with rarely used schemes (magnet, ipfs, irc, etc.)"
2063 },
2064 %{
2065 key: :validate_tld,
2066 type: [:atom, :boolean],
2067 description:
2068 "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)",
2069 suggestions: [:no_scheme, true]
2070 }
2071 ]
2072 },
2073 %{
2074 group: :pleroma,
2075 key: Pleroma.ScheduledActivity,
2076 type: :group,
2077 description: "Scheduled activities settings",
2078 children: [
2079 %{
2080 key: :daily_user_limit,
2081 type: :integer,
2082 description:
2083 "The number of scheduled activities a user is allowed to create in a single day. Default: 25.",
2084 suggestions: [25]
2085 },
2086 %{
2087 key: :total_user_limit,
2088 type: :integer,
2089 description:
2090 "The number of scheduled activities a user is allowed to create in total. Default: 300.",
2091 suggestions: [300]
2092 },
2093 %{
2094 key: :enabled,
2095 type: :boolean,
2096 description: "Whether scheduled activities are sent to the job queue to be executed"
2097 }
2098 ]
2099 },
2100 %{
2101 group: :pleroma,
2102 key: Pleroma.Workers.PurgeExpiredActivity,
2103 type: :group,
2104 description: "Expired activities settings",
2105 children: [
2106 %{
2107 key: :enabled,
2108 type: :boolean,
2109 description: "Enables expired activities addition & deletion"
2110 },
2111 %{
2112 key: :min_lifetime,
2113 type: :integer,
2114 description: "Minimum lifetime for ephemeral activity (in seconds)",
2115 suggestions: [600]
2116 }
2117 ]
2118 },
2119 %{
2120 group: :pleroma,
2121 label: "Pleroma Authenticator",
2122 type: :group,
2123 description: "Authenticator",
2124 children: [
2125 %{
2126 key: Pleroma.Web.Auth.Authenticator,
2127 type: :module,
2128 suggestions: [Pleroma.Web.Auth.PleromaAuthenticator, Pleroma.Web.Auth.LDAPAuthenticator]
2129 }
2130 ]
2131 },
2132 %{
2133 group: :pleroma,
2134 key: :auth,
2135 type: :group,
2136 description: "Authentication / authorization settings",
2137 children: [
2138 %{
2139 key: :enforce_oauth_admin_scope_usage,
2140 label: "Enforce OAuth admin scope usage",
2141 type: :boolean,
2142 description:
2143 "OAuth admin scope requirement toggle. " <>
2144 "If enabled, admin actions explicitly demand admin OAuth scope(s) presence in OAuth token " <>
2145 "(client app must support admin scopes). If disabled and token doesn't have admin scope(s), " <>
2146 "`is_admin` user flag grants access to admin-specific actions."
2147 },
2148 %{
2149 key: :auth_template,
2150 type: :string,
2151 description:
2152 "Authentication form template. By default it's `show.html` which corresponds to `lib/pleroma/web/templates/o_auth/o_auth/show.html.ee`.",
2153 suggestions: ["show.html"]
2154 },
2155 %{
2156 key: :oauth_consumer_template,
2157 label: "OAuth consumer template",
2158 type: :string,
2159 description:
2160 "OAuth consumer mode authentication form template. By default it's `consumer.html` which corresponds to" <>
2161 " `lib/pleroma/web/templates/o_auth/o_auth/consumer.html.eex`.",
2162 suggestions: ["consumer.html"]
2163 },
2164 %{
2165 key: :oauth_consumer_strategies,
2166 label: "OAuth consumer strategies",
2167 type: {:list, :string},
2168 description:
2169 "The list of enabled OAuth consumer strategies. By default it's set by OAUTH_CONSUMER_STRATEGIES environment variable." <>
2170 " Each entry in this space-delimited string should be of format \"strategy\" or \"strategy:dependency\"" <>
2171 " (e.g. twitter or keycloak:ueberauth_keycloak_strategy in case dependency is named differently than ueberauth_<strategy>).",
2172 suggestions: ["twitter", "keycloak:ueberauth_keycloak_strategy"]
2173 }
2174 ]
2175 },
2176 %{
2177 group: :pleroma,
2178 key: :email_notifications,
2179 type: :group,
2180 description: "Email notifications settings",
2181 children: [
2182 %{
2183 key: :digest,
2184 type: :map,
2185 description:
2186 "emails of \"what you've missed\" for users who have been inactive for a while",
2187 suggestions: [
2188 %{
2189 active: false,
2190 schedule: "0 0 * * 0",
2191 interval: 7,
2192 inactivity_threshold: 7
2193 }
2194 ],
2195 children: [
2196 %{
2197 key: :active,
2198 label: "Enabled",
2199 type: :boolean,
2200 description: "Globally enable or disable digest emails"
2201 },
2202 %{
2203 key: :schedule,
2204 type: :string,
2205 description:
2206 "When to send digest email, in crontab format. \"0 0 0\" is the default, meaning \"once a week at midnight on Sunday morning\".",
2207 suggestions: ["0 0 * * 0"]
2208 },
2209 %{
2210 key: :interval,
2211 type: :integer,
2212 description: "Minimum interval between digest emails to one user",
2213 suggestions: [7]
2214 },
2215 %{
2216 key: :inactivity_threshold,
2217 type: :integer,
2218 description: "Minimum user inactivity threshold",
2219 suggestions: [7]
2220 }
2221 ]
2222 }
2223 ]
2224 },
2225 %{
2226 group: :pleroma,
2227 key: Pleroma.Emails.UserEmail,
2228 type: :group,
2229 description: "Email template settings",
2230 children: [
2231 %{
2232 key: :logo,
2233 type: {:string, :image},
2234 description: "A path to a custom logo. Set it to `nil` to use the default Pleroma logo.",
2235 suggestions: ["some/path/logo.png"]
2236 },
2237 %{
2238 key: :styling,
2239 type: :map,
2240 description: "A map with color settings for email templates.",
2241 suggestions: [
2242 %{
2243 link_color: "#d8a070",
2244 background_color: "#2C3645",
2245 content_background_color: "#1B2635",
2246 header_color: "#d8a070",
2247 text_color: "#b9b9ba",
2248 text_muted_color: "#b9b9ba"
2249 }
2250 ],
2251 children: [
2252 %{
2253 key: :link_color,
2254 type: :string,
2255 suggestions: ["#d8a070"]
2256 },
2257 %{
2258 key: :background_color,
2259 type: :string,
2260 suggestions: ["#2C3645"]
2261 },
2262 %{
2263 key: :content_background_color,
2264 type: :string,
2265 suggestions: ["#1B2635"]
2266 },
2267 %{
2268 key: :header_color,
2269 type: :string,
2270 suggestions: ["#d8a070"]
2271 },
2272 %{
2273 key: :text_color,
2274 type: :string,
2275 suggestions: ["#b9b9ba"]
2276 },
2277 %{
2278 key: :text_muted_color,
2279 type: :string,
2280 suggestions: ["#b9b9ba"]
2281 }
2282 ]
2283 }
2284 ]
2285 },
2286 %{
2287 group: :pleroma,
2288 key: Pleroma.Emails.NewUsersDigestEmail,
2289 type: :group,
2290 description: "New users admin email digest",
2291 children: [
2292 %{
2293 key: :enabled,
2294 type: :boolean,
2295 description: "Enables new users admin digest email when `true`"
2296 }
2297 ]
2298 },
2299 %{
2300 group: :pleroma,
2301 key: :oauth2,
2302 label: "OAuth2",
2303 type: :group,
2304 description: "Configure OAuth 2 provider capabilities",
2305 children: [
2306 %{
2307 key: :token_expires_in,
2308 type: :integer,
2309 description: "The lifetime in seconds of the access token",
2310 suggestions: [2_592_000]
2311 },
2312 %{
2313 key: :issue_new_refresh_token,
2314 type: :boolean,
2315 description:
2316 "Keeps old refresh token or generate new refresh token when to obtain an access token"
2317 },
2318 %{
2319 key: :clean_expired_tokens,
2320 type: :boolean,
2321 description: "Enable a background job to clean expired OAuth tokens. Default: disabled."
2322 }
2323 ]
2324 },
2325 %{
2326 group: :pleroma,
2327 key: :emoji,
2328 type: :group,
2329 children: [
2330 %{
2331 key: :shortcode_globs,
2332 type: {:list, :string},
2333 description: "Location of custom emoji files. * can be used as a wildcard.",
2334 suggestions: ["/emoji/custom/**/*.png"]
2335 },
2336 %{
2337 key: :pack_extensions,
2338 type: {:list, :string},
2339 description:
2340 "A list of file extensions for emojis, when no emoji.txt for a pack is present",
2341 suggestions: [".png", ".gif"]
2342 },
2343 %{
2344 key: :groups,
2345 type: {:keyword, {:list, :string}},
2346 description:
2347 "Emojis are ordered in groups (tags). This is an array of key-value pairs where the key is the group name" <>
2348 " and the value is the location or array of locations. * can be used as a wildcard.",
2349 suggestions: [
2350 Custom: ["/emoji/*.png", "/emoji/**/*.png"]
2351 ]
2352 },
2353 %{
2354 key: :default_manifest,
2355 type: :string,
2356 description:
2357 "Location of the JSON-manifest. This manifest contains information about the emoji-packs you can download." <>
2358 " Currently only one manifest can be added (no arrays).",
2359 suggestions: ["https://git.pleroma.social/pleroma/emoji-index/raw/master/index.json"]
2360 },
2361 %{
2362 key: :shared_pack_cache_seconds_per_file,
2363 label: "Shared pack cache s/file",
2364 type: :integer,
2365 descpiption:
2366 "When an emoji pack is shared, the archive is created and cached in memory" <>
2367 " for this amount of seconds multiplied by the number of files.",
2368 suggestions: [60]
2369 }
2370 ]
2371 },
2372 %{
2373 group: :pleroma,
2374 key: :rate_limit,
2375 type: :group,
2376 description:
2377 "Rate limit settings. This is an advanced feature enabled only for :authentication by default.",
2378 children: [
2379 %{
2380 key: :search,
2381 type: [:tuple, {:list, :tuple}],
2382 description: "For the search requests (account & status search etc.)",
2383 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2384 },
2385 %{
2386 key: :timeline,
2387 type: [:tuple, {:list, :tuple}],
2388 description: "For requests to timelines (each timeline has it's own limiter)",
2389 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2390 },
2391 %{
2392 key: :app_account_creation,
2393 type: [:tuple, {:list, :tuple}],
2394 description: "For registering user accounts from the same IP address",
2395 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2396 },
2397 %{
2398 key: :relations_actions,
2399 type: [:tuple, {:list, :tuple}],
2400 description: "For actions on relationships with all users (follow, unfollow)",
2401 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2402 },
2403 %{
2404 key: :relation_id_action,
2405 label: "Relation ID action",
2406 type: [:tuple, {:list, :tuple}],
2407 description: "For actions on relation with a specific user (follow, unfollow)",
2408 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2409 },
2410 %{
2411 key: :statuses_actions,
2412 type: [:tuple, {:list, :tuple}],
2413 description:
2414 "For create / delete / fav / unfav / reblog / unreblog actions on any statuses",
2415 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2416 },
2417 %{
2418 key: :status_id_action,
2419 label: "Status ID action",
2420 type: [:tuple, {:list, :tuple}],
2421 description:
2422 "For fav / unfav or reblog / unreblog actions on the same status by the same user",
2423 suggestions: [{1000, 10}, [{10_000, 10}, {10_000, 50}]]
2424 },
2425 %{
2426 key: :authentication,
2427 type: [:tuple, {:list, :tuple}],
2428 description: "For authentication create / password check / user existence check requests",
2429 suggestions: [{60_000, 15}]
2430 }
2431 ]
2432 },
2433 %{
2434 group: :mime,
2435 label: "Mime Types",
2436 type: :group,
2437 description: "Mime Types settings",
2438 children: [
2439 %{
2440 key: :types,
2441 type: :map,
2442 suggestions: [
2443 %{
2444 "application/xml" => ["xml"],
2445 "application/xrd+xml" => ["xrd+xml"],
2446 "application/jrd+json" => ["jrd+json"],
2447 "application/activity+json" => ["activity+json"],
2448 "application/ld+json" => ["activity+json"]
2449 }
2450 ],
2451 children: [
2452 %{
2453 key: "application/xml",
2454 type: {:list, :string},
2455 suggestions: ["xml"]
2456 },
2457 %{
2458 key: "application/xrd+xml",
2459 type: {:list, :string},
2460 suggestions: ["xrd+xml"]
2461 },
2462 %{
2463 key: "application/jrd+json",
2464 type: {:list, :string},
2465 suggestions: ["jrd+json"]
2466 },
2467 %{
2468 key: "application/activity+json",
2469 type: {:list, :string},
2470 suggestions: ["activity+json"]
2471 },
2472 %{
2473 key: "application/ld+json",
2474 type: {:list, :string},
2475 suggestions: ["activity+json"]
2476 }
2477 ]
2478 }
2479 ]
2480 },
2481 %{
2482 group: :pleroma,
2483 key: :http,
2484 label: "HTTP",
2485 type: :group,
2486 description: "HTTP settings",
2487 children: [
2488 %{
2489 key: :proxy_url,
2490 label: "Proxy URL",
2491 type: [:string, :tuple],
2492 description: "Proxy URL",
2493 suggestions: ["localhost:9020", {:socks5, :localhost, 3090}]
2494 },
2495 %{
2496 key: :user_agent,
2497 type: [:string, :atom],
2498 description:
2499 "What user agent to use. Must be a string or an atom `:default`. Default value is `:default`.",
2500 suggestions: ["Pleroma", :default]
2501 },
2502 %{
2503 key: :adapter,
2504 type: :keyword,
2505 description: "Adapter specific options",
2506 suggestions: [],
2507 children: [
2508 %{
2509 key: :ssl_options,
2510 type: :keyword,
2511 label: "SSL Options",
2512 description: "SSL options for HTTP adapter",
2513 children: [
2514 %{
2515 key: :versions,
2516 type: {:list, :atom},
2517 description: "List of TLS version to use",
2518 suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
2519 }
2520 ]
2521 }
2522 ]
2523 }
2524 ]
2525 },
2526 %{
2527 group: :pleroma,
2528 key: :markup,
2529 label: "Markup Settings",
2530 type: :group,
2531 children: [
2532 %{
2533 key: :allow_inline_images,
2534 type: :boolean
2535 },
2536 %{
2537 key: :allow_headings,
2538 type: :boolean
2539 },
2540 %{
2541 key: :allow_tables,
2542 type: :boolean
2543 },
2544 %{
2545 key: :allow_fonts,
2546 type: :boolean
2547 },
2548 %{
2549 key: :scrub_policy,
2550 type: {:list, :module},
2551 description:
2552 "Module names are shortened (removed leading `Pleroma.HTML.` part), but on adding custom module you need to use full name.",
2553 suggestions: [Pleroma.HTML.Transform.MediaProxy, Pleroma.HTML.Scrubber.Default]
2554 }
2555 ]
2556 },
2557 %{
2558 group: :pleroma,
2559 key: :user,
2560 type: :group,
2561 children: [
2562 %{
2563 key: :deny_follow_blocked,
2564 type: :boolean
2565 }
2566 ]
2567 },
2568 %{
2569 group: :pleroma,
2570 key: Pleroma.User,
2571 type: :group,
2572 children: [
2573 %{
2574 key: :restricted_nicknames,
2575 type: {:list, :string},
2576 description: "List of nicknames users may not register with.",
2577 suggestions: [
2578 ".well-known",
2579 "~",
2580 "about",
2581 "activities",
2582 "api",
2583 "auth",
2584 "check_password",
2585 "dev",
2586 "friend-requests",
2587 "inbox",
2588 "internal",
2589 "main",
2590 "media",
2591 "nodeinfo",
2592 "notice",
2593 "oauth",
2594 "objects",
2595 "ostatus_subscribe",
2596 "pleroma",
2597 "proxy",
2598 "push",
2599 "registration",
2600 "relay",
2601 "settings",
2602 "status",
2603 "tag",
2604 "user-search",
2605 "user_exists",
2606 "users",
2607 "web"
2608 ]
2609 },
2610 %{
2611 key: :email_blacklist,
2612 type: {:list, :string},
2613 description: "List of email domains users may not register with.",
2614 suggestions: ["mailinator.com", "maildrop.cc"]
2615 }
2616 ]
2617 },
2618 %{
2619 group: :cors_plug,
2620 label: "CORS plug config",
2621 type: :group,
2622 children: [
2623 %{
2624 key: :max_age,
2625 type: :integer,
2626 suggestions: [86_400]
2627 },
2628 %{
2629 key: :methods,
2630 type: {:list, :string},
2631 suggestions: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"]
2632 },
2633 %{
2634 key: :expose,
2635 type: {:list, :string},
2636 suggestions: [
2637 "Link",
2638 "X-RateLimit-Reset",
2639 "X-RateLimit-Limit",
2640 "X-RateLimit-Remaining",
2641 "X-Request-Id",
2642 "Idempotency-Key"
2643 ]
2644 },
2645 %{
2646 key: :credentials,
2647 type: :boolean
2648 },
2649 %{
2650 key: :headers,
2651 type: {:list, :string},
2652 suggestions: ["Authorization", "Content-Type", "Idempotency-Key"]
2653 }
2654 ]
2655 },
2656 %{
2657 group: :pleroma,
2658 key: Pleroma.Web.Plugs.RemoteIp,
2659 type: :group,
2660 description: """
2661 `Pleroma.Web.Plugs.RemoteIp` is a shim to call [`RemoteIp`](https://git.pleroma.social/pleroma/remote_ip) but with runtime configuration.
2662 **If your instance is not behind at least one reverse proxy, you should not enable this plug.**
2663 """,
2664 children: [
2665 %{
2666 key: :enabled,
2667 type: :boolean,
2668 description: "Enable/disable the plug. Default: disabled."
2669 },
2670 %{
2671 key: :headers,
2672 type: {:list, :string},
2673 description: """
2674 A list of strings naming the HTTP headers to use when deriving the true client IP. Default: `["x-forwarded-for"]`.
2675 """
2676 },
2677 %{
2678 key: :proxies,
2679 type: {:list, :string},
2680 description:
2681 "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."
2682 },
2683 %{
2684 key: :reserved,
2685 type: {:list, :string},
2686 description: """
2687 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"]`
2688 """
2689 }
2690 ]
2691 },
2692 %{
2693 group: :pleroma,
2694 key: :web_cache_ttl,
2695 label: "Web cache TTL",
2696 type: :group,
2697 description:
2698 "The expiration time for the web responses cache. Values should be in milliseconds or `nil` to disable expiration.",
2699 children: [
2700 %{
2701 key: :activity_pub,
2702 type: :integer,
2703 description:
2704 "Activity pub routes (except question activities). Default: `nil` (no expiration).",
2705 suggestions: [nil]
2706 },
2707 %{
2708 key: :activity_pub_question,
2709 type: :integer,
2710 description: "Activity pub routes (question activities). Default: `30_000` (30 seconds).",
2711 suggestions: [30_000]
2712 }
2713 ]
2714 },
2715 %{
2716 group: :pleroma,
2717 key: :static_fe,
2718 label: "Static FE",
2719 type: :group,
2720 description:
2721 "Render profiles and posts using server-generated HTML that is viewable without using JavaScript",
2722 children: [
2723 %{
2724 key: :enabled,
2725 type: :boolean,
2726 description: "Enables the rendering of static HTML. Default: disabled."
2727 }
2728 ]
2729 },
2730 %{
2731 group: :pleroma,
2732 key: :feed,
2733 type: :group,
2734 description: "Configure feed rendering",
2735 children: [
2736 %{
2737 key: :post_title,
2738 type: :map,
2739 description: "Configure title rendering",
2740 children: [
2741 %{
2742 key: :max_length,
2743 type: :integer,
2744 description: "Maximum number of characters before truncating title",
2745 suggestions: [100]
2746 },
2747 %{
2748 key: :omission,
2749 type: :string,
2750 description: "Replacement which will be used after truncating string",
2751 suggestions: ["..."]
2752 }
2753 ]
2754 }
2755 ]
2756 },
2757 %{
2758 group: :pleroma,
2759 key: :mrf_follow_bot,
2760 tab: :mrf,
2761 related_policy: "Pleroma.Web.ActivityPub.MRF.FollowBotPolicy",
2762 label: "MRF FollowBot Policy",
2763 type: :group,
2764 description: "Automatically follows newly discovered accounts.",
2765 children: [
2766 %{
2767 key: :follower_nickname,
2768 type: :string,
2769 description: "The name of the bot account to use for following newly discovered users.",
2770 suggestions: ["followbot"]
2771 }
2772 ]
2773 },
2774 %{
2775 group: :pleroma,
2776 key: :modules,
2777 type: :group,
2778 description: "Custom Runtime Modules",
2779 children: [
2780 %{
2781 key: :runtime_dir,
2782 type: :string,
2783 description: "A path to custom Elixir modules (such as MRF policies)."
2784 }
2785 ]
2786 },
2787 %{
2788 group: :pleroma,
2789 key: :streamer,
2790 type: :group,
2791 description: "Settings for notifications streamer",
2792 children: [
2793 %{
2794 key: :workers,
2795 type: :integer,
2796 description: "Number of workers to send notifications",
2797 suggestions: [3]
2798 },
2799 %{
2800 key: :overflow_workers,
2801 type: :integer,
2802 description: "Maximum number of workers created if pool is empty",
2803 suggestions: [2]
2804 }
2805 ]
2806 },
2807 %{
2808 group: :pleroma,
2809 key: :restrict_unauthenticated,
2810 label: "Restrict Unauthenticated",
2811 type: :group,
2812 description:
2813 "Disallow viewing timelines, user profiles and statuses for unauthenticated users.",
2814 children: [
2815 %{
2816 key: :timelines,
2817 type: :map,
2818 description: "Settings for public and federated timelines.",
2819 children: [
2820 %{
2821 key: :local,
2822 type: :boolean,
2823 description: "Disallow view public timeline."
2824 },
2825 %{
2826 key: :federated,
2827 type: :boolean,
2828 description: "Disallow view federated timeline."
2829 }
2830 ]
2831 },
2832 %{
2833 key: :profiles,
2834 type: :map,
2835 description: "Settings for user profiles.",
2836 children: [
2837 %{
2838 key: :local,
2839 type: :boolean,
2840 description: "Disallow view local user profiles."
2841 },
2842 %{
2843 key: :remote,
2844 type: :boolean,
2845 description: "Disallow view remote user profiles."
2846 }
2847 ]
2848 },
2849 %{
2850 key: :activities,
2851 type: :map,
2852 description: "Settings for statuses.",
2853 children: [
2854 %{
2855 key: :local,
2856 type: :boolean,
2857 description: "Disallow view local statuses."
2858 },
2859 %{
2860 key: :remote,
2861 type: :boolean,
2862 description: "Disallow view remote statuses."
2863 }
2864 ]
2865 }
2866 ]
2867 },
2868 %{
2869 group: :pleroma,
2870 key: Pleroma.Web.ApiSpec.CastAndValidate,
2871 type: :group,
2872 children: [
2873 %{
2874 key: :strict,
2875 type: :boolean,
2876 description:
2877 "Enables strict input validation (useful in development, not recommended in production)"
2878 }
2879 ]
2880 },
2881 %{
2882 group: :pleroma,
2883 key: :instances_favicons,
2884 type: :group,
2885 description: "Control favicons for instances",
2886 children: [
2887 %{
2888 key: :enabled,
2889 type: :boolean,
2890 description: "Allow/disallow displaying and getting instances favicons"
2891 }
2892 ]
2893 },
2894 %{
2895 group: :ex_aws,
2896 key: :s3,
2897 type: :group,
2898 descriptions: "S3 service related settings",
2899 children: [
2900 %{
2901 key: :access_key_id,
2902 type: :string,
2903 description: "S3 access key ID",
2904 suggestions: ["AKIAQ8UKHTGIYN7DMWWJ"]
2905 },
2906 %{
2907 key: :secret_access_key,
2908 type: :string,
2909 description: "Secret access key",
2910 suggestions: ["JFGt+fgH1UQ7vLUQjpW+WvjTdV/UNzVxcwn7DkaeFKtBS5LvoXvIiME4NQBsT6ZZ"]
2911 },
2912 %{
2913 key: :host,
2914 type: :string,
2915 description: "S3 host",
2916 suggestions: ["s3.eu-central-1.amazonaws.com"]
2917 },
2918 %{
2919 key: :region,
2920 type: :string,
2921 description: "S3 region (for AWS)",
2922 suggestions: ["us-east-1"]
2923 }
2924 ]
2925 },
2926 %{
2927 group: :pleroma,
2928 key: :frontends,
2929 type: :group,
2930 description: "Installed frontends management",
2931 children: [
2932 %{
2933 key: :primary,
2934 type: :map,
2935 description: "Primary frontend, the one that is served for all pages by default",
2936 children: installed_frontend_options
2937 },
2938 %{
2939 key: :admin,
2940 type: :map,
2941 description: "Admin frontend",
2942 children: installed_frontend_options
2943 },
2944 %{
2945 key: :mastodon,
2946 type: :map,
2947 description: "Mastodon frontend",
2948 children: installed_frontend_options
2949 },
2950 %{
2951 key: :swagger,
2952 type: :map,
2953 description: "Swagger API reference frontend",
2954 children:
2955 installed_frontend_options ++
2956 [
2957 %{
2958 key: "enabled",
2959 label: "Enabled",
2960 type: :boolean,
2961 description: "Whether to have this enabled at all"
2962 }
2963 ]
2964 },
2965 %{
2966 key: :available,
2967 type: :map,
2968 description:
2969 "A map containing available frontends and parameters for their installation.",
2970 children: frontend_options
2971 }
2972 ]
2973 },
2974 %{
2975 group: :pleroma,
2976 key: Pleroma.Web.Preload,
2977 type: :group,
2978 description: "Preload-related settings",
2979 children: [
2980 %{
2981 key: :providers,
2982 type: {:list, :module},
2983 description: "List of preload providers to enable",
2984 suggestions: [
2985 Pleroma.Web.Preload.Providers.Instance,
2986 Pleroma.Web.Preload.Providers.User,
2987 Pleroma.Web.Preload.Providers.Timelines,
2988 Pleroma.Web.Preload.Providers.StatusNet
2989 ]
2990 }
2991 ]
2992 },
2993 %{
2994 group: :pleroma,
2995 key: :majic_pool,
2996 type: :group,
2997 description: "Majic/libmagic configuration",
2998 children: [
2999 %{
3000 key: :size,
3001 type: :integer,
3002 description: "Number of majic workers to start.",
3003 suggestions: [2]
3004 }
3005 ]
3006 },
3007 %{
3008 group: :pleroma,
3009 key: Pleroma.User.Backup,
3010 type: :group,
3011 description: "Account Backup",
3012 children: [
3013 %{
3014 key: :purge_after_days,
3015 type: :integer,
3016 description: "Remove backup achives after N days",
3017 suggestions: [30]
3018 },
3019 %{
3020 key: :limit_days,
3021 type: :integer,
3022 description: "Limit user to export not more often than once per N days",
3023 suggestions: [7]
3024 }
3025 ]
3026 },
3027 %{
3028 group: :prometheus,
3029 key: Pleroma.Web.Endpoint.MetricsExporter,
3030 type: :group,
3031 description: "Prometheus app metrics endpoint configuration",
3032 children: [
3033 %{
3034 key: :enabled,
3035 type: :boolean,
3036 description: "[Pleroma extension] Enables app metrics endpoint."
3037 },
3038 %{
3039 key: :ip_whitelist,
3040 label: "IP Whitelist",
3041 type: [{:list, :string}, {:list, :charlist}, {:list, :tuple}],
3042 description: "Restrict access of app metrics endpoint to the specified IP addresses."
3043 },
3044 %{
3045 key: :auth,
3046 type: [:boolean, :tuple],
3047 description: "Enables HTTP Basic Auth for app metrics endpoint.",
3048 suggestion: [false, {:basic, "myusername", "mypassword"}]
3049 },
3050 %{
3051 key: :path,
3052 type: :string,
3053 description: "App metrics endpoint URI path.",
3054 suggestions: ["/api/pleroma/app_metrics"]
3055 },
3056 %{
3057 key: :format,
3058 type: :atom,
3059 description: "App metrics endpoint output format.",
3060 suggestions: [:text, :protobuf]
3061 }
3062 ]
3063 },
3064 %{
3065 group: :pleroma,
3066 key: ConcurrentLimiter,
3067 type: :group,
3068 description: "Limits configuration for background tasks.",
3069 children: [
3070 %{
3071 key: Pleroma.Web.RichMedia.Helpers,
3072 type: :keyword,
3073 description: "Concurrent limits configuration for getting RichMedia for activities.",
3074 suggestions: [max_running: 5, max_waiting: 5],
3075 children: [
3076 %{
3077 key: :max_running,
3078 type: :integer,
3079 description: "Max running concurrently jobs.",
3080 suggestion: [5]
3081 },
3082 %{
3083 key: :max_waiting,
3084 type: :integer,
3085 description: "Max waiting jobs.",
3086 suggestion: [5]
3087 }
3088 ]
3089 },
3090 %{
3091 key: Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy,
3092 type: :keyword,
3093 description: "Concurrent limits configuration for MediaProxyWarmingPolicy.",
3094 suggestions: [max_running: 5, max_waiting: 5],
3095 children: [
3096 %{
3097 key: :max_running,
3098 type: :integer,
3099 description: "Max running concurrently jobs.",
3100 suggestion: [5]
3101 },
3102 %{
3103 key: :max_waiting,
3104 type: :integer,
3105 description: "Max waiting jobs.",
3106 suggestion: [5]
3107 }
3108 ]
3109 }
3110 ]
3111 },
3112 %{
3113 group: :pleroma,
3114 key: Pleroma.Search,
3115 type: :group,
3116 description: "General search settings.",
3117 children: [
3118 %{
3119 key: :module,
3120 type: :keyword,
3121 description: "Selected search module.",
3122 suggestion: [Pleroma.Search.DatabaseSearch, Pleroma.Search.Meilisearch]
3123 }
3124 ]
3125 },
3126 %{
3127 group: :pleroma,
3128 key: Pleroma.Search.Meilisearch,
3129 type: :group,
3130 description: "Meilisearch settings.",
3131 children: [
3132 %{
3133 key: :url,
3134 type: :string,
3135 description: "Meilisearch URL.",
3136 suggestion: ["http://127.0.0.1:7700/"]
3137 },
3138 %{
3139 key: :private_key,
3140 type: :string,
3141 description:
3142 "Private key for meilisearch authentication, or `nil` to disable private key authentication.",
3143 suggestion: [nil]
3144 },
3145 %{
3146 key: :initial_indexing_chunk_size,
3147 type: :int,
3148 description:
3149 "Amount of posts in a batch when running the initial indexing operation. Should probably not be more than 100000" <>
3150 " since there's a limit on maximum insert size",
3151 suggestion: [100_000]
3152 }
3153 ]
3154 },
3155 %{
3156 group: :pleroma,
3157 key: Pleroma.Search.Elasticsearch.Cluster,
3158 type: :group,
3159 description: "Elasticsearch settings.",
3160 children: [
3161 %{
3162 key: :url,
3163 type: :string,
3164 description: "Elasticsearch URL.",
3165 suggestion: ["http://127.0.0.1:9200/"]
3166 },
3167 %{
3168 key: :username,
3169 type: :string,
3170 description: "Username to connect to ES. Set to nil if your cluster is unauthenticated.",
3171 suggestion: ["elastic"]
3172 },
3173 %{
3174 key: :password,
3175 type: :string,
3176 description: "Password to connect to ES. Set to nil if your cluster is unauthenticated.",
3177 suggestion: ["changeme"]
3178 },
3179 %{
3180 key: :api,
3181 type: :module,
3182 description:
3183 "The API module used by Elasticsearch. Should always be Elasticsearch.API.HTTP",
3184 suggestion: [Elasticsearch.API.HTTP]
3185 },
3186 %{
3187 key: :json_library,
3188 type: :module,
3189 description:
3190 "The JSON module used to encode/decode when communicating with Elasticsearch",
3191 suggestion: [Jason]
3192 },
3193 %{
3194 key: :indexes,
3195 type: :map,
3196 description: "The indices to set up in Elasticsearch",
3197 children: [
3198 %{
3199 key: :activities,
3200 type: :map,
3201 description: "Config for the index to use for activities",
3202 children: [
3203 %{
3204 key: :settings,
3205 type: :string,
3206 description:
3207 "Path to the file containing index settings for the activities index. Should contain a mapping.",
3208 suggestion: ["priv/es-mappings/activity.json"]
3209 },
3210 %{
3211 key: :store,
3212 type: :module,
3213 description: "The internal store module",
3214 suggestion: [Pleroma.Search.Elasticsearch.Store]
3215 },
3216 %{
3217 key: :sources,
3218 type: {:list, :module},
3219 description: "The internal types to use for this index",
3220 suggestion: [[Pleroma.Activity]]
3221 },
3222 %{
3223 key: :bulk_page_size,
3224 type: :int,
3225 description: "Size for bulk put requests, mostly used on building the index",
3226 suggestion: [5000]
3227 },
3228 %{
3229 key: :bulk_wait_interval,
3230 type: :int,
3231 description: "Time to wait between bulk put requests (in ms)",
3232 suggestion: [15_000]
3233 }
3234 ]
3235 }
3236 ]
3237 }
3238 ]
3239 }
3240 ]