config.exs 21.8 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#                                 .i;;;;i.
#                               iYcviii;vXY:
#                             .YXi       .i1c.
#                            .YC.     .    in7.
#                           .vc.   ......   ;1c.
#                           i7,   ..        .;1;
#                          i7,   .. ...      .Y1i
#                         ,7v     .6MMM@;     .YX,
#                        .7;.   ..IMMMMMM1     :t7.
#                       .;Y.     ;$MMMMMM9.     :tc.
#                       vY.   .. .nMMM@MMU.      ;1v.
#                      i7i   ...  .#MM@M@C. .....:71i
#                     it:   ....   $MMM@9;.,i;;;i,;tti
#                    :t7.  .....   0MMMWv.,iii:::,,;St.
#                   .nC.   .....   IMMMQ..,::::::,.,czX.
#                  .ct:   ....... .ZMMMI..,:::::::,,:76Y.
#                  c2:   ......,i..Y$M@t..:::::::,,..inZY
#                 vov   ......:ii..c$MBc..,,,,,,,,,,..iI9i
#                i9Y   ......iii:..7@MA,..,,,,,,,,,....;AA:
#               iIS.  ......:ii::..;@MI....,............;Ez.
#              .I9.  ......:i::::...8M1..................C0z.
#             .z9;  ......:i::::,.. .i:...................zWX.
#             vbv  ......,i::::,,.      ................. :AQY
#            c6Y.  .,...,::::,,..:t0@@QY. ................ :8bi
#           :6S. ..,,...,:::,,,..EMMMMMMI. ............... .;bZ,
#          :6o,  .,,,,..:::,,,..i#MMMMMM#v.................  YW2.
#         .n8i ..,,,,,,,::,,,,.. tMMMMM@C:.................. .1Wn
#         7Uc. .:::,,,,,::,,,,..   i1t;,..................... .UEi
#         7C...::::::::::::,,,,..        ....................  vSi.
#         ;1;...,,::::::,.........       ..................    Yz:
#          v97,.........                                     .voC.
#           izAotX7777777777777777777777777777777777777777Y7n92:
#             .;CoIIIIIUAA666666699999ZZZZZZZZZZZZZZZZZZZZ6ov.
#
#                          !!! ATTENTION !!!
# DO NOT EDIT THIS FILE! THIS FILE CONTAINS THE DEFAULT VALUES FOR THE CON-
# FIGURATION! EDIT YOUR SECRET FILE (either prod.secret.exs, dev.secret.exs).
#
lain's avatar
lain committed
39
40
41
42
43
44
45
46
# This file is responsible for configuring your application
# and its dependencies with the aid of the Mix.Config module.
#
# This configuration file is loaded before any dependency and
# is restricted to this project.
use Mix.Config

# General application configuration
lain's avatar
lain committed
47
config :pleroma, ecto_repos: [Pleroma.Repo]
lain's avatar
lain committed
48

href's avatar
href committed
49
50
config :pleroma, Pleroma.Repo,
  types: Pleroma.PostgresTypes,
lain's avatar
lain committed
51
  telemetry_event: [Pleroma.Repo.Instrumenter],
52
  migration_lock: nil
href's avatar
href committed
53

54
config :pleroma, Pleroma.Captcha,
55
  enabled: true,
56
  seconds_valid: 300,
57
  method: Pleroma.Captcha.Native
58

59
60
config :pleroma, Pleroma.Captcha.Kocaptcha, endpoint: "https://captcha.kotobank.ch"

href's avatar
href committed
61
# Upload configuration
gled's avatar
gled committed
62
config :pleroma, Pleroma.Upload,
Thurloat's avatar
Thurloat committed
63
  uploader: Pleroma.Uploaders.Local,
rinpatch's avatar
rinpatch committed
64
  filters: [Pleroma.Upload.Filter.Dedupe],
rinpatch's avatar
rinpatch committed
65
  link_name: false,
href's avatar
href committed
66
  proxy_remote: false,
href's avatar
href committed
67
68
69
70
71
72
73
  proxy_opts: [
    redirect_on_failure: false,
    max_body_length: 25 * 1_048_576,
    http: [
      follow_redirect: true,
      pool: :upload
    ]
74
  ],
75
76
  filename_display_max_length: 30,
  default_description: nil
href's avatar
href committed
77

href's avatar
href committed
78
config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
79

80
81
config :pleroma, Pleroma.Uploaders.S3,
  bucket: nil,
82
  streaming_enabled: true,
href's avatar
href committed
83
  public_endpoint: "https://s3.amazonaws.com"
lain's avatar
lain committed
84

85
86
config :pleroma, :emoji,
  shortcode_globs: ["/emoji/custom/**/*.png"],
87
  pack_extensions: [".png", ".gif"],
88
  groups: [
89
    Custom: ["/emoji/*.png", "/emoji/**/*.png"]
90
  ],
vaartis's avatar
vaartis committed
91
92
  default_manifest: "https://git.pleroma.social/pleroma/emoji-index/raw/master/index.json",
  shared_pack_cache_seconds_per_file: 60
Jorty's avatar
Jorty committed
93

94
95
96
97
98
99
100
config :pleroma, :uri_schemes,
  valid_schemes: [
    "https",
    "http",
    "dat",
    "dweb",
    "gopher",
DYM's avatar
DYM committed
101
    "hyper",
102
103
104
105
106
107
108
109
110
111
    "ipfs",
    "ipns",
    "irc",
    "ircs",
    "magnet",
    "mailto",
    "mumble",
    "ssb",
    "xmpp"
  ]
112

lain's avatar
lain committed
113
114
115
116
117
118
119
120
121
122
123
websocket_config = [
  path: "/websocket",
  serializer: [
    {Phoenix.Socket.V1.JSONSerializer, "~> 1.0.0"},
    {Phoenix.Socket.V2.JSONSerializer, "~> 2.0.0"}
  ],
  timeout: 60_000,
  transport_log: false,
  compress: false
]

lain's avatar
lain committed
124
125
126
# Configures the endpoint
config :pleroma, Pleroma.Web.Endpoint,
  url: [host: "localhost"],
href's avatar
href committed
127
  http: [
128
    ip: {127, 0, 0, 1},
href's avatar
href committed
129
130
131
    dispatch: [
      {:_,
       [
132
         {"/api/fedsocket/v1", Pleroma.Web.FedSockets.IncomingHandler, []},
133
         {"/api/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []},
kaniini's avatar
kaniini committed
134
135
136
         {"/websocket", Phoenix.Endpoint.CowboyWebSocket,
          {Phoenix.Transports.WebSocket,
           {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}},
137
         {:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}}
href's avatar
href committed
138
139
140
       ]}
    ]
  ],
lain's avatar
lain committed
141
  protocol: "https",
lain's avatar
lain committed
142
  secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
href's avatar
href committed
143
  signing_salt: "CqaoopA2",
lain's avatar
lain committed
144
  render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
145
  pubsub_server: Pleroma.PubSub,
146
147
148
149
  secure_cookie_flag: true,
  extra_cookie_attrs: [
    "SameSite=Lax"
  ]
lain's avatar
lain committed
150

151
152
153
154
155
156
157
158
159
160
config :pleroma, :fed_sockets,
  enabled: false,
  connection_duration: :timer.hours(8),
  rejection_duration: :timer.minutes(15),
  fed_socket_fetches: [
    default: 12_000,
    interval: 3_000,
    lazy: false
  ]

lain's avatar
lain committed
161
162
# Configures Elixir's Logger
config :logger, :console,
163
  level: :debug,
164
  format: "\n$time $metadata[$level] $message\n",
lain's avatar
lain committed
165
166
  metadata: [:request_id]

167
168
config :logger, :ex_syslogger,
  level: :debug,
169
  ident: "pleroma",
170
  format: "$metadata[$level] $message",
171
172
  metadata: [:request_id]

173
174
175
176
177
config :quack,
  level: :warn,
  meta: [:all],
  webhook_url: "https://hooks.slack.com/services/YOUR-KEY-HERE"

lain's avatar
lain committed
178
config :mime, :types, %{
179
  "application/xml" => ["xml"],
lain's avatar
lain committed
180
  "application/xrd+xml" => ["xrd+xml"],
181
  "application/jrd+json" => ["jrd+json"],
lain's avatar
lain committed
182
183
  "application/activity+json" => ["activity+json"],
  "application/ld+json" => ["activity+json"]
lain's avatar
lain committed
184
185
}

lain's avatar
lain committed
186
config :tesla, adapter: Tesla.Adapter.Hackney
lain's avatar
lain committed
187

jeff's avatar
docs    
jeff committed
188
# Configures http settings, upstream proxy etc.
189
190
config :pleroma, :http,
  proxy_url: nil,
191
  send_user_agent: true,
192
  user_agent: :default,
Alexander Strizhakov's avatar
Alexander Strizhakov committed
193
  adapter: []
194

lain's avatar
lain committed
195
196
config :pleroma, :instance,
  name: "Pleroma",
197
  email: "example@example.com",
198
  notify_email: "noreply@example.com",
199
  description: "Pleroma: An efficient and flexible fediverse server",
200
  background_image: "/images/city.jpg",
201
  instance_thumbnail: "/instance/thumbnail.jpeg",
202
  limit: 5_000,
lain's avatar
lain committed
203
  description_limit: 5_000,
204
  chat_limit: 5_000,
lain's avatar
lain committed
205
  remote_limit: 100_000,
206
  upload_limit: 16_000_000,
207
208
209
  avatar_upload_limit: 2_000_000,
  background_upload_limit: 4_000_000,
  banner_upload_limit: 4_000_000,
210
211
212
213
214
215
  poll_limits: %{
    max_options: 20,
    max_option_chars: 200,
    min_expiration: 0,
    max_expiration: 365 * 24 * 60 * 60
  },
lain's avatar
lain committed
216
  registrations_open: true,
217
218
  invites_enabled: false,
  account_activation_required: false,
219
  account_approval_required: false,
220
  federating: true,
221
  federation_incoming_replies_max_depth: 100,
222
  federation_reachability_timeout_days: 7,
223
  federation_publisher_modules: [
224
    Pleroma.Web.ActivityPub.Publisher
225
  ],
226
  allow_relay: true,
227
  public: true,
228
  quarantined_instances: [],
href's avatar
href committed
229
  static_dir: "instance/static/",
230
231
232
  allowed_post_formats: [
    "text/plain",
    "text/html",
kaniini's avatar
kaniini committed
233
234
    "text/markdown",
    "text/bbcode"
235
  ],
236
  autofollowed_nicknames: [],
237
  autofollowing_nicknames: [],
feld's avatar
feld committed
238
  max_pinned_statuses: 1,
239
  attachment_links: false,
lain's avatar
lain committed
240
  max_report_comment_size: 1000,
241
  safe_dm_mentions: false,
242
  healthcheck: false,
Maksim's avatar
Maksim committed
243
  remote_post_retention_days: 90,
244
  skip_thread_containment: true,
245
  limit_to_local_content: :unauthenticated,
246
247
  user_bio_length: 5000,
  user_name_length: 100,
248
249
  max_account_fields: 10,
  max_remote_account_fields: 20,
250
  account_field_name_length: 512,
251
  account_field_value_length: 2048,
252
  registration_reason_length: 500,
253
  external_user_synchronization: true,
254
  extended_nickname_format: true,
255
256
257
258
259
260
261
262
263
264
265
  cleanup_attachments: false,
  multi_factor_authentication: [
    totp: [
      # digits 6 or 8
      digits: 6,
      period: 30
    ],
    backup_codes: [
      number: 5,
      length: 16
    ]
266
267
  ],
  show_reactions: true
lain's avatar
lain committed
268

Maksim's avatar
Maksim committed
269
270
271
272
273
274
config :pleroma, :welcome,
  direct_message: [
    enabled: false,
    sender_nickname: nil,
    message: nil
  ],
Ilja's avatar
Ilja committed
275
276
277
278
279
  chat_message: [
    enabled: false,
    sender_nickname: nil,
    message: nil
  ],
Maksim's avatar
Maksim committed
280
281
  email: [
    enabled: false,
Maksim's avatar
Maksim committed
282
    sender: nil,
Maksim's avatar
Maksim committed
283
284
285
286
287
    subject: "Welcome to <%= instance_name %>",
    html: "Welcome to <%= instance_name %>",
    text: "Welcome to <%= instance_name %>"
  ]

Maksim's avatar
Maksim committed
288
289
290
config :pleroma, :feed,
  post_title: %{
    max_length: 100,
lain's avatar
lain committed
291
    omission: "..."
Maksim's avatar
Maksim committed
292
293
  }

294
config :pleroma, :markup,
295
296
297
  # XXX - unfortunately, inline images must be enabled by default right now, because
  # of custom emoji.  Issue #275 discusses defanging that somehow.
  allow_inline_images: true,
298
299
300
  allow_headings: false,
  allow_tables: false,
  allow_fonts: false,
301
  scrub_policy: [
302
303
    Pleroma.HTML.Scrubber.Default,
    Pleroma.HTML.Transform.MediaProxy
304
  ]
305

lain's avatar
lain committed
306
307
config :pleroma, :frontend_configurations,
  pleroma_fe: %{
feld's avatar
feld committed
308
    alwaysShowSubjectInput: true,
309
    background: "/images/city.jpg",
lain's avatar
lain committed
310
    collapseMessageWithSubject: false,
feld's avatar
feld committed
311
312
313
314
    disableChat: false,
    greentext: false,
    hideFilteredStatuses: false,
    hideMutedPosts: false,
lain's avatar
lain committed
315
    hidePostStats: false,
feld's avatar
feld committed
316
    hideSitename: false,
lain's avatar
lain committed
317
    hideUserStats: false,
feld's avatar
feld committed
318
319
320
321
322
323
324
325
326
327
    loginMethod: "password",
    logo: "/static/logo.png",
    logoMargin: ".1em",
    logoMask: true,
    minimalScopesMode: false,
    noAttachmentLinks: false,
    nsfwCensorImage: "",
    postContentType: "text/plain",
    redirectRootLogin: "/main/friends",
    redirectRootNoLogin: "/main/all",
lain's avatar
lain committed
328
    scopeCopy: true,
feld's avatar
feld committed
329
    sidebarRight: false,
feld's avatar
feld committed
330
331
    showFeaturesPanel: true,
    showInstanceSpecificPanel: false,
lain's avatar
lain committed
332
    subjectLineBehavior: "email",
feld's avatar
feld committed
333
334
    theme: "pleroma-dark",
    webPushNotifications: false
Haelwenn's avatar
Haelwenn committed
335
336
337
  },
  masto_fe: %{
    showInstanceSpecificPanel: true
lain's avatar
lain committed
338
339
  }

340
341
342
343
344
345
346
347
348
349
350
351
352
config :pleroma, :assets,
  mascots: [
    pleroma_fox_tan: %{
      url: "/images/pleroma-fox-tan-smol.png",
      mime_type: "image/png"
    },
    pleroma_fox_tan_shy: %{
      url: "/images/pleroma-fox-tan-shy.png",
      mime_type: "image/png"
    }
  ],
  default_mascot: :pleroma_fox_tan

KokaKiwi's avatar
KokaKiwi committed
353
354
355
356
357
358
359
360
361
362
config :pleroma, :manifest,
  icons: [
    %{
      src: "/static/logo.png",
      type: "image/png"
    }
  ],
  theme_color: "#282c37",
  background_color: "#191b22"

363
364
config :pleroma, :activitypub,
  unfollow_blocked: true,
365
  outgoing_blocks: true,
366
  follow_handshake_timeout: 500,
367
  note_replies_output_limit: 5,
368
369
  sign_object_fetches: true,
  authorized_fetch_mode: false
370

371
372
373
374
config :pleroma, :streamer,
  workers: 3,
  overflow_workers: 2

squidboi's avatar
squidboi committed
375
config :pleroma, :user, deny_follow_blocked: true
376

377
378
config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default

379
380
381
382
config :pleroma, :mrf_rejectnonpublic,
  allow_followersonly: false,
  allow_direct: false

Karen Konou's avatar
Karen Konou committed
383
config :pleroma, :mrf_hellthread,
384
385
  delist_threshold: 10,
  reject_threshold: 20
Karen Konou's avatar
Karen Konou committed
386

387
388
389
390
config :pleroma, :mrf_simple,
  media_removal: [],
  media_nsfw: [],
  federated_timeline_removal: [],
391
  report_removal: [],
kaniini's avatar
kaniini committed
392
  reject: [],
393
  followers_only: [],
394
395
  accept: [],
  avatar_removal: [],
396
397
  banner_removal: [],
  reject_deletes: []
rinpatch's avatar
rinpatch committed
398

399
400
config :pleroma, :mrf_keyword,
  reject: [],
401
  federated_timeline_removal: [],
402
403
  replace: []

kaniini's avatar
kaniini committed
404
config :pleroma, :mrf_subchain, match_actor: %{}
kaniini's avatar
kaniini committed
405

minibikini's avatar
minibikini committed
406
407
config :pleroma, :mrf_activity_expiration, days: 365

kaniini's avatar
kaniini committed
408
409
410
411
config :pleroma, :mrf_vocabulary,
  accept: [],
  reject: []

412
# threshold of 7 days
413
config :pleroma, :mrf_object_age,
414
  threshold: 604_800,
415
416
  actions: [:delist, :strip_followers]

417
418
419
config :pleroma, :rich_media,
  enabled: true,
  ignore_hosts: [],
Alexander Strizhakov's avatar
Alexander Strizhakov committed
420
421
422
423
  ignore_tld: ["local", "localdomain", "lan"],
  parsers: [
    Pleroma.Web.RichMedia.Parsers.TwitterCard,
    Pleroma.Web.RichMedia.Parsers.OEmbed
424
  ],
rinpatch's avatar
rinpatch committed
425
  failure_backoff: 60_000,
426
  ttl_setters: [Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl]
427

href's avatar
href committed
428
429
config :pleroma, :media_proxy,
  enabled: false,
Maksim's avatar
Maksim committed
430
431
  invalidation: [
    enabled: false,
Maksim's avatar
Maksim committed
432
    provider: Pleroma.Web.MediaProxy.Invalidation.Script
Maksim's avatar
Maksim committed
433
  ],
href's avatar
href committed
434
435
436
  proxy_opts: [
    redirect_on_failure: false,
    max_body_length: 25 * 1_048_576,
437
438
    # Note: max_read_duration defaults to Pleroma.ReverseProxy.max_read_duration_default/1
    max_read_duration: 30_000,
href's avatar
href committed
439
440
441
442
    http: [
      follow_redirect: true,
      pool: :media
    ]
feld's avatar
feld committed
443
444
  ],
  whitelist: []
lain's avatar
lain committed
445

Maksim's avatar
Maksim committed
446
447
448
449
450
451
452
config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Http,
  method: :purge,
  headers: [],
  options: []

config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Script, script_path: nil

453
# Note: media preview proxy depends on media proxy to be enabled
454
455
config :pleroma, :media_preview_proxy,
  enabled: false,
456
457
  thumbnail_max_width: 600,
  thumbnail_max_height: 600,
458
459
  image_quality: 85,
  min_content_length: 100 * 1024
460

lain's avatar
lain committed
461
config :pleroma, :chat, enabled: true
462

lain's avatar
lain committed
463
config :phoenix, :format_encoders, json: Jason
lain's avatar
lain committed
464

rinpatch's avatar
rinpatch committed
465
466
config :phoenix, :json_library, Jason

467
468
config :phoenix, :filter_parameters, ["password", "confirm"]

lain's avatar
lain committed
469
470
471
472
473
config :pleroma, :gopher,
  enabled: false,
  ip: {0, 0, 0, 0},
  port: 9999

Alexander Strizhakov's avatar
Alexander Strizhakov committed
474
config :pleroma, Pleroma.Web.Metadata,
475
476
  providers: [
    Pleroma.Web.Metadata.Providers.OpenGraph,
477
    Pleroma.Web.Metadata.Providers.TwitterCard
478
  ],
Alexander Strizhakov's avatar
Alexander Strizhakov committed
479
  unfurl_nsfw: false
480

Steven Fuchs's avatar
Steven Fuchs committed
481
482
config :pleroma, Pleroma.Web.Preload,
  providers: [
lain's avatar
lain committed
483
    Pleroma.Web.Preload.Providers.Instance
Steven Fuchs's avatar
Steven Fuchs committed
484
485
  ]

kaniini's avatar
kaniini committed
486
config :pleroma, :http_security,
487
488
  enabled: true,
  sts: false,
489
  sts_max_age: 31_536_000,
490
491
  ct_max_age: 2_592_000,
  referrer_policy: "same-origin"
492

kaniini's avatar
kaniini committed
493
494
495
496
497
498
499
500
501
502
503
504
505
506
config :cors_plug,
  max_age: 86_400,
  methods: ["POST", "PUT", "DELETE", "GET", "PATCH", "OPTIONS"],
  expose: [
    "Link",
    "X-RateLimit-Reset",
    "X-RateLimit-Limit",
    "X-RateLimit-Remaining",
    "X-Request-Id",
    "Idempotency-Key"
  ],
  credentials: true,
  headers: ["Authorization", "Content-Type", "Idempotency-Key"]

lain's avatar
lain committed
507
508
config :pleroma, Pleroma.User,
  restricted_nicknames: [
feld's avatar
feld committed
509
    ".well-known",
lain's avatar
lain committed
510
    "~",
feld's avatar
feld committed
511
    "about",
lain's avatar
lain committed
512
513
    "activities",
    "api",
feld's avatar
feld committed
514
    "auth",
feld's avatar
feld committed
515
    "check_password",
feld's avatar
feld committed
516
517
518
519
520
521
522
    "dev",
    "friend-requests",
    "inbox",
    "internal",
    "main",
    "media",
    "nodeinfo",
lain's avatar
lain committed
523
524
    "notice",
    "oauth",
feld's avatar
feld committed
525
526
527
528
    "objects",
    "ostatus_subscribe",
    "pleroma",
    "proxy",
lain's avatar
lain committed
529
    "push",
feld's avatar
feld committed
530
    "registration",
lain's avatar
lain committed
531
    "relay",
feld's avatar
feld committed
532
533
534
535
    "settings",
    "status",
    "tag",
    "user-search",
feld's avatar
feld committed
536
    "user_exists",
feld's avatar
feld committed
537
    "users",
538
539
540
541
542
543
544
    "web",
    "verify_credentials",
    "update_credentials",
    "relationships",
    "search",
    "confirmation_resend",
    "mfa"
545
546
  ],
  email_blacklist: []
lain's avatar
lain committed
547

548
549
config :pleroma, Oban,
  repo: Pleroma.Repo,
Maksim's avatar
Maksim committed
550
  log: false,
551
  queues: [
552
    activity_expiration: 10,
553
    token_expiration: 5,
minibikini's avatar
minibikini committed
554
    backup: 1,
555
556
    federator_incoming: 50,
    federator_outgoing: 50,
557
    ingestion_queue: 50,
558
559
560
561
    web_push: 50,
    mailer: 10,
    transmogrifier: 20,
    scheduled_activities: 10,
562
    background: 5,
563
    remote_fetcher: 2,
564
    attachments_cleanup: 5,
minibikini's avatar
minibikini committed
565
    new_users_digest: 1
566
  ],
rinpatch's avatar
rinpatch committed
567
  plugins: [Oban.Plugins.Pruner],
568
  crontab: [
569
    {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker},
570
    {"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker}
571
  ]
minibikini's avatar
minibikini committed
572

573
574
575
576
577
578
config :pleroma, :workers,
  retries: [
    federator_incoming: 5,
    federator_outgoing: 5
  ]

579
580
581
582
583
584
585
586
config :pleroma, Pleroma.Formatter,
  class: false,
  rel: "ugc",
  new_window: false,
  truncate: false,
  strip_prefix: false,
  extra: true,
  validate_tld: :no_scheme
minibikini's avatar
minibikini committed
587

link0ff's avatar
link0ff committed
588
589
590
591
592
593
config :pleroma, :ldap,
  enabled: System.get_env("LDAP_ENABLED") == "true",
  host: System.get_env("LDAP_HOST") || "localhost",
  port: String.to_integer(System.get_env("LDAP_PORT") || "389"),
  ssl: System.get_env("LDAP_SSL") == "true",
  sslopts: [],
link0ff's avatar
link0ff committed
594
595
  tls: System.get_env("LDAP_TLS") == "true",
  tlsopts: [],
link0ff's avatar
link0ff committed
596
597
598
  base: System.get_env("LDAP_BASE") || "dc=example,dc=com",
  uid: System.get_env("LDAP_UID") || "cn"

lain's avatar
lain committed
599
600
601
config :esshd,
  enabled: false

602
603
604
605
606
oauth_consumer_strategies =
  System.get_env("OAUTH_CONSUMER_STRATEGIES")
  |> to_string()
  |> String.split()
  |> Enum.map(&hd(String.split(&1, ":")))
607
608
609

ueberauth_providers =
  for strategy <- oauth_consumer_strategies do
610
    strategy_module_name = "Elixir.Ueberauth.Strategy.#{String.capitalize(strategy)}"
611
612
613
    strategy_module = String.to_atom(strategy_module_name)
    {String.to_atom(strategy), {strategy_module, [callback_params: ["state"]]}}
  end
614

Ivan Tashkinov's avatar
Ivan Tashkinov committed
615
616
617
config :ueberauth,
       Ueberauth,
       base_path: "/oauth",
618
619
       providers: ueberauth_providers

620
621
config :pleroma,
       :auth,
622
       enforce_oauth_admin_scope_usage: true,
623
       oauth_consumer_strategies: oauth_consumer_strategies
Ivan Tashkinov's avatar
Ivan Tashkinov committed
624

625
config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Sendmail, enabled: false
626

627
628
629
630
631
632
633
634
635
636
637
config :pleroma, Pleroma.Emails.UserEmail,
  logo: nil,
  styling: %{
    link_color: "#d8a070",
    background_color: "#2C3645",
    content_background_color: "#1B2635",
    header_color: "#d8a070",
    text_color: "#b9b9ba",
    text_muted_color: "#b9b9ba"
  }

638
639
config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: false

640
641
642
643
644
645
config :prometheus, Pleroma.Web.Endpoint.MetricsExporter,
  enabled: false,
  auth: false,
  ip_whitelist: [],
  path: "/api/pleroma/app_metrics",
  format: :text
646

647
648
649
650
651
config :pleroma, Pleroma.ScheduledActivity,
  daily_user_limit: 25,
  total_user_limit: 300,
  enabled: true

Roman Chvanikov's avatar
Roman Chvanikov committed
652
653
config :pleroma, :email_notifications,
  digest: %{
654
    active: false,
Roman Chvanikov's avatar
Roman Chvanikov committed
655
656
657
658
    interval: 7,
    inactivity_threshold: 7
  }

Maksim's avatar
Maksim committed
659
660
config :pleroma, :oauth2,
  token_expires_in: 600,
661
  issue_new_refresh_token: true,
662
  clean_expired_tokens: false
Maksim's avatar
Maksim committed
663

664
665
config :pleroma, :database, rum_enabled: false

666
667
config :pleroma, :env, Mix.env()

668
669
670
config :http_signatures,
  adapter: Pleroma.Signature

671
672
config :pleroma, :rate_limit,
  authentication: {60_000, 15},
673
  timeline: {500, 3},
674
675
676
677
678
679
680
681
682
  search: [{1000, 10}, {1000, 30}],
  app_account_creation: {1_800_000, 25},
  relations_actions: {10_000, 10},
  relation_id_action: {60_000, 2},
  statuses_actions: {10_000, 15},
  status_id_action: {60_000, 3},
  password_reset: {1_800_000, 5},
  account_confirmation_resend: {8_640_000, 5},
  ap_routes: {60_000, 15}
683

684
config :pleroma, Pleroma.Workers.PurgeExpiredActivity, enabled: true, min_lifetime: 600
685

Alexander Strizhakov's avatar
Alexander Strizhakov committed
686
config :pleroma, Pleroma.Web.Plugs.RemoteIp,
687
688
689
690
691
692
693
694
695
696
697
  enabled: true,
  headers: ["x-forwarded-for"],
  proxies: [],
  reserved: [
    "127.0.0.0/8",
    "::1/128",
    "fc00::/7",
    "10.0.0.0/8",
    "172.16.0.0/12",
    "192.168.0.0/16"
  ]
minibikini's avatar
minibikini committed
698

699
700
config :pleroma, :static_fe, enabled: false

lain's avatar
lain committed
701
702
# Example of frontend configuration
# This example will make us serve the primary frontend from the
feld's avatar
feld committed
703
704
# frontends directory within your `:pleroma, :instance, static_dir`.
# e.g., instance/static/frontends/pleroma/develop/
lain's avatar
lain committed
705
706
707
708
#
# With no frontend configuration, the bundled files from the `static` directory will
# be used.
#
709
# config :pleroma, :frontends,
710
711
# primary: %{"name" => "pleroma-fe", "ref" => "develop"},
# admin: %{"name" => "admin-fe", "ref" => "stable"},
lain's avatar
lain committed
712
713
714
715
# available: %{...}

config :pleroma, :frontends,
  available: %{
716
717
718
719
720
721
722
723
724
    "kenoma" => %{
      "name" => "kenoma",
      "git" => "https://git.pleroma.social/lambadalambda/kenoma",
      "build_url" =>
        "https://git.pleroma.social/lambadalambda/kenoma/-/jobs/artifacts/${ref}/download?job=build",
      "ref" => "master"
    },
    "pleroma-fe" => %{
      "name" => "pleroma-fe",
lain's avatar
lain committed
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
      "git" => "https://git.pleroma.social/pleroma/pleroma-fe",
      "build_url" =>
        "https://git.pleroma.social/pleroma/pleroma-fe/-/jobs/artifacts/${ref}/download?job=build",
      "ref" => "develop"
    },
    "fedi-fe" => %{
      "name" => "fedi-fe",
      "git" => "https://git.pleroma.social/pleroma/fedi-fe",
      "build_url" =>
        "https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build",
      "ref" => "master"
    },
    "admin-fe" => %{
      "name" => "admin-fe",
      "git" => "https://git.pleroma.social/pleroma/admin-fe",
      "build_url" =>
        "https://git.pleroma.social/pleroma/admin-fe/-/jobs/artifacts/${ref}/download?job=build",
      "ref" => "develop"
    },
    "soapbox-fe" => %{
      "name" => "soapbox-fe",
      "git" => "https://gitlab.com/soapbox-pub/soapbox-fe",
      "build_url" =>
        "https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/${ref}/download?job=build-production",
      "ref" => "v1.0.0",
      "build_dir" => "static"
    }
  }
lain's avatar
lain committed
753

minibikini's avatar
minibikini committed
754
755
756
757
config :pleroma, :web_cache_ttl,
  activity_pub: nil,
  activity_pub_question: 30_000

758
759
config :pleroma, :modules, runtime_dir: "instance/modules"

760
761
config :pleroma, configurable_from_database: false

762
763
764
config :pleroma, Pleroma.Repo,
  parameters: [gin_fuzzy_search_limit: "500"],
  prepare: :unnamed
765

Alexander Strizhakov's avatar
Alexander Strizhakov committed
766
config :pleroma, :connections_pool,
767
  reclaim_multiplier: 0.1,
rinpatch's avatar
rinpatch committed
768
769
  connection_acquisition_wait: 250,
  connection_acquisition_retries: 5,
Alexander Strizhakov's avatar
Alexander Strizhakov committed
770
  max_connections: 250,
771
  max_idle_time: 30_000,
rinpatch's avatar
rinpatch committed
772
  retry: 0,
773
  connect_timeout: 5_000
Alexander Strizhakov's avatar
Alexander Strizhakov committed
774
775
776
777

config :pleroma, :pools,
  federation: [
    size: 50,
778
    max_waiting: 10,
779
    recv_timeout: 10_000
Alexander Strizhakov's avatar
Alexander Strizhakov committed
780
781
782
  ],
  media: [
    size: 50,
783
    max_waiting: 20,
784
    recv_timeout: 15_000
Alexander Strizhakov's avatar
Alexander Strizhakov committed
785
786
787
  ],
  upload: [
    size: 25,
788
    max_waiting: 5,
789
    recv_timeout: 15_000
Alexander Strizhakov's avatar
Alexander Strizhakov committed
790
791
792
  ],
  default: [
    size: 10,
793
    max_waiting: 2,
794
    recv_timeout: 5_000
Alexander Strizhakov's avatar
Alexander Strizhakov committed
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
  ]

config :pleroma, :hackney_pools,
  federation: [
    max_connections: 50,
    timeout: 150_000
  ],
  media: [
    max_connections: 50,
    timeout: 150_000
  ],
  upload: [
    max_connections: 25,
    timeout: 300_000
  ]

811
config :pleroma, :majic_pool, size: 2
href's avatar
href committed
812

813
814
private_instance? = :if_instance_is_private

815
config :pleroma, :restrict_unauthenticated,
816
817
818
  timelines: %{local: private_instance?, federated: private_instance?},
  profiles: %{local: private_instance?, remote: private_instance?},
  activities: %{local: private_instance?, remote: private_instance?}
819

820
821
config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: false

822
config :pleroma, :mrf,
823
  policies: Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy,
824
825
826
  transparency: true,
  transparency_exclusions: []

827
828
config :tzdata, :http_client, Pleroma.HTTP.Tzdata

829
830
config :ex_aws, http_client: Pleroma.HTTP.ExAws

831
config :web_push_encryption, http_client: Pleroma.HTTP.WebPush
832

833
834
config :pleroma, :instances_favicons, enabled: false

rinpatch's avatar
rinpatch committed
835
836
config :floki, :html_parser, Floki.HTMLParser.FastHtml

837
838
config :pleroma, Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.PleromaAuthenticator

839
config :pleroma, Pleroma.User.Backup,
minibikini's avatar
minibikini committed
840
  purge_after_days: 30,
841
842
  limit_days: 7,
  dir: nil
minibikini's avatar
minibikini committed
843

lain's avatar
lain committed
844
845
# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
lain's avatar
lain committed
846
import_config "#{Mix.env()}.exs"