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