config.exs 19 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
  ],
  filename_display_max_length: 30
href's avatar
href committed
76

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

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

84 85
config :pleroma, :emoji,
  shortcode_globs: ["/emoji/custom/**/*.png"],
86
  pack_extensions: [".png", ".gif"],
87
  groups: [
88
    Custom: ["/emoji/*.png", "/emoji/**/*.png"]
89
  ],
vaartis's avatar
vaartis committed
90 91
  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
92

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

lain's avatar
lain committed
112 113 114 115 116 117 118 119 120 121 122
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
123 124
# Configures the endpoint
config :pleroma, Pleroma.Web.Endpoint,
href's avatar
href committed
125
  instrumenters: [Pleroma.Web.Endpoint.Instrumenter],
lain's avatar
lain committed
126
  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, []},
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: [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2],
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: [],
218
  managed_config: true,
href's avatar
href committed
219
  static_dir: "instance/static/",
220 221 222
  allowed_post_formats: [
    "text/plain",
    "text/html",
William Pitcock's avatar
William Pitcock committed
223 224
    "text/markdown",
    "text/bbcode"
225
  ],
226
  autofollowed_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
  ],
  show_reactions: true
lain's avatar
lain committed
257

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

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

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

lain's avatar
lain committed
295 296
config :pleroma, :frontend_configurations,
  pleroma_fe: %{
feld's avatar
feld committed
297
    alwaysShowSubjectInput: true,
298
    background: "/images/city.jpg",
lain's avatar
lain committed
299
    collapseMessageWithSubject: false,
feld's avatar
feld committed
300 301 302 303
    disableChat: false,
    greentext: false,
    hideFilteredStatuses: false,
    hideMutedPosts: false,
lain's avatar
lain committed
304
    hidePostStats: false,
feld's avatar
feld committed
305
    hideSitename: false,
lain's avatar
lain committed
306
    hideUserStats: false,
feld's avatar
feld committed
307 308 309 310 311 312 313 314 315 316
    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
317
    scopeCopy: true,
feld's avatar
feld committed
318
    sidebarRight: false,
feld's avatar
feld committed
319 320
    showFeaturesPanel: true,
    showInstanceSpecificPanel: false,
lain's avatar
lain committed
321
    subjectLineBehavior: "email",
feld's avatar
feld committed
322 323
    theme: "pleroma-dark",
    webPushNotifications: false
Haelwenn's avatar
Haelwenn committed
324 325 326
  },
  masto_fe: %{
    showInstanceSpecificPanel: true
lain's avatar
lain committed
327 328
  }

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

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

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

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

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

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

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

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

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

William Pitcock's avatar
William Pitcock committed
393
config :pleroma, :mrf_subchain, match_actor: %{}
William Pitcock's avatar
William Pitcock committed
394

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

397 398 399 400
config :pleroma, :mrf_vocabulary,
  accept: [],
  reject: []

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

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

href's avatar
href committed
416 417
config :pleroma, :media_proxy,
  enabled: false,
Maksim's avatar
Maksim committed
418 419
  invalidation: [
    enabled: false,
Maksim's avatar
Maksim committed
420
    provider: Pleroma.Web.MediaProxy.Invalidation.Script
Maksim's avatar
Maksim committed
421
  ],
href's avatar
href committed
422 423 424 425 426 427 428
  proxy_opts: [
    redirect_on_failure: false,
    max_body_length: 25 * 1_048_576,
    http: [
      follow_redirect: true,
      pool: :media
    ]
feld's avatar
feld committed
429 430
  ],
  whitelist: []
lain's avatar
lain committed
431

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

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

lain's avatar
lain committed
439
config :pleroma, :chat, enabled: true
440

lain's avatar
lain committed
441
config :phoenix, :format_encoders, json: Jason
lain's avatar
lain committed
442

rinpatch's avatar
rinpatch committed
443 444
config :phoenix, :json_library, Jason

445 446
config :phoenix, :filter_parameters, ["password", "confirm"]

lain's avatar
lain committed
447 448 449 450 451
config :pleroma, :gopher,
  enabled: false,
  ip: {0, 0, 0, 0},
  port: 9999

Alexander Strizhakov's avatar
Alexander Strizhakov committed
452
config :pleroma, Pleroma.Web.Metadata,
453 454 455
  providers: [
    Pleroma.Web.Metadata.Providers.OpenGraph,
    Pleroma.Web.Metadata.Providers.TwitterCard,
456 457
    Pleroma.Web.Metadata.Providers.RelMe,
    Pleroma.Web.Metadata.Providers.Feed
458
  ],
Alexander Strizhakov's avatar
Alexander Strizhakov committed
459
  unfurl_nsfw: false
460

Steven Fuchs's avatar
Steven Fuchs committed
461 462
config :pleroma, Pleroma.Web.Preload,
  providers: [
lain's avatar
lain committed
463
    Pleroma.Web.Preload.Providers.Instance
Steven Fuchs's avatar
Steven Fuchs committed
464 465
  ]

466
config :pleroma, :http_security,
467 468
  enabled: true,
  sts: false,
469
  sts_max_age: 31_536_000,
470 471
  ct_max_age: 2_592_000,
  referrer_policy: "same-origin"
472

473 474 475 476 477 478 479 480 481 482 483 484 485 486
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
487 488
config :pleroma, Pleroma.User,
  restricted_nicknames: [
feld's avatar
feld committed
489
    ".well-known",
lain's avatar
lain committed
490
    "~",
feld's avatar
feld committed
491
    "about",
lain's avatar
lain committed
492 493
    "activities",
    "api",
feld's avatar
feld committed
494
    "auth",
feld's avatar
feld committed
495
    "check_password",
feld's avatar
feld committed
496 497 498 499 500 501 502
    "dev",
    "friend-requests",
    "inbox",
    "internal",
    "main",
    "media",
    "nodeinfo",
lain's avatar
lain committed
503 504
    "notice",
    "oauth",
feld's avatar
feld committed
505 506 507 508
    "objects",
    "ostatus_subscribe",
    "pleroma",
    "proxy",
lain's avatar
lain committed
509
    "push",
feld's avatar
feld committed
510
    "registration",
lain's avatar
lain committed
511
    "relay",
feld's avatar
feld committed
512 513 514 515
    "settings",
    "status",
    "tag",
    "user-search",
feld's avatar
feld committed
516
    "user_exists",
feld's avatar
feld committed
517 518
    "users",
    "web"
519 520
  ],
  email_blacklist: []
lain's avatar
lain committed
521

522 523
config :pleroma, Oban,
  repo: Pleroma.Repo,
Maksim's avatar
Maksim committed
524
  log: false,
525
  queues: [
526
    activity_expiration: 10,
527 528 529 530 531 532
    federator_incoming: 50,
    federator_outgoing: 50,
    web_push: 50,
    mailer: 10,
    transmogrifier: 20,
    scheduled_activities: 10,
533
    background: 5,
534
    remote_fetcher: 2,
535
    attachments_cleanup: 5,
minibikini's avatar
minibikini committed
536
    new_users_digest: 1
537
  ],
rinpatch's avatar
rinpatch committed
538
  plugins: [Oban.Plugins.Pruner],
539
  crontab: [
540
    {"0 0 * * *", Pleroma.Workers.Cron.ClearOauthTokenWorker},
541
    {"0 * * * *", Pleroma.Workers.Cron.StatsWorker},
542
    {"* * * * *", Pleroma.Workers.Cron.PurgeExpiredActivitiesWorker},
543
    {"0 0 * * 0", Pleroma.Workers.Cron.DigestEmailsWorker},
544
    {"0 0 * * *", Pleroma.Workers.Cron.NewUsersDigestWorker}
545
  ]
minibikini's avatar
minibikini committed
546

547 548 549 550 551 552
config :pleroma, :workers,
  retries: [
    federator_incoming: 5,
    federator_outgoing: 5
  ]

553 554 555 556 557 558 559 560
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
561

link0ff's avatar
link0ff committed
562 563 564 565 566 567
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
568 569
  tls: System.get_env("LDAP_TLS") == "true",
  tlsopts: [],
link0ff's avatar
link0ff committed
570 571 572
  base: System.get_env("LDAP_BASE") || "dc=example,dc=com",
  uid: System.get_env("LDAP_UID") || "cn"

lain's avatar
lain committed
573 574 575
config :esshd,
  enabled: false

576 577 578 579 580
oauth_consumer_strategies =
  System.get_env("OAUTH_CONSUMER_STRATEGIES")
  |> to_string()
  |> String.split()
  |> Enum.map(&hd(String.split(&1, ":")))
581 582 583

ueberauth_providers =
  for strategy <- oauth_consumer_strategies do
584
    strategy_module_name = "Elixir.Ueberauth.Strategy.#{String.capitalize(strategy)}"
585 586 587
    strategy_module = String.to_atom(strategy_module_name)
    {String.to_atom(strategy), {strategy_module, [callback_params: ["state"]]}}
  end
588

Ivan Tashkinov's avatar
Ivan Tashkinov committed
589 590 591
config :ueberauth,
       Ueberauth,
       base_path: "/oauth",
592 593
       providers: ueberauth_providers

594 595
config :pleroma,
       :auth,
596
       enforce_oauth_admin_scope_usage: true,
597
       oauth_consumer_strategies: oauth_consumer_strategies
Ivan Tashkinov's avatar
Ivan Tashkinov committed
598

599
config :pleroma, Pleroma.Emails.Mailer, adapter: Swoosh.Adapters.Sendmail, enabled: false
600

601 602 603 604 605 606 607 608 609 610 611
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"
  }

612 613
config :pleroma, Pleroma.Emails.NewUsersDigestEmail, enabled: false

614 615
config :prometheus, Pleroma.Web.Endpoint.MetricsExporter, path: "/api/pleroma/app_metrics"

616 617 618 619 620
config :pleroma, Pleroma.ScheduledActivity,
  daily_user_limit: 25,
  total_user_limit: 300,
  enabled: true

Roman Chvanikov's avatar
Roman Chvanikov committed
621 622
config :pleroma, :email_notifications,
  digest: %{
623
    active: false,
Roman Chvanikov's avatar
Roman Chvanikov committed
624 625 626 627
    interval: 7,
    inactivity_threshold: 7
  }

Maksim's avatar
Maksim committed
628 629
config :pleroma, :oauth2,
  token_expires_in: 600,
630
  issue_new_refresh_token: true,
631
  clean_expired_tokens: false
Maksim's avatar
Maksim committed
632

633 634
config :pleroma, :database, rum_enabled: false

635 636
config :pleroma, :env, Mix.env()

637 638 639
config :http_signatures,
  adapter: Pleroma.Signature

640 641
config :pleroma, :rate_limit,
  authentication: {60_000, 15},
642
  timeline: {500, 3},
643 644 645 646 647 648 649 650 651
  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}
652

Mike Verdone's avatar
Mike Verdone committed
653
config :pleroma, Pleroma.ActivityExpiration, enabled: true
654

655
config :pleroma, Pleroma.Plugs.RemoteIp, enabled: true
minibikini's avatar
minibikini committed
656

657 658
config :pleroma, :static_fe, enabled: false

lain's avatar
lain committed
659 660
# Example of frontend configuration
# This example will make us serve the primary frontend from the
feld's avatar
feld committed
661 662
# frontends directory within your `:pleroma, :instance, static_dir`.
# e.g., instance/static/frontends/pleroma/develop/
lain's avatar
lain committed
663 664 665 666 667 668
#
# With no frontend configuration, the bundled files from the `static` directory will
# be used.
#
# config :pleroma, :frontends, primary: %{"name" => "pleroma", "ref" => "develop"}

minibikini's avatar
minibikini committed
669 670 671 672
config :pleroma, :web_cache_ttl,
  activity_pub: nil,
  activity_pub_question: 30_000

673 674
config :pleroma, :modules, runtime_dir: "instance/modules"

675 676
config :pleroma, configurable_from_database: false

677 678 679
config :pleroma, Pleroma.Repo,
  parameters: [gin_fuzzy_search_limit: "500"],
  prepare: :unnamed
680

Alexander Strizhakov's avatar
Alexander Strizhakov committed
681
config :pleroma, :connections_pool,
682
  reclaim_multiplier: 0.1,
rinpatch's avatar
rinpatch committed
683 684
  connection_acquisition_wait: 250,
  connection_acquisition_retries: 5,
Alexander Strizhakov's avatar
Alexander Strizhakov committed
685
  max_connections: 250,
686
  max_idle_time: 30_000,
rinpatch's avatar
rinpatch committed
687
  retry: 0,
Alexander Strizhakov's avatar
Alexander Strizhakov committed
688 689 690 691 692
  await_up_timeout: 5_000

config :pleroma, :pools,
  federation: [
    size: 50,
rinpatch's avatar
rinpatch committed
693
    max_waiting: 10
Alexander Strizhakov's avatar
Alexander Strizhakov committed
694 695 696
  ],
  media: [
    size: 50,
rinpatch's avatar
rinpatch committed
697
    max_waiting: 10
Alexander Strizhakov's avatar
Alexander Strizhakov committed
698 699 700
  ],
  upload: [
    size: 25,
rinpatch's avatar
rinpatch committed
701
    max_waiting: 5
Alexander Strizhakov's avatar
Alexander Strizhakov committed
702 703 704
  ],
  default: [
    size: 10,
rinpatch's avatar
rinpatch committed
705
    max_waiting: 2
Alexander Strizhakov's avatar
Alexander Strizhakov committed
706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721
  ]

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
  ]

722 723 724 725 726
config :pleroma, :restrict_unauthenticated,
  timelines: %{local: false, federated: false},
  profiles: %{local: false, remote: false},
  activities: %{local: false, remote: false}

727 728
config :pleroma, Pleroma.Web.ApiSpec.CastAndValidate, strict: false

729
config :pleroma, :mrf,
730
  policies: Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy,
731 732 733
  transparency: true,
  transparency_exclusions: []

734 735
config :tzdata, :http_client, Pleroma.HTTP.Tzdata

736 737
config :ex_aws, http_client: Pleroma.HTTP.ExAws

738 739
config :pleroma, :instances_favicons, enabled: false

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