SimpleNS LogoDocs

Getting Started

Get SimpleNS up and running in under 5 minutes. This guide will walk you through setting up a local instance and sending your first notification.


Prerequisites

Before you begin, ensure you have the following installed:

  • Docker and Docker Compose

5-Minute Quickstart

Get SimpleNS running on your machine and send your first notification in under 5 minutes.

Step 1: Install & Start

Run this command in your terminal to start the @simplens/onboard cli tool

Run this command in your terminal:

curl -fsSL https://simplens.in/api/install/linux | bash

Works on Ubuntu, Debian, CentOS, and other Linux distros.

Run this command in PowerShell (as Administrator):

irm https://simplens.in/api/install/windows | iex

Requires PowerShell 5.1+ running as Administrator.

Quick start with npx:

npx @simplens/onboard

Or install globally:

npm i -g @simplens/onboard

Requires Node.js 18+ and npm installed.

The installer will create the following files:

  • docker-compose.yaml: Contains the application services (API Server, Background Worker, Unified Processor, Delayed Processor, Recovery Service, and the Admin Dashboard)
  • docker-compose.infra.yaml: Contains the infrastructure services like mongo, kafka, redis, loki, and grafana (customizable in @simplens/onboard, or omitted if you bring your own infrastructure)
  • .env: Contains the bootstrap environment variables (JWT_SECRET, MONGO_URI, REDIS_URL, BROKERS, CORS_ALLOWED_ORIGINS, etc.)
  • nginx.conf: An optional Nginx configuration file if BASE_PATH or SSL is enabled in @simplens/onboard
  • nginx.ssl.conf: Generated when SSL is enabled and services are not auto-started; this is the final HTTPS Nginx config used after certificate issuance

Dashboard-first configuration

You no longer need to manually edit YAML plugin files or set admin passwords in .env. Once the containers are running, you'll complete setup directly in the Admin Dashboard.

Step 2: Verify Health

Ensure the core API server is running and healthy:

curl http://localhost:3000/api/health

Expected response:

{
  "status": "ok",
  "timestamp": "2026-01-01T00:00:00.000Z"
}

Step 3: Complete First-Launch Onboarding in the Dashboard

Open the Admin Dashboard at http://localhost:3002.

  1. Create your Admin account (/setup): On first launch, SimpleNS automatically routes you to /setup to create your admin username and password (stored securely in MongoDB).
  2. Follow the Guided Tour: After signing in, the Dashboard walks you through:
    • Installing a plugin (e.g., @simplens/mock for local testing, or email/SMS providers) in Plugins (/plugins)
    • Configuring provider credentials and Channel Routing
    • Creating a scoped API key in API Keys (/keys) with notification permission

Trying it out quickly?

Install the mock plugin during the guided tour—it requires no external provider credentials and lets you test the full delivery pipeline immediately.

Step 4: Send Your First Notification

Use the API key you created in API Keys (/keys) to send a test notification to the mock channel:

curl -X POST http://localhost:3000/api/notification \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <YOUR-API-KEY>" \
  -d '{
    "request_id": "550e8400-e29b-41d4-a716-446655440000",
    "client_id": "55283667-1f58-467d-86a1-47f7f0e059f2",
    "channel": ["mock"],
    "webhook_url": "https://webhook.site/your-test-endpoint",
    "recipient": {
      "user_id": "user123"
    },
    "content": {
      "mock": {
        "message": "Hello from SimpleNS!"
      }
    }
  }'
import axios from 'axios';

const response = await axios.post(
  'http://localhost:3000/api/notification',
  {
    request_id: crypto.randomUUID(),
    client_id: '55283667-1f58-467d-86a1-47f7f0e059f2',
    channel: ['mock'],
    webhook_url: 'https://webhook.site/your-test-endpoint',
    recipient: { user_id: 'user123' },
    content: { mock: { message: 'Hello from SimpleNS!' } },
  },
  {
    headers: {
      'Content-Type': 'application/json',
      Authorization: 'Bearer <YOUR-API-KEY>',
    },
  }
);

Expected response (202 Accepted):

{
   "message": "Notifications are being processed"
}

Step 5: Inspect Delivery in the Dashboard

Return to the Admin Dashboard (http://localhost:3002) and open the Events page (/events) to inspect your notification's status, payload, and delivery timeline. You can also send test notifications visually from Send (/send) or Payload Studio (/payload-studio).

Congratulations! 🎉

You've successfully deployed SimpleNS, completed onboarding, and sent your first notification.


Automatic HTTPS (Let's Encrypt)

@simplens/onboard can automatically configure HTTPS using Nginx + Certbot with Let's Encrypt HTTP-01 challenge.

Flags

  • --ssl: Enable SSL automation.
  • --ssl-domain <domain>: Public FQDN used for certificate issuance.
  • --ssl-email <email>: Email used for Let's Encrypt registration.

Domain and email are validated before setup:

  • Domain must be a valid public FQDN (no protocol, path, wildcard, query, or port).
  • Email must be a valid email format.

Mode Behavior

In interactive mode (without --full):

  • If --ssl is not passed, onboard asks whether to enable automatic SSL.
  • If enabled, onboard prompts for domain and email.
  • Onboard asks whether to start services immediately.

If you choose to start now, onboard performs the SSL bootstrap flow automatically:

  1. Starts Nginx with a bootstrap nginx.conf for ACME challenge.
  2. Requests the first certificate with Certbot webroot mode.
  3. Switches to final SSL-enabled nginx.conf and reloads Nginx.
  4. Starts certbot-renew for periodic renewals (12h check interval).

In --full mode:

  • No interactive prompts are shown.
  • --ssl-domain and --ssl-email are required when --ssl is set.
  • Missing or invalid values fail fast during CLI validation.
  • Services are not auto-started by design.

Onboard generates all files and prints the manual SSL runbook commands.

Prerequisites for Certificate Issuance

Before running SSL issuance, make sure:

  1. Your domain is registered.
  2. An A record points your domain to this machine public IP.
  3. Ports 80 and 443 are open and reachable from the internet.

Quick Examples

Interactive SSL setup:

npx @simplens/onboard --infra --env interactive
# then enable SSL in the prompt flow

Non-interactive SSL setup (--full):

npx @simplens/onboard \
  --full \
  --infra mongo kafka redis nginx \
  --env default \
  --ssl \
  --ssl-domain app.example.com \
  --ssl-email ops@example.com

Manual SSL Runbook

When services are not auto-started (for example in --full mode), run:

# 1) Start infra services (includes nginx bootstrap config)
docker compose -f docker-compose.infra.yaml up -d

# 2) Start application services
docker compose up -d

# 3) Request certificate
docker compose -f docker-compose.infra.yaml run --rm --no-deps --entrypoint certbot certbot certonly --webroot -w /var/www/certbot --email <email> --agree-tos --no-eff-email -d <domain> --non-interactive

# 4) Swap config file
# Windows:
copy /Y nginx.ssl.conf nginx.conf
# Linux/macOS:
cp nginx.ssl.conf nginx.conf

# 5) Reload nginx
docker compose -f docker-compose.infra.yaml exec -T nginx nginx -s reload

# 6) Start renewal service
docker compose -f docker-compose.infra.yaml up -d certbot-renew

Automated compose execution in onboard attempts docker compose and falls back to docker-compose if needed. Manual instructions are printed using docker compose commands.

Troubleshooting

Common validation failure in --full mode:

npx @simplens/onboard --full --env default --ssl --ssl-domain app.example.com --ssl-email ops@example.com

If certificate issuance fails, check:

docker compose -f docker-compose.infra.yaml ps
docker compose -f docker-compose.infra.yaml logs nginx
docker compose -f docker-compose.infra.yaml run --rm --no-deps --entrypoint certbot certbot certificates

If Nginx reload fails, check:

docker compose -f docker-compose.infra.yaml exec -T nginx nginx -t

And verify cert paths in nginx.conf under:

  • /etc/letsencrypt/live/<domain>/fullchain.pem
  • /etc/letsencrypt/live/<domain>/privkey.pem

Next Steps

Now that you have the core system running, explore adding real providers.

On this page