Skip to main content

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).

Prerequisites
Docker and compose: Installed and up to date.

Network access: Your iPhone can reach your server on your LAN (for initial setup).

Domain and SSL (optional): For remote access via Nginx Proxy Manager or similar.

Step-by-step setup
Prepare the compose file

Create file: docker-compose.yaml.

Add services: Gotify and iGotify, with ports exposed (e.g., Gotify 3030:80, iGotify 3031:8080).

Persist data: Use a volume for Gotify (data:/app/data or ./gotify_data:/app/data).

Set password:

GOTIFY_DEFAULTUSER_PASS for the default admin.

Start the stack

Run: docker compose up -d.

Verify: docker ps shows both containers up.

Check URLs: Gotify at http://<server-ip>:3030, iGotify at http://<server-ip>:3031/Version.

Create a Gotify client token

Login: Open Gotify, sign in as admin.

Create client: Settings → Clients → New client (e.g., “igotify”).

Copy token: It looks like cXXXXXXXX.

Add to iGotify env: GOTIFY_CLIENT_TOKENS: "cXXXXXXXX".

Point iGotify to Gotify:

Local: GOTIFY_URLS: "http://gotify:80" (same Docker network).

Domain: GOTIFY_URLS: "https://your-gotify-domain".

Bootstrap with local instance (iOS app)

Install app: SecNtfy on your iPhone.

Enable local instance: In the app’s settings.

Connect to iGotify: Use http://<server-ip>:3031.

Get SecNtfy token: In the app, Settings → Development → copy the notification token (NTFY-DEVICE-XXXXXX).

Add SecNtfy token and restart

Update compose: Under igotify → environment add:

SECNTFY_TOKENS: "NTFY-DEVICE-XXXXXX"

Optional: 'ENABLE_CONSOLE_LOG': 'true', 'ENABLE_SCALAR_UI': 'true' (booleans in single quotes).

Apply changes: docker compose up -d.

Switch to domain (optional, for remote)

Reverse proxy: Create a host for Gotify (e.g., gotify.yourdomain) and for iGotify (e.g., igotify.yourdomain) forwarding to the containers.

Enable SSL: Use Let’s Encrypt in your proxy.

Update app: Disable local instance and set the iGotify API URL to https://igotify.yourdomain.

Test notifications

Send test: In Gotify, create an application and send a message (or use curl).

Verify: Notification appears on your iPhone via SecNtfy.

Adding multiple devices
Multiple tokens: Add each device’s SecNtfy token separated by semicolons.

Example:

Env values:

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)