Notification Settings

Configure ntfy push notifications for your phone.

ntfy Configuration

Install the ntfy app on your phone, subscribe to your topic, and enter the details below.

<%= form_with model: @admin, url: admin_notifications_path, method: :patch, local: true, class: "space-y-6" do |f| %>
<%= f.check_box :ntfy_enabled, class: "h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500" %> <%= f.label :ntfy_enabled, "Enable ntfy notifications", class: "text-sm font-medium text-gray-700" %>
<%= f.label :ntfy_topic, "ntfy Topic", class: "block text-sm font-medium text-gray-700" %>

The topic name you subscribe to in the ntfy app. Treat this like a password.

<%= f.text_field :ntfy_topic, class: "mt-2 block w-full rounded-lg border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm py-2.5", placeholder: "mysmsa-pio-your-secret-topic" %>
<%= f.label :ntfy_token, "Access Token (optional)", class: "block text-sm font-medium text-gray-700" %>

Required only if your ntfy server has access control enabled.

<%= f.text_field :ntfy_token, class: "mt-2 block w-full rounded-lg border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm py-2.5", placeholder: "tk_..." %>
<%= f.label :ntfy_server_url, "ntfy Server URL", class: "block text-sm font-medium text-gray-700" %>

Leave blank to use the default (from NTFY_SERVER_URL env var or ntfy.sh).

<%= f.text_field :ntfy_server_url, class: "mt-2 block w-full rounded-lg border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500 sm:text-sm py-2.5", placeholder: "https://ntfy.yourdomain.com" %>
<%= f.submit "Save Settings", class: "inline-flex items-center gap-2 rounded-lg bg-blue-600 px-4 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 transition-all" %>
<% end %>

Send Test Notification

Sends a test push to your configured ntfy topic right now.

<%= button_to test_admin_notifications_path, method: :post, class: "inline-flex items-center gap-2 rounded-lg bg-green-600 px-4 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-green-500 transition-all" do %> Send Test Notification <% end %>

How ntfy works