pleroma/otp/files/[email protected]
author Luke Hoersten <luke@hoersten.org>
Sun, 08 Jan 2023 16:51:18 -0600
changeset 205 2ea9460dc8d2
parent 182 b4ce6f1f15b7
permissions -rw-r--r--
Enabled presence events in dendrite.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
60
48a3a65119d5 Initial commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
[Unit]
85
dcfd23308c32 Completed pleroma-otp role.
Luke Hoersten <luke@hoersten.org>
parents: 84
diff changeset
     2
Description=Pleroma social network instance "%I"
182
b4ce6f1f15b7 Version updates
Luke Hoersten <luke@hoersten.org>
parents: 103
diff changeset
     3
After=network.target postgresql.service
b4ce6f1f15b7 Version updates
Luke Hoersten <luke@hoersten.org>
parents: 103
diff changeset
     4
Before=nginx.service
60
48a3a65119d5 Initial commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     5
48a3a65119d5 Initial commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     6
[Service]
84
d0c40727e6ff Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
     7
User=pleroma
d0c40727e6ff Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
     8
WorkingDirectory=/opt/pleroma
78
18b6a82be777 Added hardening settings.
Luke Hoersten <luke@hoersten.org>
parents: 74
diff changeset
     9
84
d0c40727e6ff Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    10
Environment="HOME=/opt/pleroma"
d0c40727e6ff Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    11
Environment="PLEROMA_CONFIG_PATH=/etc/pleroma/%i.config.exs"
d0c40727e6ff Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    12
Environment="PLUG_TMPDIR=/tmp/%i"
87
4f87097dd651 Got pleroma otp multi-instance working.
Luke Hoersten <luke@hoersten.org>
parents: 85
diff changeset
    13
Environment="RELEASE_NODE=%[email protected]"
78
18b6a82be777 Added hardening settings.
Luke Hoersten <luke@hoersten.org>
parents: 74
diff changeset
    14
87
4f87097dd651 Got pleroma otp multi-instance working.
Luke Hoersten <luke@hoersten.org>
parents: 85
diff changeset
    15
ExecStart=/opt/pleroma/bin/pleroma start
84
d0c40727e6ff Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    16
ExecReload=/opt/pleroma/bin/pleroma stop
85
dcfd23308c32 Completed pleroma-otp role.
Luke Hoersten <luke@hoersten.org>
parents: 84
diff changeset
    17
60
48a3a65119d5 Initial commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    18
KillMode=process
48a3a65119d5 Initial commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    19
Restart=on-failure
48a3a65119d5 Initial commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    20
78
18b6a82be777 Added hardening settings.
Luke Hoersten <luke@hoersten.org>
parents: 74
diff changeset
    21
; Some security directives.
18b6a82be777 Added hardening settings.
Luke Hoersten <luke@hoersten.org>
parents: 74
diff changeset
    22
; Use private /tmp and /var/tmp folders inside a new file system namespace, which are discarded after the process stops.
18b6a82be777 Added hardening settings.
Luke Hoersten <luke@hoersten.org>
parents: 74
diff changeset
    23
PrivateTmp=true
18b6a82be777 Added hardening settings.
Luke Hoersten <luke@hoersten.org>
parents: 74
diff changeset
    24
; The /home, /root, and /run/user folders can not be accessed by this service anymore. If your Pleroma user has its home folder in one of the restricted places, or use one of these folders as its working directory, you have to set this to false.
85
dcfd23308c32 Completed pleroma-otp role.
Luke Hoersten <luke@hoersten.org>
parents: 84
diff changeset
    25
ProtectHome=true
78
18b6a82be777 Added hardening settings.
Luke Hoersten <luke@hoersten.org>
parents: 74
diff changeset
    26
; Mount /usr, /boot, and /etc as read-only for processes invoked by this service.
18b6a82be777 Added hardening settings.
Luke Hoersten <luke@hoersten.org>
parents: 74
diff changeset
    27
ProtectSystem=full
18b6a82be777 Added hardening settings.
Luke Hoersten <luke@hoersten.org>
parents: 74
diff changeset
    28
; Sets up a new /dev mount for the process and only adds API pseudo devices like /dev/null, /dev/zero or /dev/random but not physical devices. Disabled by default because it may not work on devices like the Raspberry Pi.
18b6a82be777 Added hardening settings.
Luke Hoersten <luke@hoersten.org>
parents: 74
diff changeset
    29
PrivateDevices=false
18b6a82be777 Added hardening settings.
Luke Hoersten <luke@hoersten.org>
parents: 74
diff changeset
    30
; Ensures that the service process and all its children can never gain new privileges through execve().
18b6a82be777 Added hardening settings.
Luke Hoersten <luke@hoersten.org>
parents: 74
diff changeset
    31
NoNewPrivileges=true
18b6a82be777 Added hardening settings.
Luke Hoersten <luke@hoersten.org>
parents: 74
diff changeset
    32
; Drops the sysadmin capability from the daemon.
18b6a82be777 Added hardening settings.
Luke Hoersten <luke@hoersten.org>
parents: 74
diff changeset
    33
CapabilityBoundingSet=~CAP_SYS_ADMIN
18b6a82be777 Added hardening settings.
Luke Hoersten <luke@hoersten.org>
parents: 74
diff changeset
    34
60
48a3a65119d5 Initial commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    35
[Install]
48a3a65119d5 Initial commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    36
WantedBy=multi-user.target