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 types: Pleroma.PostgresTypes,
51 telemetry_event: [Pleroma.Repo.Instrumenter],
54 config :pleroma, Pleroma.Captcha,
57 method: Pleroma.Captcha.Native
59 config :pleroma, :hackney_pools,
73 # Upload configuration
74 config :pleroma, Pleroma.Upload,
75 uploader: Pleroma.Uploaders.Local,
76 filters: [Pleroma.Upload.Filter.Dedupe],
80 redirect_on_failure: false,
81 max_body_length: 25 * 1_048_576,
83 follow_redirect: true,
88 config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
90 config :pleroma, Pleroma.Uploaders.S3,
92 public_endpoint: "https://s3.amazonaws.com"
94 config :pleroma, Pleroma.Uploaders.MDII,
95 cgi: "https://mdii.sakura.ne.jp/mdii-post.cgi",
96 files: "https://mdii.sakura.ne.jp"
98 config :pleroma, :emoji,
99 shortcode_globs: ["/emoji/custom/**/*.png"],
100 pack_extensions: [".png", ".gif"],
102 # Put groups that have higher priority than defaults here. Example in `docs/config/custom_emoji.md`
103 Custom: ["/emoji/*.png", "/emoji/**/*.png"]
105 default_manifest: "https://git.pleroma.social/pleroma/emoji-index/raw/master/index.json"
107 config :pleroma, :uri_schemes,
128 {Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
129 {Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}
132 transport_log: false,
136 # Configures the endpoint
137 config :pleroma, Pleroma.Web.Endpoint,
138 instrumenters: [Pleroma.Web.Endpoint.Instrumenter],
139 url: [host: "localhost"],
145 {"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []},
146 {"/websocket", Phoenix.Endpoint.CowboyWebSocket,
147 {Phoenix.Transports.WebSocket,
148 {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}},
149 {:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}}
154 secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
155 signing_salt: "CqaoopA2",
156 render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
157 pubsub: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2],
158 secure_cookie_flag: true,
159 extra_cookie_attrs: [
163 # Configures Elixir's Logger
164 config :logger, :console,
165 format: "$time $metadata[$level] $message\n",
166 metadata: [:request_id]
168 config :logger, :ex_syslogger,
171 format: "$metadata[$level] $message",
172 metadata: [:request_id]
177 webhook_url: "https://hooks.slack.com/services/YOUR-KEY-HERE"
179 config :mime, :types, %{
180 "application/xml" => ["xml"],
181 "application/xrd+xml" => ["xrd+xml"],
182 "application/jrd+json" => ["jrd+json"],
183 "application/activity+json" => ["activity+json"],
184 "application/ld+json" => ["activity+json"]
187 config :tesla, adapter: Tesla.Adapter.Hackney
189 # Configures http settings, upstream proxy etc.
190 config :pleroma, :http,
192 send_user_agent: true,
195 # Workaround for remote server certificate chain issues
196 partial_chain: &:hackney_connect.partial_chain/1,
197 # We don't support TLS v1.3 yet
198 versions: [:tlsv1, :"tlsv1.1", :"tlsv1.2"]
202 config :pleroma, :instance,
204 email: "example@example.com",
205 notify_email: "noreply@example.com",
206 description: "A Pleroma instance, an alternative fediverse server",
208 remote_limit: 100_000,
209 upload_limit: 16_000_000,
210 avatar_upload_limit: 2_000_000,
211 background_upload_limit: 4_000_000,
212 banner_upload_limit: 4_000_000,
215 max_option_chars: 200,
217 max_expiration: 365 * 24 * 60 * 60
219 registrations_open: true,
221 federation_incoming_replies_max_depth: 100,
222 federation_reachability_timeout_days: 7,
223 federation_publisher_modules: [
224 Pleroma.Web.ActivityPub.Publisher,
229 rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy,
231 quarantined_instances: [],
232 managed_config: true,
233 static_dir: "instance/static/",
234 allowed_post_formats: [
240 mrf_transparency: true,
241 mrf_transparency_exclusions: [],
242 autofollowed_nicknames: [],
243 max_pinned_statuses: 1,
244 no_attachment_links: false,
245 welcome_user_nickname: nil,
246 welcome_message: nil,
247 max_report_comment_size: 1000,
248 safe_dm_mentions: false,
250 remote_post_retention_days: 90,
251 skip_thread_containment: true,
252 limit_to_local_content: :unauthenticated,
253 dynamic_configuration: false,
254 user_bio_length: 5000,
255 user_name_length: 100,
256 max_account_fields: 10,
257 max_remote_account_fields: 20,
258 account_field_name_length: 512,
259 account_field_value_length: 512,
260 external_user_synchronization: true
262 config :pleroma, :markup,
263 # XXX - unfortunately, inline images must be enabled by default right now, because
264 # of custom emoji. Issue #275 discusses defanging that somehow.
265 allow_inline_images: true,
266 allow_headings: false,
270 Pleroma.HTML.Transform.MediaProxy,
271 Pleroma.HTML.Scrubber.Default
274 config :pleroma, :frontend_configurations,
276 theme: "pleroma-dark",
277 logo: "/static/logo.png",
278 background: "/images/city.jpg",
279 redirectRootNoLogin: "/main/all",
280 redirectRootLogin: "/main/friends",
281 showInstanceSpecificPanel: true,
282 scopeOptionsEnabled: false,
283 formattingOptionsEnabled: false,
284 collapseMessageWithSubject: false,
285 hidePostStats: false,
286 hideUserStats: false,
288 subjectLineBehavior: "email",
289 alwaysShowSubjectInput: true
292 showInstanceSpecificPanel: true
295 config :pleroma, :assets,
298 url: "/images/pleroma-fox-tan-smol.png",
299 mime_type: "image/png"
301 pleroma_fox_tan_shy: %{
302 url: "/images/pleroma-fox-tan-shy.png",
303 mime_type: "image/png"
306 default_mascot: :pleroma_fox_tan
308 config :pleroma, :activitypub,
309 unfollow_blocked: true,
310 outgoing_blocks: true,
311 follow_handshake_timeout: 500,
312 sign_object_fetches: true
314 config :pleroma, :streamer,
318 config :pleroma, :user, deny_follow_blocked: true
320 config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default
322 config :pleroma, :mrf_rejectnonpublic,
323 allow_followersonly: false,
326 config :pleroma, :mrf_hellthread,
327 delist_threshold: 10,
330 config :pleroma, :mrf_simple,
333 federated_timeline_removal: [],
340 config :pleroma, :mrf_keyword,
342 federated_timeline_removal: [],
345 config :pleroma, :mrf_subchain, match_actor: %{}
347 config :pleroma, :mrf_vocabulary,
351 config :pleroma, :rich_media,
354 ignore_tld: ["local", "localdomain", "lan"],
356 Pleroma.Web.RichMedia.Parsers.TwitterCard,
357 Pleroma.Web.RichMedia.Parsers.OGP,
358 Pleroma.Web.RichMedia.Parsers.OEmbed
360 ttl_setters: [Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl]
362 config :pleroma, :media_proxy,
365 redirect_on_failure: false,
366 max_body_length: 25 * 1_048_576,
368 follow_redirect: true,
374 config :pleroma, :chat, enabled: true
376 config :phoenix, :format_encoders, json: Jason
378 config :phoenix, :json_library, Jason
380 config :pleroma, :gopher,
385 config :pleroma, Pleroma.Web.Metadata,
387 Pleroma.Web.Metadata.Providers.OpenGraph,
388 Pleroma.Web.Metadata.Providers.TwitterCard,
389 Pleroma.Web.Metadata.Providers.RelMe
393 config :pleroma, :suggestions,
396 "http://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-suggestions-api.cgi?{{host}}+{{user}}",
399 web: "https://vinayaka.distsn.org"
401 config :pleroma, :http_security,
404 sts_max_age: 31_536_000,
405 ct_max_age: 2_592_000,
406 referrer_policy: "same-origin"
410 methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
415 "X-RateLimit-Remaining",
420 headers: ["Authorization", "Content-Type", "Idempotency-Key"]
422 config :pleroma, Pleroma.User,
423 restricted_nicknames: [
456 config :pleroma, Pleroma.Web.Federator.RetryQueue,
462 config :pleroma_job_queue, :queues,
463 activity_expiration: 10,
464 federator_incoming: 50,
465 federator_outgoing: 50,
469 scheduled_activities: 10,
472 config :pleroma, :fetch_initial_posts,
480 # TODO: Set to :no_scheme when it works properly
488 config :pleroma, :ldap,
489 enabled: System.get_env("LDAP_ENABLED") == "true",
490 host: System.get_env("LDAP_HOST") || "localhost",
491 port: String.to_integer(System.get_env("LDAP_PORT") || "389"),
492 ssl: System.get_env("LDAP_SSL") == "true",
494 tls: System.get_env("LDAP_TLS") == "true",
496 base: System.get_env("LDAP_BASE") || "dc=example,dc=com",
497 uid: System.get_env("LDAP_UID") || "cn"
502 oauth_consumer_strategies =
503 System.get_env("OAUTH_CONSUMER_STRATEGIES")
506 |> Enum.map(&hd(String.split(&1, ":")))
508 ueberauth_providers =
509 for strategy <- oauth_consumer_strategies do
510 strategy_module_name = "Elixir.Ueberauth.Strategy.#{String.capitalize(strategy)}"
511 strategy_module = String.to_atom(strategy_module_name)
512 {String.to_atom(strategy), {strategy_module, [callback_params: ["state"]]}}
518 providers: ueberauth_providers
520 config :pleroma, :auth, oauth_consumer_strategies: oauth_consumer_strategies
522 config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Sendmail, enabled: false
524 config :pleroma, Pleroma.Emails.UserEmail,
527 link_color: "#d8a070",
528 background_color: "#2C3645",
529 content_background_color: "#1B2635",
530 header_color: "#d8a070",
531 text_color: "#b9b9ba",
532 text_muted_color: "#b9b9ba"
535 config :prometheus, Pleroma.Web.Endpoint.MetricsExporter, path: "/api/pleroma/app_metrics"
537 config :pleroma, Pleroma.ScheduledActivity,
538 daily_user_limit: 25,
539 total_user_limit: 300,
542 config :pleroma, :email_notifications,
545 schedule: "0 0 * * 0",
547 inactivity_threshold: 7
550 config :pleroma, :oauth2,
551 token_expires_in: 600,
552 issue_new_refresh_token: true,
553 clean_expired_tokens: false,
554 clean_expired_tokens_interval: 86_400_000
556 config :pleroma, :database, rum_enabled: false
558 config :pleroma, :env, Mix.env()
560 config :http_signatures,
561 adapter: Pleroma.Signature
563 config :pleroma, :rate_limit, nil
565 config :pleroma, Pleroma.ActivityExpiration, enabled: true
567 config :pleroma, :web_cache_ttl,
569 activity_pub_question: 30_000
571 # Import environment specific config. This must remain at the bottom
572 # of this file so it overrides the configuration defined above.
573 import_config "#{Mix.env()}.exs"