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/v1/streaming", Pleroma.Web.MastodonAPI.WebsocketHandler, []},
kaniini's avatar
kaniini committed
133
134
135
         {"/websocket", Phoenix.Endpoint.CowboyWebSocket,
          {Phoenix.Transports.WebSocket,
           {Pleroma.Web.Endpoint, Pleroma.Web.UserSocket, websocket_config}}},
136
         {:_, Phoenix.Endpoint.Cowboy2Handler, {Pleroma.Web.Endpoint, []}}
href's avatar
href committed
137
138
139
       ]}
    ]
  ],
lain's avatar
lain committed
140
  protocol: "https",
lain's avatar
lain committed
141
  secret_key_base: "aK4Abxf29xU9TTDKre9coZPUgevcVCFQJe/5xP/7Lt4BEif6idBIbjupVbOrbKxl",
href's avatar
href committed
142
  signing_salt: "CqaoopA2",
lain's avatar
lain committed
143
  render_errors: [view: Pleroma.Web.ErrorView, accepts: ~w(json)],
144
  pubsub_server: Pleroma.PubSub,
145
146
147
148
  secure_cookie_flag: true,
  extra_cookie_attrs: [
    "SameSite=Lax"
  ]
lain's avatar
lain committed
149

150
151
152
153
154
155
156
157
158
159
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
160
161
# Configures Elixir's Logger
config :logger, :console,
162
  level: :debug,
163
  format: "\n$time $metadata[$level] $message\n",
lain's avatar
lain committed
164
165
  metadata: [:request_id]

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

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

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

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

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

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

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

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

293
config :pleroma, :markup,
294
295
296
  # 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,
297
298
299
  allow_headings: false,
  allow_tables: false,
  allow_fonts: false,
300
  scrub_policy: [
301
302
    Pleroma.HTML.Scrubber.Default,
    Pleroma.HTML.Transform.MediaProxy
303
  ]
304

lain's avatar
lain committed
305
306
config :pleroma, :frontend_configurations,
  pleroma_fe: %{
feld's avatar
feld committed
307
    alwaysShowSubjectInput: true,
308
    background: "/images/city.jpg",
lain's avatar
lain committed
309
    collapseMessageWithSubject: false,
feld's avatar
feld committed
310
311
312
313
    disableChat: false,
    greentext: false,
    hideFilteredStatuses: false,
    hideMutedPosts: false,
lain's avatar
lain committed
314
    hidePostStats: false,
feld's avatar
feld committed
315
    hideSitename: false,
lain's avatar
lain committed
316
    hideUserStats: false,
feld's avatar
feld committed
317
318
319
320
321
322
323
324
325
326
    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
327
    scopeCopy: true,
feld's avatar
feld committed
328
    sidebarRight: false,
feld's avatar
feld committed
329
330
    showFeaturesPanel: true,
    showInstanceSpecificPanel: false,
lain's avatar
lain committed
331
    subjectLineBehavior: "email",
feld's avatar
feld committed
332
333
    theme: "pleroma-dark",
    webPushNotifications: false
Haelwenn's avatar
Haelwenn committed
334
335
336
  },
  masto_fe: %{
    showInstanceSpecificPanel: true
lain's avatar
lain committed
337
338
  }

339
340
341
342
343
344
345
346
347
348
349
350
351
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
352
353
354
355
356
357
358
359
360
361
config :pleroma, :manifest,
  icons: [
    %{
      src: "/static/logo.png",
      type: "image/png"
    }
  ],
  theme_color: "#282c37",
  background_color: "#191b22"

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

547
548
config :pleroma, Oban,
  repo: Pleroma.Repo,
Maksim's avatar
Maksim committed
549
  log: false,
550
  queues: [
551
    activity_expiration: 10,
552
    token_expiration: 5,
minibikini's avatar
minibikini committed
553
    backup: 1,
554
555
    federator_incoming: 50,
    federator_outgoing: 50,
556
    ingestion_queue: 50,
557
558
559
560
    web_push: 50,
    mailer: 10,
    transmogrifier: 20,
    scheduled_activities: 10,
561
    background: 5,
562
    remote_fetcher: 2,
563
    attachments_cleanup: 5,
564
565
    new_users_digest: 1,
    mute_expire: 5
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, Pleroma.Web.ActivityPub.MRF.TagPolicy],
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"