Zum Inhalt

Gotify role

Deploy Gotify, a self-hosted push notification server for sending and receiving messages across devices.

Usage

Configure Gotify credentials in your inventory:

1
2
# vars/main.yml
gotify_adminpw: your_secure_admin_password

Include the role in your playbook:

1
2
3
4
# playbooks/proxmox/deploy_docker_base.yml
- hosts: docker_base
  roles:
    - role: gotify

The role provides these tags: - gotify-install - Deploy Gotify server - gotify-uninstall - Remove Gotify server

Docs

Deploy Gotify to your Docker host:

1
ansible-playbook -i inventory/hosts.yml playbooks/proxmox/deploy_docker_base.yml --tags gotify-install

Remove Gotify installation:

1
ansible-playbook -i inventory/hosts.yml playbooks/proxmox/deploy_docker_base.yml --tags gotify-uninstall

Configuration Details

The role deploys Gotify with: - Official Image: gotify/server from Docker Hub - Traefik Integration: Automatic HTTPS via Traefik reverse proxy - Persistent Storage: Local volume for application data - Default Admin: Configured via GOTIFY_DEFAULTUSER_PASS environment variable - Network: Connects to external proxy network

Accessing Gotify

After deployment, Gotify is available at: - URL: https://gotify.rwcloud.ch - Default User: admin - Password: As configured in gotify_adminpw variable

Features

Gotify provides: - WebSocket-based real-time message delivery - REST API for sending messages - Web UI for managing applications and messages - Android app for receiving notifications - Plugin system for extensibility - Message priorities and filtering

Sending Notifications

Create an application in the Gotify web UI to get an API token, then send messages:

1
2
3
4
curl -X POST "https://gotify.rwcloud.ch/message?token=YOUR_APP_TOKEN" \
  -F "title=Hello" \
  -F "message=This is a test notification" \
  -F "priority=5"

iOS Support Note

The role mentions iGotify for iOS push notifications. iGotify is a separate service that bridges Gotify to Apple's Push Notification service. This requires additional configuration with Tailscale tokens (not included in this basic deployment).