Gotify Docker#
a simple server for sending and receiving messages
Docker#
docker run -p 80:80 -v /var/gotify/data:/app/data gotify/server
# or via GitHub registry
docker run -p 80:80 -v /var/gotify/data:/app/data ghcr.io/gotify/server
docker run -d --name=gotify -p 8080:80 ghcr.io/gotify/server
User: admin / admin
Docker Compose#
version: '3'
services:
gotify:
image: gotify/server
ports:
- 8080:80
environment:
GOTIFY_DEFAULTUSER_PASS: 'admin'
volumes:
- './gotify_data:/app/data'
# to run gotify as a dedicated user:
# sudo chown -R 1234:1234 ./gotify_data
# user: "1234:1234"
Push messages#
Now you can simply use curl, HTTPie or any other installed http-client to push messages.
$ curl "https://push.example.de/message?token=<apptoken>" -F "title=my title" -F "message=my message" -F "priority=5"
$ http -f POST "https://push.example.de/message?token=<apptoken>" title="my title" message="my message" priority="5"
On Microsoft PowerShell, you could alternatively use the built-in Invoke-RestMethod
or Invoke-WebRequest
cmdlets.
PS> Invoke-RestMethod -Uri "https://push.example.de/message?token=<apptoken>" -Method POST -Body @{title="my title"; message="my message"; priority=5} # return is automatically parsed into a PowerShell object
PS> Invoke-WebRequest -Uri "https://push.example.de/message?token=<apptoken>" -Method POST -Body @{title="my title"; message="my message"; priority=5} # return is as raw response
Runtime Environment#
Architecture#
A client is a device or application that can manage clients, messages and applications. However a client is not allowed to send messages.
An application is a device or application that only can send messages.
Users are only able to manage (view/edit/delete) clients and applications (includes messages sent by the app) that they’ve created.
A message has the following attributes: content, title, creation date, application id and priority.