f5865a91a0918dee7e3e53f23beecf3cce5acd2f
[akkoma] / installation / akkoma.service
1 [Unit]
2 Description=Akkoma social network
3 After=network.target postgresql.service
4
5 [Service]
6 ExecReload=/bin/kill $MAINPID
7 Restart=on-failure
8
9 ; Uncomment this if you're on Arch Linux
10 ; Evironment="PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl"
11
12 ; Name of the user that runs the Akkoma service.
13 User=akkoma
14 ; Declares that Akkoma runs in production mode.
15 Environment="MIX_ENV=prod"
16
17 ; Make sure that all paths fit your installation.
18 ; Path to the home directory of the user running the Akkoma service.
19 Environment="HOME=/var/lib/akkoma"
20 ; Path to the folder containing the Akkoma installation.
21 WorkingDirectory=/opt/akkoma
22 ; Path to the Mix binary.
23 ExecStart=/usr/bin/mix phx.server
24
25 ; Some security directives.
26 ; Use private /tmp and /var/tmp folders inside a new file system namespace, which are discarded after the process stops.
27 PrivateTmp=true
28 ; The /home, /root, and /run/user folders can not be accessed by this service anymore. If your Akkoma 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.
29 ProtectHome=true
30 ; Mount /usr, /boot, and /etc as read-only for processes invoked by this service.
31 ProtectSystem=full
32 ; 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.
33 PrivateDevices=false
34 ; Drops the sysadmin capability from the daemon.
35 CapabilityBoundingSet=~CAP_SYS_ADMIN
36
37 [Install]
38 WantedBy=multi-user.target