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