Gotify is a self-hosted push notification service written in Go and distributed under the MIT License. It consists of a server for sending and receiving messages in real-time per WebSocket which is distributed as a single binary. It can be accessed via the built-in web-ui, the cli or the Android app (available via F-Droid and GooglePlay ).
For this guide you should be familiar with the basic concepts of
Gotify comes with a built-in sqlite database, but if you prefer to use MySQL, you can do so.
For both options you need to configure a web backend. The subpath option looks like this:
[isabell@stardust ~]$ uberspace web backend set /gotify/ --http --port 52111 --remove-prefix Set backend for / to port 52111; please make sure something is listening! You can always check the status of your backend using "uberspace web backend list". [isabell@stardust ~]$
Note the –remove-prefix option here. Without it, gotify will not work behind a sub path (e.g. isabell.uber.space/gotify/).
Like a lot of Go software, gotify is distributed as a single binary. Download gotify’s latest release, unzip it and make sure that the file can be executed.
[isabell@stardust ~]$ mkdir ~/gotify && cd ~/gotify [isabell@stardust gotify]$ wget https://github.com/gotify/server/releases/download/v2.0.10/gotify-linux-amd64.zip Resolving github.com (github.com)... 188.8.131.52 Connecting to github.com (github.com)|184.108.40.206|:443... connected. HTTP request sent, awaiting response... 302 Found Length: 52960072 (51M) [application/octet-stream] Saving to: gotify-linux-amd64.zip 100%[==========================================>] 10,200,261 12.0MB/s 2019-10-26 01:15:11 (12.0 MB/s) - 'gotify-linux-amd64.zip' saved [10200261/10200261] [isabell@stardust gotify]$ unzip gotify-linux-amd64.zip Archive: gotify-linux-amd64.zip inflating: gotify-linux-amd64 inflating: LICENSE creating: licenses/ inflating: licenses/github.com_gotify_plugin-api [...] inflating: licenses/golang.org_x_crypto [isabell@stardust gotify]$
Without configuration, gotify will listen on port 80. To change that to our previously chosen
we will use an environment variable. It is also possible to use a config file, but we will ignore that for now.
If you still want to change values in the config, download the example config and adjust it to your needs:
[isabell@stardust gotify]$ wget -O config.yml https://raw.githubusercontent.com/gotify/server/master/config.example.yml [isabell@stardust gotify]$
Documentation for the config file can be found on the gotify website.
~/etc/services.d/gotify.ini with the following content.
[program:gotify] command=%(ENV_HOME)s/gotify/gotify-linux-amd64 directory=%(ENV_HOME)s/gotify/ environment=GOTIFY_SERVER_PORT=52111
After creating the configuration, tell supervisord to refresh its configuration and start the service:
[isabell@stardust ~]$ supervisorctl reread SERVICE: available [isabell@stardust ~]$ supervisorctl update SERVICE: added process group [isabell@stardust ~]$ supervisorctl status SERVICE RUNNING pid 26020, uptime 0:03:14 [isabell@stardust ~]$
If it’s not in state RUNNING, check your configuration.
The default user and password is
admin, but you are advised
to change in as soon as you log in. You can replace the admin user with an
other user with admin privileges later on.
Check the update feed regularly to stay informed about the newest version.
Check gotify’s releases for the latest version. If a newer
version is available, stop daemon by
supervisorctl stop gotify and repeat the “Installation” step followed by
supervisorctl start gotify to restart gotify.
Tested with Gotify 2.0.10, Uberspace 220.127.116.11Written by: Jonas <https://github.com/jfowl>