Merge branch 'small-jsonld-refactor' into 'develop'
[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 ## Uploads configuration
17
18 To configure where to upload files, and wether or not
19 you want to remove automatically EXIF data from pictures
20 being uploaded.
21
22 config :pleroma, Pleroma.Upload,
23 uploads: "uploads",
24 strip_exif: false
25
26 * `uploads`: where to put the uploaded files, relative to pleroma's main directory.
27 * `strip_exif`: whether or not to remove EXIF data from uploaded pics automatically.
28 This needs Imagemagick installed on the system ( apt install imagemagick ).
29
30
31 ## Block functionality
32
33 config :pleroma, :activitypub,
34 accept_blocks: true,
35 unfollow_blocked: true,
36 outgoing_blocks: true
37
38 config :pleroma, :user, deny_follow_blocked: true
39
40 * `accept_blocks`: whether to accept incoming block activities from
41 other instances
42 * `unfollow_blocked`: whether blocks result in people getting
43 unfollowed
44 * `outgoing_blocks`: whether to federate blocks to other instances
45 * `deny_follow_blocked`: whether to disallow following an account that
46 has blocked the user in question
47
48 ## Message Rewrite Filters (MRFs)
49
50 Modify incoming and outgoing posts.
51
52 config :pleroma, :instance,
53 rewrite_policy: Pleroma.Web.ActivityPub.MRF.NoOpPolicy
54
55 `rewrite_policy` specifies which MRF policies to apply.
56 It can either be a single policy or a list of policies.
57 Currently, MRFs availible by default are:
58
59 * `Pleroma.Web.ActivityPub.MRF.NoOpPolicy`
60 * `Pleroma.Web.ActivityPub.MRF.DropPolicy`
61 * `Pleroma.Web.ActivityPub.MRF.SimplePolicy`
62 * `Pleroma.Web.ActivityPub.MRF.RejectNonPublic`
63
64 Some policies, such as SimplePolicy and RejectNonPublic,
65 can be additionally configured in their respective sections.
66
67 ### NoOpPolicy
68
69 Does not modify posts (this is the default `rewrite_policy`)
70
71 ### DropPolicy
72
73 Drops all posts.
74 It generally does not make sense to use this in production.
75
76 ### SimplePolicy
77
78 Restricts the visibility of posts from certain instances.
79
80 config :pleroma, :mrf_simple,
81 media_removal: [],
82 media_nsfw: [],
83 federated_timeline_removal: [],
84 reject: [],
85 accept: []
86
87 * `media_removal`: posts from these instances will have attachments
88 removed
89 * `media_nsfw`: posts from these instances will have attachments marked
90 as nsfw
91 * `federated_timeline_removal`: posts from these instances will be
92 marked as unlisted
93 * `reject`: posts from these instances will be dropped
94 * `accept`: if not empty, only posts from these instances will be accepted
95
96 ### RejectNonPublic
97
98 Drops posts with non-public visibility settings.
99
100 config :pleroma :mrf_rejectnonpublic
101 allow_followersonly: false,
102 allow_direct: false,
103
104 * `allow_followersonly`: whether to allow follower-only posts through
105 the filter
106 * `allow_direct`: whether to allow direct messages through the filter