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