- vi /etc/systemd/system/gotify.service
[Unit] Description=gotify After=network-online.target Requires=network-online.target [Service] User=UsernameOfGotifyUser WorkingDirectory=/path/to/folder/containing/gotify/binary/ ExecStart=/path/to/gotify/binary/gotify-linux-amd64 Restart=always [Install] WantedBy=multi-user.target
- systemctl daemon-reload
- systemctl start gotify
Simple as that!
Check Gotify is running with the systemctl status gotify command, and if all is well, start Gotify at boot with systemctl enable gotify
Thanks!
Any idea on what permissions “UsernameOfGotifyUser” needs? Or did you just run it as root?
Can’t see anything immediately obvious on their site, or with a quick web search…
The gotify user needs to have permissions to run the gotify binary as well as the port that gotify runs on. I do not run this as root, instead the gotify user owns the gotify binary and runs on a port that a non root user can use and then I use a reverse proxy (such as Nginx) to pass to the port that Gotify is running on. Hope this helps.