split lines, explicitly advised against editing default config files
[akkoma] / CONFIGURATION.md
1 # Configuring Pleroma
2
3 In the `config/` directory, you will find the following relevant files:
4 * `config.exs`: default base configuration
5 * `dev.exs`: default additional configuration for `MIX_ENV=dev`
6 * `prod.exs`: default additional configuration for `MIX_ENV=prod`
7
8
9 Do not modify files in the list above.
10 Instead, overload the settings by editing the following files:
11 * `dev.secret.exs`: custom additional configuration for `MIX_ENV=dev`
12 * `prod.secret.exs`: custom additional configuration for `MIX_ENV=prod`
13
14 ## Message Rewrite Filters (MRFs)
15
16 Modify incoming and outgoing posts.
17
18 config :pleroma, :instance,
19 rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy
20
21 `rewrite_policy` specifies which MRF policies to apply.
22 It can either be a single policy or a list of policies.
23 Currently, MRFs availible by default are:
24 * `Pleroma.Web.ActivityPub.MRF.NoOpPolicy`
25 * `Pleroma.Web.ActivityPub.MRF.DropPolicy`
26 * `Pleroma.Web.ActivityPub.MRF.SimplePolicy`
27 * `Pleroma.Web.ActivityPub.MRF.RejectNonPublic`
28
29 Some policies, such as SimplePolicy and RejectNonPublic,
30 can be additionally configured in their respective sections.
31
32 ### NoOpPolicy
33
34 Does not modify posts (this is the default `rewrite_policy`)
35
36 ### DropPolicy
37
38 Drops all posts.
39 It generally does not make sense to use this in production.
40
41 ### SimplePolicy
42
43 Restricts the visibility of posts from certain instances.
44
45 config :pleroma, :mrf_simple,
46 media_removal: [],
47 media_nsfw: [],
48 federated_timeline_removal: [],
49 reject: []
50
51 * `media_removal`: posts from these instances will have attachments
52 removed
53 * `media_nsfw`: posts from these instances will have attachments marked
54 as nsfw
55 * `federated_timeline_removal`: posts from these instances will be
56 marked as unlisted
57 * `reject`: posts from these instances will be dropped
58
59 ### RejectNonPublic
60
61 Drops posts with non-public visibility settings.
62
63 config :pleroma :mrf_rejectnonpublic
64 allow_followersonly: false,
65 allow_direct: false,
66
67 * `allow_followersonly`: whether to allow follower-only posts through
68 the filter
69 * `allow_direct`: whether to allow direct messages through the filter