10 # .;Y. ;$MMMMMM9. :tc.
11 # vY. .. .nMMM@MMU. ;1v.
12 # i7i ... .#MM@M@C. .....:71i
13 # it: .... $MMM@9;.,i;;;i,;tti
14 # :t7. ..... 0MMMWv.,iii:::,,;St.
15 # .nC. ..... IMMMQ..,::::::,.,czX.
16 # .ct: ....... .ZMMMI..,:::::::,,:76Y.
17 # c2: ......,i..Y$M@t..:::::::,,..inZY
18 # vov ......:ii..c$MBc..,,,,,,,,,,..iI9i
19 # i9Y ......iii:..7@MA,..,,,,,,,,,....;AA:
20 # iIS. ......:ii::..;@MI....,............;Ez.
21 # .I9. ......:i::::...8M1..................C0z.
22 # .z9; ......:i::::,.. .i:...................zWX.
23 # vbv ......,i::::,,. ................. :AQY
24 # c6Y. .,...,::::,,..:t0@@QY. ................ :8bi
25 # :6S. ..,,...,:::,,,..EMMMMMMI. ............... .;bZ,
26 # :6o, .,,,,..:::,,,..i#MMMMMM#v................. YW2.
27 # .n8i ..,,,,,,,::,,,,.. tMMMMM@C:.................. .1Wn
28 # 7Uc. .:::,,,,,::,,,,.. i1t;,..................... .UEi
29 # 7C...::::::::::::,,,,.. .................... vSi.
30 # ;1;...,,::::::,......... .................. Yz:
32 # izAotX7777777777777777777777777777777777777777Y7n92:
33 # .;CoIIIIIUAA666666699999ZZZZZZZZZZZZZZZZZZZZ6ov.
36 # DO NOT EDIT THIS FILE! THIS FILE CONTAINS THE DEFAULT VALUES FOR THE CON-
37 # FIGURATION! EDIT YOUR SECRET FILE (either prod.secret.exs, dev.secret.exs).
39 # This file is responsible for configuring your application
40 # and its dependencies with the aid of the Mix.Config module.
42 # This configuration file is loaded before any dependency and
43 # is restricted to this project.
46 # General application configuration
47 config :pleroma, ecto_repos: [Pleroma.Repo]
49 config :pleroma, Pleroma.Repo,
50 telemetry_event: [Pleroma.Repo.Instrumenter],
53 config :pleroma, Pleroma.Captcha,
56 method: Pleroma.Captcha.Native
58 config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch"
60 # Upload configuration
61 config :pleroma, Pleroma.Upload,
62 uploader: Pleroma.Uploaders.Local,
63 filters: [Pleroma.Upload.Filter.Dedupe],
66 filename_display_max_length: 30,
67 default_description: nil
69 config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
71 config :pleroma, Pleroma.Uploaders.S3,
73 streaming_enabled: true,
74 public_endpoint: "https://s3.amazonaws.com"
76 config :pleroma, :emoji,
77 shortcode_globs: ["/emoji/custom/**/*.png"],
78 pack_extensions: [".png", ".gif"],
80 Custom: ["/emoji/*.png", "/emoji/**/*.png"]
82 default_manifest: "https://git.pleroma.social/pleroma/emoji-index/raw/master/index.json",
83 shared_pack_cache_seconds_per_file: 60
85 config :pleroma, :uri_schemes,
107 {Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
108 {Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}
111 transport_log: false,
115 # Configures the endpoint
116 config :pleroma, Pleroma.Web.Endpoint,
117 url: [host: "localhost"],
123 {"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []},
124 {"/websocket", Phoenix.Endpoint.CowboyWebSocket,
125 {Phoenix.Transports.WebSocket,
126 {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}},
127 {:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}}
132 secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
133 signing_salt: "CqaoopA2",
134 render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
135 pubsub_server: Pleroma.PubSub,
136 secure_cookie_flag: true,
137 extra_cookie_attrs: [
141 # Configures Elixir's Logger
142 config :logger, :console,
144 format: "\n$time $metadata[$level] $message\n",
145 metadata: [:request_id]
147 config :logger, :ex_syslogger,
150 format: "$metadata[$level] $message",
151 metadata: [:request_id]
156 webhook_url: "https://hooks.slack.com/services/YOUR-KEY-HERE"
158 config :mime, :types, %{
159 "application/xml" => ["xml"],
160 "application/xrd+xml" => ["xrd+xml"],
161 "application/jrd+json" => ["jrd+json"],
162 "application/activity+json" => ["activity+json"],
163 "application/ld+json" => ["activity+json"]
166 config :tesla, adapter: Tesla.Adapter.Hackney
168 # Configures http settings, upstream proxy etc.
169 config :pleroma, :http,
171 send_user_agent: true,
172 user_agent: :default,
175 config :pleroma, :instance,
177 email: "example@example.com",
178 notify_email: "noreply@example.com",
179 description: "Pleroma: An efficient and flexible fediverse server",
180 background_image: "/images/city.jpg",
181 instance_thumbnail: "/instance/thumbnail.jpeg",
183 description_limit: 5_000,
185 remote_limit: 100_000,
186 upload_limit: 16_000_000,
187 avatar_upload_limit: 2_000_000,
188 background_upload_limit: 4_000_000,
189 banner_upload_limit: 4_000_000,
192 max_option_chars: 200,
194 max_expiration: 365 * 24 * 60 * 60
196 registrations_open: true,
197 invites_enabled: false,
198 account_activation_required: false,
199 account_approval_required: false,
201 federation_incoming_replies_max_depth: 100,
202 federation_reachability_timeout_days: 7,
203 federation_publisher_modules: [
204 Pleroma.Web.ActivityPub.Publisher
208 quarantined_instances: [],
209 static_dir: "instance/static/",
210 allowed_post_formats: [
216 autofollowed_nicknames: [],
217 autofollowing_nicknames: [],
218 max_pinned_statuses: 1,
219 attachment_links: false,
220 max_report_comment_size: 1000,
221 safe_dm_mentions: false,
223 remote_post_retention_days: 90,
224 skip_thread_containment: true,
225 limit_to_local_content: :unauthenticated,
226 user_bio_length: 5000,
227 user_name_length: 100,
228 max_account_fields: 10,
229 max_remote_account_fields: 20,
230 account_field_name_length: 512,
231 account_field_value_length: 2048,
232 registration_reason_length: 500,
233 external_user_synchronization: true,
234 extended_nickname_format: true,
235 cleanup_attachments: false,
236 multi_factor_authentication: [
247 show_reactions: true,
248 password_reset_token_validity: 60 * 60 * 24
250 config :pleroma, :welcome,
253 sender_nickname: nil,
258 sender_nickname: nil,
264 subject: "Welcome to <%= instance_name %>",
265 html: "Welcome to <%= instance_name %>",
266 text: "Welcome to <%= instance_name %>"
269 config :pleroma, :feed,
275 config :pleroma, :markup,
276 # XXX - unfortunately, inline images must be enabled by default right now, because
277 # of custom emoji. Issue #275 discusses defanging that somehow.
278 allow_inline_images: true,
279 allow_headings: false,
283 Pleroma.HTML.Scrubber.Default,
284 Pleroma.HTML.Transform.MediaProxy
287 config :pleroma, :frontend_configurations,
289 alwaysShowSubjectInput: true,
290 background: "/images/city.jpg",
291 collapseMessageWithSubject: false,
294 hideFilteredStatuses: false,
295 hideMutedPosts: false,
296 hidePostStats: false,
298 hideUserStats: false,
299 loginMethod: "password",
300 logo: "/static/logo.svg",
303 minimalScopesMode: false,
304 noAttachmentLinks: false,
306 postContentType: "text/plain",
307 redirectRootLogin: "/main/friends",
308 redirectRootNoLogin: "/main/all",
311 showFeaturesPanel: true,
312 showInstanceSpecificPanel: false,
313 subjectLineBehavior: "email",
314 theme: "pleroma-dark",
315 webPushNotifications: false
318 showInstanceSpecificPanel: true
321 config :pleroma, :assets,
324 url: "/images/pleroma-fox-tan-smol.png",
325 mime_type: "image/png"
327 pleroma_fox_tan_shy: %{
328 url: "/images/pleroma-fox-tan-shy.png",
329 mime_type: "image/png"
332 default_mascot: :pleroma_fox_tan
334 config :pleroma, :manifest,
337 src: "/static/logo.svg",
338 type: "image/svg+xml"
341 theme_color: "#282c37",
342 background_color: "#191b22"
344 config :pleroma, :activitypub,
345 unfollow_blocked: true,
346 outgoing_blocks: true,
347 follow_handshake_timeout: 500,
348 note_replies_output_limit: 5,
349 sign_object_fetches: true,
350 authorized_fetch_mode: false
352 config :pleroma, :streamer,
356 config :pleroma, :user, deny_follow_blocked: true
358 config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
360 config :pleroma, :mrf_rejectnonpublic,
361 allow_followersonly: false,
364 config :pleroma, :mrf_hellthread,
365 delist_threshold: 10,
368 config :pleroma, :mrf_simple,
371 federated_timeline_removal: [],
380 config :pleroma, :mrf_keyword,
382 federated_timeline_removal: [],
385 config :pleroma, :mrf_subchain, match_actor: %{}
387 config :pleroma, :mrf_activity_expiration, days: 365
389 config :pleroma, :mrf_vocabulary,
393 # threshold of 7 days
394 config :pleroma, :mrf_object_age,
396 actions: [:delist, :strip_followers]
398 config :pleroma, :rich_media,
401 ignore_tld: ["local", "localdomain", "lan"],
403 Pleroma.Web.RichMedia.Parsers.TwitterCard,
404 Pleroma.Web.RichMedia.Parsers.OEmbed
406 failure_backoff: 60_000,
407 ttl_setters: [Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl]
409 config :pleroma, :media_proxy,
413 provider: Pleroma.Web.MediaProxy.Invalidation.Script
416 redirect_on_failure: false,
417 max_body_length: 25 * 1_048_576,
418 # Note: max_read_duration defaults to Pleroma.ReverseProxy.max_read_duration_default/1
419 max_read_duration: 30_000,
421 follow_redirect: true,
427 config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Http,
432 config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Script, script_path: nil
434 # Note: media preview proxy depends on media proxy to be enabled
435 config :pleroma, :media_preview_proxy,
437 thumbnail_max_width: 600,
438 thumbnail_max_height: 600,
440 min_content_length: 100 * 1024
442 config :pleroma, :chat, enabled: true
444 config :phoenix, :format_encoders, json: Jason
446 config :phoenix, :json_library, Jason
448 config :phoenix, :filter_parameters, ["password", "confirm"]
450 config :pleroma, :gopher,
455 config :pleroma, Pleroma.Web.Metadata,
457 Pleroma.Web.Metadata.Providers.OpenGraph,
458 Pleroma.Web.Metadata.Providers.TwitterCard
462 config :pleroma, Pleroma.Web.Preload,
464 Pleroma.Web.Preload.Providers.Instance
467 config :pleroma, :http_security,
470 sts_max_age: 31_536_000,
471 ct_max_age: 2_592_000,
472 referrer_policy: "same-origin"
476 methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
481 "X-RateLimit-Remaining",
486 headers: ["Authorization", "Content-Type", "Idempotency-Key"]
488 config :pleroma, Pleroma.User,
489 restricted_nicknames: [
520 "verify_credentials",
521 "update_credentials",
524 "confirmation_resend",
529 config :pleroma, Oban,
533 activity_expiration: 10,
536 federator_incoming: 50,
537 federator_outgoing: 50,
542 scheduled_activities: 10,
545 attachments_cleanup: 5,
549 plugins: [Oban.Plugins.Pruner],
551 {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker},
552 {"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker}
555 config :pleroma, :workers,
557 federator_incoming: 5,
558 federator_outgoing: 5
561 config :pleroma, Pleroma.Formatter,
568 validate_tld: :no_scheme
570 config :pleroma, :ldap,
571 enabled: System.get_env("LDAP_ENABLED") == "true",
572 host: System.get_env("LDAP_HOST") || "localhost",
573 port: String.to_integer(System.get_env("LDAP_PORT") || "389"),
574 ssl: System.get_env("LDAP_SSL") == "true",
576 tls: System.get_env("LDAP_TLS") == "true",
578 base: System.get_env("LDAP_BASE") || "dc=example,dc=com",
579 uid: System.get_env("LDAP_UID") || "cn"
584 oauth_consumer_strategies =
585 System.get_env("OAUTH_CONSUMER_STRATEGIES")
588 |> Enum.map(&hd(String.split(&1, ":")))
590 ueberauth_providers =
591 for strategy <- oauth_consumer_strategies do
592 strategy_module_name = "Elixir.Ueberauth.Strategy.#{String.capitalize(strategy)}"
593 strategy_module = String.to_atom(strategy_module_name)
594 {String.to_atom(strategy), {strategy_module, [callback_params: ["state"]]}}
600 providers: ueberauth_providers
604 enforce_oauth_admin_scope_usage: true,
605 oauth_consumer_strategies: oauth_consumer_strategies
607 config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Sendmail, enabled: false
609 config :pleroma, Pleroma.Emails.UserEmail,
612 link_color: "#d8a070",
613 background_color: "#2C3645",
614 content_background_color: "#1B2635",
615 header_color: "#d8a070",
616 text_color: "#b9b9ba",
617 text_muted_color: "#b9b9ba"
620 config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: false
622 config :prometheus, Pleroma.Web.Endpoint.MetricsExporter,
626 path: "/api/pleroma/app_metrics",
629 config :pleroma, Pleroma.ScheduledActivity,
630 daily_user_limit: 25,
631 total_user_limit: 300,
634 config :pleroma, :email_notifications,
638 inactivity_threshold: 7
641 config :pleroma, :oauth2,
642 token_expires_in: 3600 * 24 * 365 * 100,
643 issue_new_refresh_token: true,
644 clean_expired_tokens: false
646 config :pleroma, :database, rum_enabled: false
648 config :pleroma, :env, Mix.env()
650 config :http_signatures,
651 adapter: Pleroma.Signature
653 config :pleroma, :rate_limit,
654 authentication: {60_000, 15},
656 search: [{1000, 10}, {1000, 30}],
657 app_account_creation: {1_800_000, 25},
658 relations_actions: {10_000, 10},
659 relation_id_action: {60_000, 2},
660 statuses_actions: {10_000, 15},
661 status_id_action: {60_000, 3},
662 password_reset: {1_800_000, 5},
663 account_confirmation_resend: {8_640_000, 5},
664 ap_routes: {60_000, 15}
666 config :pleroma, Pleroma.Workers.PurgeExpiredActivity, enabled: true, min_lifetime: 600
668 config :pleroma, Pleroma.Web.Plugs.RemoteIp,
670 headers: ["x-forwarded-for"],
681 config :pleroma, :static_fe, enabled: false
683 # Example of frontend configuration
684 # This example will make us serve the primary frontend from the
685 # frontends directory within your `:pleroma, :instance, static_dir`.
686 # e.g., instance/static/frontends/pleroma/develop/
688 # With no frontend configuration, the bundled files from the `static` directory will
691 # config :pleroma, :frontends,
692 # primary: %{"name" => "pleroma-fe", "ref" => "develop"},
693 # admin: %{"name" => "admin-fe", "ref" => "stable"},
696 config :pleroma, :frontends,
700 "git" => "https://git.pleroma.social/lambadalambda/kenoma",
702 "https://git.pleroma.social/lambadalambda/kenoma/-/jobs/artifacts/${ref}/download?job=build",
706 "name" => "pleroma-fe",
707 "git" => "https://git.pleroma.social/pleroma/pleroma-fe",
709 "https://git.pleroma.social/pleroma/pleroma-fe/-/jobs/artifacts/${ref}/download?job=build",
714 "git" => "https://git.pleroma.social/pleroma/fedi-fe",
716 "https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build",
720 "name" => "admin-fe",
721 "git" => "https://git.pleroma.social/pleroma/admin-fe",
723 "https://git.pleroma.social/pleroma/admin-fe/-/jobs/artifacts/${ref}/download?job=build",
727 "name" => "soapbox-fe",
728 "git" => "https://gitlab.com/soapbox-pub/soapbox-fe",
730 "https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/${ref}/download?job=build-production",
732 "build_dir" => "static"
736 config :pleroma, :web_cache_ttl,
738 activity_pub_question: 30_000
740 config :pleroma, :modules, runtime_dir: "instance/modules"
742 config :pleroma, configurable_from_database: false
744 config :pleroma, Pleroma.Repo,
745 parameters: [gin_fuzzy_search_limit: "500"],
748 config :pleroma, :connections_pool,
749 reclaim_multiplier: 0.1,
750 connection_acquisition_wait: 250,
751 connection_acquisition_retries: 5,
752 max_connections: 250,
753 max_idle_time: 30_000,
755 connect_timeout: 5_000
757 config :pleroma, :pools,
779 config :pleroma, :hackney_pools,
793 config :pleroma, :majic_pool, size: 2
795 private_instance? = :if_instance_is_private
797 config :pleroma, :restrict_unauthenticated,
798 timelines: %{local: private_instance?, federated: private_instance?},
799 profiles: %{local: private_instance?, remote: private_instance?},
800 activities: %{local: private_instance?, remote: private_instance?}
802 config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: false
804 config :pleroma, :mrf,
805 policies: [Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy, Pleroma.Web.ActivityPub.MRF.TagPolicy],
807 transparency_exclusions: []
809 config :tzdata, :http_client, Pleroma.HTTP.Tzdata
811 config :ex_aws, http_client: Pleroma.HTTP.ExAws
813 config :web_push_encryption, http_client: Pleroma.HTTP.WebPush
815 config :pleroma, :instances_favicons, enabled: false
817 config :floki, :html_parser, Floki.HTMLParser.FastHtml
819 config :pleroma, Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.PleromaAuthenticator
821 config :pleroma, Pleroma.User.Backup,
822 purge_after_days: 30,
826 # Import environment specific config. This must remain at the bottom
827 # of this file so it overrides the configuration defined above.
828 import_config "#{Mix.env()}.exs"