Skip to content

Deploying Notifo

Introduction

Notifo is a powerful, self-hosted notification hub that enables you to send notifications across multiple channels from a single, unified platform. Whether you need to send push notifications, emails, SMS messages, or messaging app alerts, Notifo provides a consistent API and management interface for all your notification needs.

Built with .NET, Notifo offers enterprise-grade reliability with support for high-volume notification delivery. The platform includes user preference management, notification templates, scheduling, and detailed analytics to help you optimize your communication strategy.

Key highlights of Notifo:

  • Multi-Channel Delivery: Push notifications, email, SMS, Telegram, and more
  • Unified API: Single API for all notification channels
  • User Preferences: Let users choose their preferred notification methods
  • Templates: Reusable notification templates with variable support
  • Scheduling: Schedule notifications for future delivery
  • Analytics: Track delivery rates, opens, and engagement
  • Web Push: Browser-based push notifications
  • Mobile SDKs: iOS and Android SDK support
  • Webhooks: Integrate with external systems
  • Multi-Tenant: Support multiple apps from one installation
  • Open Source: Apache 2.0 license with active development

This guide walks through deploying Notifo on Klutch.sh using Docker.

Why Deploy Notifo on Klutch.sh

Deploying Notifo on Klutch.sh provides several advantages:

Simplified Deployment: Klutch.sh handles the deployment complexity automatically.

Persistent Storage: Attach persistent volumes for your notification data and configuration.

HTTPS by Default: Automatic SSL certificates ensure secure API access.

GitHub Integration: Version-controlled deployments through your GitHub repository.

Scalable Resources: Allocate CPU and memory based on your notification volume.

Environment Variable Management: Securely store API keys and credentials.

Custom Domains: Use your own domain for your notification API.

Always-On Availability: Your notification hub remains accessible 24/7.

Prerequisites

Before deploying Notifo on Klutch.sh, ensure you have:

  • A Klutch.sh account
  • A GitHub account with a repository for your configuration
  • A MongoDB database (required for data storage)
  • SMTP credentials for email notifications (optional)
  • Push notification credentials (Firebase, APNS) for mobile push (optional)
  • (Optional) A custom domain for your Notifo instance

Understanding Notifo Architecture

Notifo consists of several components:

API Server: .NET-based REST API handling all notification operations.

MongoDB: Primary data store for users, notifications, and configuration.

Background Workers: Process notification queue and handle delivery.

Channel Integrations: Connectors for various notification channels (email, push, SMS, etc.).

Web Dashboard: Management interface for configuration and analytics.

Deploying Notifo on Klutch.sh

    Create Your GitHub Repository

    Create a new GitHub repository for your Notifo deployment configuration.

    Create the Dockerfile

    Create a Dockerfile in your repository root:

    FROM squidex/notifo:latest
    # Environment configuration
    ENV ASPNETCORE_URLS=http://+:5000
    ENV ASPNETCORE_ENVIRONMENT=Production
    # MongoDB connection
    ENV STORAGE__MONGODB__CONNECTIONSTRING=${MONGODB_CONNECTION_STRING}
    ENV STORAGE__MONGODB__DATABASE=notifo
    EXPOSE 5000

    Create a New Project on Klutch.sh

    Navigate to the Klutch.sh dashboard and create a new project.

    Create a New App

    Within your project, create a new app and connect your GitHub repository.

    Configure HTTP Traffic

    In the deployment settings:

    • Select HTTP as the traffic type
    • Set the internal port to 5000

    Set Environment Variables

    Configure the following environment variables:

    VariableValue
    STORAGE__MONGODB__CONNECTIONSTRINGYour MongoDB connection string
    STORAGE__MONGODB__DATABASEnotifo
    URLS__BASEURLhttps://your-app.klutch.sh
    IDENTITY__ADMINEMAILAdmin email address
    IDENTITY__ADMINPASSWORDSecure admin password

    Optional Channel Configuration

    For email notifications:

    VariableValue
    EMAIL__SMTP__HOSTSMTP server host
    EMAIL__SMTP__PORTSMTP port
    EMAIL__SMTP__USERNAMESMTP username
    EMAIL__SMTP__PASSWORDSMTP password

    Attach Persistent Volumes

    Add persistent storage:

    Mount PathRecommended SizePurpose
    /app/data10 GBApplication data and logs

    Deploy Your Application

    Click Deploy to start the build process.

    Access the Dashboard

    Once deployed, access the dashboard at https://your-app.klutch.sh. Log in with the admin credentials you configured.

Initial Configuration

Creating Your First App

Set up a notification app:

  1. Log in to the Notifo dashboard
  2. Click “Create App”
  3. Enter an app name and description
  4. Save to create the app

Configuring Channels

Enable notification channels:

  1. Navigate to your app settings
  2. Go to the Channels section
  3. Configure each channel:
    • Email: SMTP settings
    • Web Push: Generate VAPID keys
    • Mobile Push: Firebase/APNS credentials
    • SMS: Twilio or other provider

Creating Templates

Set up reusable notification templates:

  1. Go to Templates in your app
  2. Create a new template
  3. Define subject and body with variables
  4. Use templates when sending notifications

Sending Notifications

Via API

Send notifications programmatically:

POST /api/apps/{appId}/publish
Content-Type: application/json
Authorization: ApiKey {your-api-key}
{
"topic": "updates",
"subject": "New Feature Available",
"body": "Check out our latest feature!",
"properties": {
"url": "https://example.com/feature"
}
}

User Subscriptions

Manage user subscriptions:

  1. Register users via API
  2. Users subscribe to topics
  3. Send topic-based notifications
  4. Users can manage preferences

Scheduling

Schedule future notifications:

{
"topic": "reminders",
"subject": "Don't forget!",
"schedulingType": "Point",
"scheduledTime": "2024-12-25T09:00:00Z"
}

Production Best Practices

Performance Optimization

  • Use connection pooling for MongoDB
  • Configure appropriate worker counts
  • Enable caching for templates
  • Monitor queue lengths

Security Recommendations

  • Rotate API keys regularly
  • Use strong admin passwords
  • Enable rate limiting
  • Monitor for abuse

Reliability

  • Set up MongoDB replica set
  • Configure retry policies
  • Monitor delivery rates
  • Set up alerting for failures

Troubleshooting Common Issues

Notifications Not Sending

  • Verify channel configuration
  • Check API key permissions
  • Review delivery logs
  • Verify user subscriptions

Email Delivery Issues

  • Check SMTP credentials
  • Verify sender domain
  • Review bounce reports
  • Check spam folder

Push Notifications Failing

  • Verify Firebase/APNS credentials
  • Check device tokens
  • Review push logs
  • Ensure certificates aren’t expired

Additional Resources

Conclusion

Deploying Notifo on Klutch.sh provides a powerful, centralized notification hub for your applications. With support for multiple channels, user preferences, and detailed analytics, Notifo simplifies notification management while providing the flexibility to reach users on their preferred platforms.