config.exs 21.9 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
config :pleroma, Pleroma.Repo,
lain's avatar
lain committed
50
  telemetry_event: [Pleroma.Repo.Instrumenter],
51
  migration_lock: nil
href's avatar
href committed
52

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

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

href's avatar
href committed
60
# Upload configuration
gled's avatar
gled committed
61
config :pleroma, Pleroma.Upload,
Thurloat's avatar
Thurloat committed
62
  uploader: Pleroma.Uploaders.Local,
rinpatch's avatar
rinpatch committed
63
  filters: [Pleroma.Upload.Filter.Dedupe],
rinpatch's avatar
rinpatch committed
64
  link_name: false,
href's avatar
href committed
65
  proxy_remote: false,
66
  filename_display_max_length: 30,
67
68
  default_description: nil,
  base_url: nil
href's avatar
href committed
69

href's avatar
href committed
70
config :pleroma, Pleroma.Uploaders.Local, uploads: "uploads"
71

72
73
config :pleroma, Pleroma.Uploaders.S3,
  bucket: nil,
74
  bucket_namespace: nil,
75
  truncated_namespace: nil,
76
77
78
79
80
81
  streaming_enabled: true

config :ex_aws, :s3,
  # host: "s3.wasabisys.com", # required if not Amazon AWS
  access_key_id: nil,
  secret_access_key: nil,
feld's avatar
feld committed
82
  # region: "us-east-1", # may be required for Amazon AWS
83
  scheme: "https://"
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

# Configures Elixir's Logger
config :logger, :console,
152
  level: :debug,
153
  format: "\n$time $metadata[$level] $message\n",
lain's avatar
lain committed
154
155
  metadata: [:request_id]

156
157
config :logger, :ex_syslogger,
  level: :debug,
158
  ident: "pleroma",
159
  format: "$metadata[$level] $message",
160
161
  metadata: [:request_id]

162
163
164
165
166
config :quack,
  level: :warn,
  meta: [:all],
  webhook_url: "https://hooks.slack.com/services/YOUR-KEY-HERE"

lain's avatar
lain committed
167
config :mime, :types, %{
168
  "application/xml" => ["xml"],
lain's avatar
lain committed
169
  "application/xrd+xml" => ["xrd+xml"],
170
  "application/jrd+json" => ["jrd+json"],
lain's avatar
lain committed
171
172
  "application/activity+json" => ["activity+json"],
  "application/ld+json" => ["activity+json"]
lain's avatar
lain committed
173
174
}

lain's avatar
lain committed
175
config :tesla, adapter: Tesla.Adapter.Hackney
lain's avatar
lain committed
176

jeff's avatar
docs    
jeff committed
177
# Configures http settings, upstream proxy etc.
178
179
config :pleroma, :http,
  proxy_url: nil,
180
  send_user_agent: true,
181
  user_agent: :default,
Alexander Strizhakov's avatar
Alexander Strizhakov committed
182
  adapter: []
183

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

Maksim's avatar
Maksim committed
259
260
261
262
263
264
config :pleroma, :welcome,
  direct_message: [
    enabled: false,
    sender_nickname: nil,
    message: nil
  ],
Ilja's avatar
Ilja committed
265
266
267
268
269
  chat_message: [
    enabled: false,
    sender_nickname: nil,
    message: nil
  ],
Maksim's avatar
Maksim committed
270
271
  email: [
    enabled: false,
Maksim's avatar
Maksim committed
272
    sender: nil,
Maksim's avatar
Maksim committed
273
274
275
276
277
    subject: "Welcome to <%= instance_name %>",
    html: "Welcome to <%= instance_name %>",
    text: "Welcome to <%= instance_name %>"
  ]

Maksim's avatar
Maksim committed
278
279
280
config :pleroma, :feed,
  post_title: %{
    max_length: 100,
lain's avatar
lain committed
281
    omission: "..."
Maksim's avatar
Maksim committed
282
283
  }

284
config :pleroma, :markup,
285
286
287
  # 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,
288
289
290
  allow_headings: false,
  allow_tables: false,
  allow_fonts: false,
291
  scrub_policy: [
292
293
    Pleroma.HTML.Scrubber.Default,
    Pleroma.HTML.Transform.MediaProxy
294
  ]
295

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

330
331
332
333
334
335
336
337
338
339
340
341
342
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
343
344
345
config :pleroma, :manifest,
  icons: [
    %{
346
347
      src: "/static/logo.svg",
      type: "image/svg+xml"
KokaKiwi's avatar
KokaKiwi committed
348
349
350
351
352
    }
  ],
  theme_color: "#282c37",
  background_color: "#191b22"

353
354
config :pleroma, :activitypub,
  unfollow_blocked: true,
355
  outgoing_blocks: true,
356
  follow_handshake_timeout: 500,
357
  note_replies_output_limit: 5,
358
359
  sign_object_fetches: true,
  authorized_fetch_mode: false
360

361
362
363
364
config :pleroma, :streamer,
  workers: 3,
  overflow_workers: 2

squidboi's avatar
squidboi committed
365
config :pleroma, :user, deny_follow_blocked: true
366

367
368
config :pleroma, :mrf_normalize_markup, scrub_policy: Pleroma.HTML.Scrubber.Default

369
370
371
372
config :pleroma, :mrf_rejectnonpublic,
  allow_followersonly: false,
  allow_direct: false

Karen Konou's avatar
Karen Konou committed
373
config :pleroma, :mrf_hellthread,
374
375
  delist_threshold: 10,
  reject_threshold: 20
Karen Konou's avatar
Karen Konou committed
376

377
378
379
380
config :pleroma, :mrf_simple,
  media_removal: [],
  media_nsfw: [],
  federated_timeline_removal: [],
381
  report_removal: [],
kaniini's avatar
kaniini committed
382
  reject: [],
383
  followers_only: [],
384
385
  accept: [],
  avatar_removal: [],
386
387
  banner_removal: [],
  reject_deletes: []
rinpatch's avatar
rinpatch committed
388

389
390
config :pleroma, :mrf_keyword,
  reject: [],
391
  federated_timeline_removal: [],
392
393
  replace: []

kaniini's avatar
kaniini committed
394
config :pleroma, :mrf_subchain, match_actor: %{}
kaniini's avatar
kaniini committed
395

minibikini's avatar
minibikini committed
396
397
config :pleroma, :mrf_activity_expiration, days: 365

kaniini's avatar
kaniini committed
398
399
400
401
config :pleroma, :mrf_vocabulary,
  accept: [],
  reject: []

402
# threshold of 7 days
403
config :pleroma, :mrf_object_age,
404
  threshold: 604_800,
405
406
  actions: [:delist, :strip_followers]

407
408
409
config :pleroma, :rich_media,
  enabled: true,
  ignore_hosts: [],
Alexander Strizhakov's avatar
Alexander Strizhakov committed
410
411
412
413
  ignore_tld: ["local", "localdomain", "lan"],
  parsers: [
    Pleroma.Web.RichMedia.Parsers.TwitterCard,
    Pleroma.Web.RichMedia.Parsers.OEmbed
414
  ],
rinpatch's avatar
rinpatch committed
415
  failure_backoff: 60_000,
416
  ttl_setters: [Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl]
417

href's avatar
href committed
418
419
config :pleroma, :media_proxy,
  enabled: false,
Maksim's avatar
Maksim committed
420
421
  invalidation: [
    enabled: false,
Maksim's avatar
Maksim committed
422
    provider: Pleroma.Web.MediaProxy.Invalidation.Script
Maksim's avatar
Maksim committed
423
  ],
href's avatar
href committed
424
425
426
  proxy_opts: [
    redirect_on_failure: false,
    max_body_length: 25 * 1_048_576,
427
428
    # Note: max_read_duration defaults to Pleroma.ReverseProxy.max_read_duration_default/1
    max_read_duration: 30_000,
href's avatar
href committed
429
430
431
432
    http: [
      follow_redirect: true,
      pool: :media
    ]
feld's avatar
feld committed
433
434
  ],
  whitelist: []
lain's avatar
lain committed
435

Maksim's avatar
Maksim committed
436
437
438
439
440
config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Http,
  method: :purge,
  headers: [],
  options: []

441
442
443
config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Script,
  script_path: nil,
  url_format: nil
Maksim's avatar
Maksim committed
444

445
# Note: media preview proxy depends on media proxy to be enabled
446
447
config :pleroma, :media_preview_proxy,
  enabled: false,
448
449
  thumbnail_max_width: 600,
  thumbnail_max_height: 600,
450
451
  image_quality: 85,
  min_content_length: 100 * 1024
452

lain's avatar
lain committed
453
config :pleroma, :chat, enabled: true
454

lain's avatar
lain committed
455
config :phoenix, :format_encoders, json: Jason
lain's avatar
lain committed
456

rinpatch's avatar
rinpatch committed
457
458
config :phoenix, :json_library, Jason

459
460
config :phoenix, :filter_parameters, ["password", "confirm"]

lain's avatar
lain committed
461
462
463
464
465
config :pleroma, :gopher,
  enabled: false,
  ip: {0, 0, 0, 0},
  port: 9999

Alexander Strizhakov's avatar
Alexander Strizhakov committed
466
config :pleroma, Pleroma.Web.Metadata,
467
468
  providers: [
    Pleroma.Web.Metadata.Providers.OpenGraph,
469
    Pleroma.Web.Metadata.Providers.TwitterCard
470
  ],
Alexander Strizhakov's avatar
Alexander Strizhakov committed
471
  unfurl_nsfw: false
472

Steven Fuchs's avatar
Steven Fuchs committed
473
474
config :pleroma, Pleroma.Web.Preload,
  providers: [
lain's avatar
lain committed
475
    Pleroma.Web.Preload.Providers.Instance
Steven Fuchs's avatar
Steven Fuchs committed
476
477
  ]

kaniini's avatar
kaniini committed
478
config :pleroma, :http_security,
479
480
  enabled: true,
  sts: false,
481
  sts_max_age: 31_536_000,
482
483
  ct_max_age: 2_592_000,
  referrer_policy: "same-origin"
484

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

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

567
568
569
570
571
572
config :pleroma, :workers,
  retries: [
    federator_incoming: 5,
    federator_outgoing: 5
  ]

573
574
575
576
577
578
579
580
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
581

link0ff's avatar
link0ff committed
582
583
584
585
586
587
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
588
589
  tls: System.get_env("LDAP_TLS") == "true",
  tlsopts: [],
link0ff's avatar
link0ff committed
590
591
592
  base: System.get_env("LDAP_BASE") || "dc=example,dc=com",
  uid: System.get_env("LDAP_UID") || "cn"

lain's avatar
lain committed
593
594
595
config :esshd,
  enabled: false

596
597
598
599
600
oauth_consumer_strategies =
  System.get_env("OAUTH_CONSUMER_STRATEGIES")
  |> to_string()
  |> String.split()
  |> Enum.map(&hd(String.split(&1, ":")))
601
602
603

ueberauth_providers =
  for strategy <- oauth_consumer_strategies do
604
    strategy_module_name = "Elixir.Ueberauth.Strategy.#{String.capitalize(strategy)}"
605
606
607
    strategy_module = String.to_atom(strategy_module_name)
    {String.to_atom(strategy), {strategy_module, [callback_params: ["state"]]}}
  end
608

Ivan Tashkinov's avatar
Ivan Tashkinov committed
609
610
611
config :ueberauth,
       Ueberauth,
       base_path: "/oauth",
612
613
       providers: ueberauth_providers

614
config :pleroma, :auth, oauth_consumer_strategies: oauth_consumer_strategies
Ivan Tashkinov's avatar
Ivan Tashkinov committed
615

616
config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Sendmail, enabled: false
617

618
619
620
621
622
623
624
625
626
627
628
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"
  }

629
630
config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: false

631
632
633
634
635
636
config :prometheus, Pleroma.Web.Endpoint.MetricsExporter,
  enabled: false,
  auth: false,
  ip_whitelist: [],
  path: "/api/pleroma/app_metrics",
  format: :text
637

638
639
640
641
642
config :pleroma, Pleroma.ScheduledActivity,
  daily_user_limit: 25,
  total_user_limit: 300,
  enabled: true

Roman Chvanikov's avatar
Roman Chvanikov committed
643
644
config :pleroma, :email_notifications,
  digest: %{
645
    active: false,
Roman Chvanikov's avatar
Roman Chvanikov committed
646
647
648
649
    interval: 7,
    inactivity_threshold: 7
  }

Maksim's avatar
Maksim committed
650
config :pleroma, :oauth2,
651
  token_expires_in: 3600 * 24 * 365 * 100,
652
  issue_new_refresh_token: true,
653
  clean_expired_tokens: false
Maksim's avatar
Maksim committed
654

655
656
config :pleroma, :database, rum_enabled: false

657
658
config :pleroma, :env, Mix.env()

659
660
661
config :http_signatures,
  adapter: Pleroma.Signature

662
663
config :pleroma, :rate_limit,
  authentication: {60_000, 15},
664
  timeline: {500, 3},
665
666
667
668
669
670
671
672
673
  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}
674

675
config :pleroma, Pleroma.Workers.PurgeExpiredActivity, enabled: true, min_lifetime: 600
676

Alexander Strizhakov's avatar
Alexander Strizhakov committed
677
config :pleroma, Pleroma.Web.Plugs.RemoteIp,
678
679
680
681
682
683
684
685
686
687
688
  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
689

690
691
config :pleroma, :static_fe, enabled: false

lain's avatar
lain committed
692
693
# Example of frontend configuration
# This example will make us serve the primary frontend from the
feld's avatar
feld committed
694
695
# frontends directory within your `:pleroma, :instance, static_dir`.
# e.g., instance/static/frontends/pleroma/develop/
lain's avatar
lain committed
696
697
698
699
#
# With no frontend configuration, the bundled files from the `static` directory will
# be used.
#
700
# config :pleroma, :frontends,
701
702
# primary: %{"name" => "pleroma-fe", "ref" => "develop"},
# admin: %{"name" => "admin-fe", "ref" => "stable"},
lain's avatar
lain committed
703
704
705
706
# available: %{...}

config :pleroma, :frontends,
  available: %{
707
708
709
710
711
712
713
714
715
    "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
716
717
718
719
720
721
722
723
724
725
      "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",
726
727
728
729
      "ref" => "master",
      "custom-http-headers" => [
        {"service-worker-allowed", "/"}
      ]
lain's avatar
lain committed
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
    },
    "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
747

minibikini's avatar
minibikini committed
748
749
750
751
config :pleroma, :web_cache_ttl,
  activity_pub: nil,
  activity_pub_question: 30_000

752
753
config :pleroma, :modules, runtime_dir: "instance/modules"

754
755
config :pleroma, configurable_from_database: false

756
757
758
config :pleroma, Pleroma.Repo,
  parameters: [gin_fuzzy_search_limit: "500"],
  prepare: :unnamed
759

Alexander Strizhakov's avatar
Alexander Strizhakov committed
760
config :pleroma, :connections_pool,
761
  reclaim_multiplier: 0.1,
rinpatch's avatar
rinpatch committed
762
763
  connection_acquisition_wait: 250,
  connection_acquisition_retries: 5,
Alexander Strizhakov's avatar
Alexander Strizhakov committed
764
  max_connections: 250,
765
  max_idle_time: 30_000,
rinpatch's avatar
rinpatch committed
766
  retry: 0,
767
  connect_timeout: 5_000
Alexander Strizhakov's avatar
Alexander Strizhakov committed
768
769
770
771

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

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
  ]

805
config :pleroma, :majic_pool, size: 2
href's avatar
href committed
806

807
808
private_instance? = :if_instance_is_private

809
config :pleroma, :restrict_unauthenticated,
810
811
812
  timelines: %{local: private_instance?, federated: private_instance?},
  profiles: %{local: private_instance?, remote: private_instance?},
  activities: %{local: private_instance?, remote: private_instance?}
813

814
815
config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: false

816
config :pleroma, :mrf,
817
  policies: [Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy, Pleroma.Web.ActivityPub.MRF.TagPolicy],
818
819
820
  transparency: true,
  transparency_exclusions: []

821
822
config :tzdata, :http_client, Pleroma.HTTP.Tzdata

823
824
config :ex_aws, http_client: Pleroma.HTTP.ExAws

825
config :web_push_encryption, http_client: Pleroma.HTTP.WebPush
826

827
828
config :pleroma, :instances_favicons, enabled: false

rinpatch's avatar
rinpatch committed
829
830
config :floki, :html_parser, Floki.HTMLParser.FastHtml

831
832
config :pleroma, Pleroma.Web.Auth.Authenticator, Pleroma.Web.Auth.PleromaAuthenticator

833
config :pleroma, Pleroma.User.Backup,
minibikini's avatar
minibikini committed
834
  purge_after_days: 30,
835
836
  limit_days: 7,
  dir: nil
minibikini's avatar
minibikini committed
837

838
839
config :pleroma, ConcurrentLimiter, [
  {Pleroma.Web.RichMedia.Helpers, [max_running: 5, max_waiting: 5]},
840
  {Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy, [max_running: 5, max_waiting: 5]}
841
842
]

lain's avatar
lain committed
843
844
# 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
845
import_config "#{Mix.env()}.exs"