URI: 
        Gotify - Get notifications about everything on your phone
       
       Publised on : 2025-07-07 11:40
       
       I like being updated, especially about things going wrong. This 
       includes downtime for my home lab services, websites and, of 
       course, when jobs like CI/CD are done or have errors.
       
       Gotify is a simple server for sending and receiving messages, self 
       hosted, free and open source, cross platform,  written in Go and 
       can easily be installed with it's docker image.
       
        - What you need
       
       Let me list the things you need:
        * a server - it can be an old laptop, pc or, even better, a 
        tiny pc or a Raspberry Pi that is always turned on and connected 
        to the internet.
        * linux - I use Ubuntu server
        * docker and curl installed
        * Android phone - sorry iOS users
        * free time
       
        - Install gotify
       
       As mentioned earlier in the things you need we'll use docker to 
       install gotify
       
       Once you have docker installed you can just run this:
       
           # From docker hub
       
           docker run -p 8091:80 -v /var/gotify/data:/app/data \
           gotify/server 
       
           # or via GitHub registry 
       
           docker run -p 8091:80 -v /var/gotify/data:/app/data \
           ghcr.io/gotify/server
       
       As you can see I use port 8091 on the host because 80 is surely 
       already used by everyone.
       
       Once the container is started navigate to http://[ip.address]:8091
       
       Create your account and add an APP. When creating an APP make sure 
       to set default priority to something higher than 7.
       
   IMG  A photo of Gotify -> Add App
       
       If the priority is lower than 7 you will receive a silent 
       notification on your Android phone. Even if you set a lower 
       priority it's not a problem. Maybe you don't want high priority 
       notifications (with sound) for all actions. You can also pass the 
       priority parameter with each request and use a higher priority for 
       important messages.
       
       Once the APP is created a token will be available for it. This 
       token is a unique identifier used to authenticate and authorize 
       requests to send messages to a specific application within the 
       Gotify server. Copy this token as it's needed to send 
       notifications. In the commands below the token is <apptoken>.
       
        - Install Android App
       
       Gotify is published in the Play Store. Install it :)
       
  HTML Gotify on Google Play Store
       
       
        -+- Configure Android App
       
       When you first run the Android Gotify App you will be asked for 
       the Gotify URL. In our case it's http://[ip.adress]:8091
       
       After it finds Gotify at the URL enter your Gotify username and 
       password. Choose a name for your session and we're done.
       
        - Using Gotify
       
       Sending notifications from Gotify is easy. Just one simple curl 
       command:
       
           curl "http://[ip.address]:8091/message?token=<apptoken>" \
           -F "title=Test for Android" -F "message=Can you see me?" \
           -F "priority=10"
       
       You should receive a notification with sound on your Android phone.
       
       There are a lot of message extras that can be sent with the 
       notification:
       
  HTML Gotify Message Extras
       
       But I like keeping things simple. All I did was upload icons for 
       my different Gotify APPS.
       
        -+- Custom domain
       
       Let's say you want to use a subdomain/domain for your Gotify 
       server. 
       I use Nginx Proxy Manager. When adding a proxy host make sure to 
       check Websockets Support as Gotify uses websockets for sending and 
       receiving messages in realtime.
       
           curl "http://[ip.address]:8091/message?token=<apptoken>" \
           -F. "title=Thank you for visiting Sava.Rocks" \
           -F "message=Have a great day!" -F "priority=10"
       
        -+- Uptime Kuma
       
       P.S. If you're using Uptime Kuma for monitoring your services you 
       can be notified by Uptime Kuma with Gotify.
       In Uptime Kuma go to Settings -> Notifications and add a 
       Type Gotify notification.
       
       
   DIR  Back to my phlog