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
- Select HTTP as the traffic type
- Set the internal port to 5000
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 configurationENV ASPNETCORE_URLS=http://+:5000ENV ASPNETCORE_ENVIRONMENT=Production
# MongoDB connectionENV STORAGE__MONGODB__CONNECTIONSTRING=${MONGODB_CONNECTION_STRING}ENV STORAGE__MONGODB__DATABASE=notifo
EXPOSE 5000Create 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:
Set Environment Variables
Configure the following environment variables:
| Variable | Value |
|---|---|
STORAGE__MONGODB__CONNECTIONSTRING | Your MongoDB connection string |
STORAGE__MONGODB__DATABASE | notifo |
URLS__BASEURL | https://your-app.klutch.sh |
IDENTITY__ADMINEMAIL | Admin email address |
IDENTITY__ADMINPASSWORD | Secure admin password |
Optional Channel Configuration
For email notifications:
| Variable | Value |
|---|---|
EMAIL__SMTP__HOST | SMTP server host |
EMAIL__SMTP__PORT | SMTP port |
EMAIL__SMTP__USERNAME | SMTP username |
EMAIL__SMTP__PASSWORD | SMTP password |
Attach Persistent Volumes
Add persistent storage:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/app/data | 10 GB | Application 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:
- Log in to the Notifo dashboard
- Click “Create App”
- Enter an app name and description
- Save to create the app
Configuring Channels
Enable notification channels:
- Navigate to your app settings
- Go to the Channels section
- 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:
- Go to Templates in your app
- Create a new template
- Define subject and body with variables
- Use templates when sending notifications
Sending Notifications
Via API
Send notifications programmatically:
POST /api/apps/{appId}/publishContent-Type: application/jsonAuthorization: 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:
- Register users via API
- Users subscribe to topics
- Send topic-based notifications
- 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.