# Gotify

# Installing Gotify with iGotify for iOS

Gotify is a self-hosted notification server that lets you send messages to devices and apps via a simple API. It’s great for server alerts, home automation, and custom scripts because you control delivery and history.

iGotify is the bridge that makes Gotify work with iOS push notifications. It listens to Gotify, translates messages, and forwards them to the SecNtfy app on your iPhone so you get real push alerts (iOS can’t poll in the background, so the bridge is required).

Once app is installed Set gotify and igotify domain in Nginx Reverse Proxy and Pangolin for domain with ssl login

#### Install Gotify

1. ssh to folder where gotify app will live or use Komodo and create Stack
2. Add docker-compose.yaml 
    1. Add services: Gotify and iGotify, with ports exposed (e.g., Gotify 3030:80, iGotify 3031:8080)
    2. Persist data: Use a volume for Gotify (data:/app/data or ./gotify\_data:/app/data)
    3. GOTIFY\_DEFAULTUSER\_PASS for the default admin
3. Start the stack
4. Check URLs: Gotify at http://&lt;server-ip&gt;:3030, iGotify at http://&lt;server-ip&gt;:3031/Version
5. Login: Open Gotify, sign in as admin

#### Create Tokens for iOS app

1. Login to Gotify in browser and got to Clients
2. Create a Gotify client token by clicking New client (e.g., “igotify”).
3. Copy token
4. Add to iGotify env: GOTIFY\_CLIENT\_TOKENS: "cXXXXXXXX" inside yml file 
    1. Adjust the URL to the domain url of Gotify

#### iGotify iOS App Setup

1. Install iGotify app
2. Enable local instance: In the app’s settings
3. Connect to iGotify: Use http://&lt;server-ip&gt;:3031
4. Get igotify app token: In the app, Settings → Development → copy the notification token (NTFY-DEVICE-XXXXXX).
5. Add that token to the yml file
6. Update compose
7. Once everything is up and running, go to igotify app into settings
8. Select Instance and click Edit
9. Change the http://&lt;server-ip&gt;:3031 to https and point it to domain

#### Adding multiple devices Multiple tokens

Add each device’s SecNtfy token separated by semicolons.

Example:

```bash
Enviroment:
  SECNTFY_TOKENS: "NTFY-DEVICE-AAA;NTFY-DEVICE-BBB"
  GOTIFY_CLIENT_TOKENS: "cXXXX1;cXXXX2" (if using multiple Gotify clients)
  GOTIFY_URLS: "https://gotify1;https://gotify2" (if using multiple Gotify servers)
```

# Gotify Compose File

```bash
services:
  gotify:
    container_name: gotify
    hostname: gotify
    image: gotify/server
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    networks:
      - net
    ports:
      - "3030:80"
    volumes:
      - data:/app/data
    environment:
      GOTIFY_DEFAULTUSER_PASS:  'admin'   # Change me!!!!!

  igotify:
    container_name: igotify
    hostname: igotify
    image: ghcr.io/androidseb25/igotify-notification-assist:latest
    restart: unless-stopped
    security_opt:
      - no-new-privileges:true
    pull_policy: always
    healthcheck:
      test: [ "CMD", "curl", "-f", "http://localhost:8080/Version" ]
      interval: "3s"
      timeout: "3s"
      retries: 5
    networks:
      - net
    ports:
      - "3031:8080"
    volumes:
      - api-data:/app/data
    environment:                 # option environment see above note
      GOTIFY_URLS:          'https://gotify.cyberpaw.org'
      GOTIFY_CLIENT_TOKENS: '' #create on the gotify browser client
      SECNTFY_TOKENS:       '' #after initial login get it from settings

networks:
  net:

volumes:
  data:
  api-data:

```