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