How to run Gotify as a systemd service.

  1. 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
    
  2. systemctl daemon-reload
  3. 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

You May Also Like

2 Comments

  1. 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…

    1. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *