Gotify

From Halfface
Revision as of 19:29, 25 February 2020 by Ekaanbj (talk | contribs)
Jump to navigation Jump to search

install

Download suitable gotify binary. Put in

/usr/local/bin/gotify

Create directories.

/etc/gotify
/var/lib/gotify
chown -R gotify:gotify /var/lib/gotify/data

create user

groupadd -r gotify
useradd -M -d /var/lib/gotify -s /sbin/nologin -r -g gotify gotify

config file

curl -O /etc/gotify/config.yml https://raw.githubusercontent.com/gotify/server/master/config.example.yml

test start

sudo -u gotify /usr/local/bin/gotify

systemd start script

/etc/systemd/system/gotify.service

[Unit]
Description=Gotify Push Notification Server
Documentation=https://gotify.net/docs
After=network-online.target
Wants=network-online.target systemd-networkd-wait-online.service

StartLimitIntervalSec=14400
StartLimitBurst=10 

[Service]
Restart=on-abnormal

User=gotify
Group=gotify 

WorkingDirectory=/var/lib/gotify
ExecStart=/var/lib/gotify

PrivateTmp=true
ProtectSystem=full
ReadWritePaths=/var/lib/gotify/data
ReadWriteDirectories=/var/lib/gotify/data

TimeoutStopSec=5s 

[Install]
WantedBy=multi-user.target