Dornorium Setup Manual

Complete guide to installing, configuring, and running Dornorium—a simple, secure, serverless ticket management and customer communication platform.

Quick Navigation

Setup at a Glance

Component Required? Description Can Add Later?
Cloudflare API Token ✅ Yes Required to deploy Dornorium infrastructure No
Gmail Account ❌ No Optional. Send from any Gmail address (free or custom domain) Yes
Google Apps Script ❌ No Optional. Acts as email API bridge. Required only if using email. Yes
Domain Email Alias ❌ No Optional. Send from custom domain. Can use plain Gmail address instead. Yes
Recommendation: If you plan to use email, configure all three components (Gmail, Google Apps Script, and domain aliases) together. This makes overall setup faster and easier. But it's not a blocker—Dornorium works without email.

Free Tier Coverage

Dornorium runs completely on free tiers. Here's what you get:

Cloudflare Workers Free

Requests/day 100,000
D1 Read/Write 1,000,000
KV Operations 100,000/day
Suitable for Small teams

Gmail Free

Email aliases Up to 99
Sends/day 500 emails
Storage 15 GB
Suitable for Support + newsletters

Cloudflare Email Free

Email routes Unlimited
Inbound forwarding Unlimited
Catch-all rules Supported
Suitable for All sizes
💰 Cost: Dornorium can run entirely free using Cloudflare and Gmail free tiers. Upgrade anytime if you exceed limits—no lock-in.

What is Dornorium?

Dornorium (codenamed Dornorium) is a serverless ticket management platform for handling customer support, inquiries, and communications.

Overview

Dornorium is built on Cloudflare Workers for serverless compute, with D1 for data persistence and KV Storage for session management. It provides:

  • Ticket Management — Create, track, and resolve customer support tickets with full audit trail
  • SLA Tracking — Automatic SLA monitoring with visual indicators (on-track, at-risk, breached)
  • Email Integration — Bidirectional email integration (inbound tickets, outbound replies)
  • Multi-Category Support — Organize tickets by category with category-specific SLA and auto-reply templates
  • Newsletter Management — Built-in subscriber management and campaign sending
  • Live Reporting — Dashboard views, status charts, and performance metrics
  • User Authentication — Secure login with session tokens

Key Features

Ticket Workflow

Tickets flow through a simple lifecycle: New → Open → In Progress → Pending → Resolved → Closed (auto-closes after 3 days). Each status represents the current state of work.

SLA Management

Track two SLA deadlines per ticket: first response time and full resolution time. The dashboard uses color coding to show urgency:

  • 🟢 Green — On track (50%+ time remaining)
  • 🟡 Yellow — At risk (25–50% time remaining)
  • 🟠 Orange — Critical (less than 25% remaining)
  • 🔴 Red — Breached (deadline passed)

Email Routing

When someone emails your support address, Dornorium automatically:

  1. Checks if the email contains a ticket reference (TKT-YYYY-NNNNN)
  2. If yes: attaches it as a reply to the existing ticket
  3. If no: creates a new ticket in the appropriate category
  4. Sends an auto-reply confirming receipt (if enabled for that category)

Multi-Address Support

You can monitor multiple email addresses (support@, sales@, billing@, etc.), each routing to its own category with independent SLA and auto-reply settings. This is all managed through the Settings page with no code changes.

Newsletter Integration

The Newsletter section lets you:

  • Collect subscribers via a website form
  • Manage subscriber list and unsubscribe requests
  • Compose and send HTML campaigns
  • Track sent campaigns and recipient counts

Reporting

Live reporting dashboard with:

  • Ticket count summary (total, on-track, at-risk, breached)
  • Status breakdown pie chart
  • Daily volume trend (last 30 days)
  • Top categories and top senders table

Architecture

Dornorium is built entirely serverless:

  • Cloudflare Workers — API endpoints for all operations (no backend server to manage)
  • D1 Database — SQLite database for tickets, subscribers, campaigns, and settings
  • KV Storage — Session tokens and temporary cache
  • Email Routing — Native Cloudflare email routing for inbound emails
  • Google Apps Script — Optional relay for outbound email (uses your Gmail account)

What You Get

  • Serverless infrastructure (no server to maintain)
  • Automatic scaling (handles traffic spikes automatically)
  • Global distribution (requests served from nearest Cloudflare edge)
  • Built-in security (DDoS protection, rate limiting)
  • Free tier available for small teams (Cloudflare free + limited email)
Ready to start? Jump to Cloudflare API Token setup and you can have Dornorium running in 10 minutes.

Email Setup Overview Optional

Add email capabilities to send and receive support tickets, confirmations, and newsletters from your domain.

Important: Email is optional. Dornorium works perfectly without it—support tickets and contact forms will function normally. Email just adds notification capabilities.

You can set this up anytime after installing Dornorium. However, if you plan to use email, we recommend configuring all three components (Gmail, Google Apps Script, and domain aliases) together for easier overall setup.

Why Use Gmail for Email?

Gmail offers a free, reliable solution for sending transactional emails from your custom domain:

  • Send from support@yourdomain.com or any custom address
  • No separate email server to maintain
  • Integrates seamlessly with Dornorium via Google Apps Script
  • Free tier: up to 99 aliases, 500 emails per 24 hours
  • Use either a free Gmail account or your own Google Workspace account

Three Components You'll Set Up

Email integration requires three pieces working together:

1. Gmail Account

A free Google account dedicated to Dornorium, or your existing Google Workspace account. Used to relay outbound mail.

2. Google Apps Script

A private API bridge that Dornorium calls to send emails. Runs in your Google account.

3. Domain Aliases

Configure Gmail to send from your custom domain (optional). If you skip this, you can still send from your Gmail address.

Getting Started

Follow these sections in order:

  1. Create a Gmail account and set up Google Apps Script
  2. Configure domain aliases to send from custom addresses (optional)
Tip: Even if you choose not to use email initially, you can always add it later. Just come back to these sections whenever you're ready.

Creating Your Cloudflare API Token Required

One API token is used by the installer and by Dornorium (the worker) for domains, DNS, and email routing. Create it once under Manage account → Account API tokens.

1 Start with the template link

While logged into Cloudflare, open:

Pre-fill Dornorium token

https://dash.cloudflare.com/?to=/:account/api-tokens&permissionGroupKeys=%5B%7B%22key%22%3A%22workers_scripts%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22workers_kv_storage%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22d1%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22dns%22%2C%22type%22%3A%22edit%22%7D%2C%7B%22key%22%3A%22zone%22%2C%22type%22%3A%22edit%22%7D%5D&name=Dornorium

This pre-fills: Workers Scripts, Workers KV Storage, D1, DNS, and Zone.

2 Add Email Routing (required)

The template cannot set Email Routing. Add it before you create the token:

  1. On the policy for All zones, search for Email Routing
  2. Enable Write (or Edit) on Email Routing Rules
  3. On the policy for Entire account, search for Email Routing
  4. Enable Write (or Edit) on Email Routing Addresses (and Email Routing Rules if listed there too)
3 Confirm the final summary

Before clicking Create, the permission summary must look like this:

ScopePermissions
All zones (all domains in the account) DNS Write
Zone Write
Email Routing Rules Write
Entire account Workers Scripts Write
Workers KV Storage Write
D1 Write
Email Routing Addresses Write
Email Routing Rules Write (optional if already on All zones)
4 Create and copy
  1. Token name: Dornorium Installer
  2. Click Create Token
  3. Copy the token immediately — shown only once
  4. Save it securely
Done. Use this token for Dornorium Installer. One token covers install and the Dornorium platform configuration
Security: Never share the token or put it in git. If it leaks, delete it and create a new one with the same steps.

Setting Up Google Apps Script Optional

Configure a Google Apps Script that acts as a private API bridge between Dornorium and Gmail for sending emails.

Optional Step: Only do this if you want to use email in Dornorium. If you don't need email yet, you can skip this and set it up later.

Overview

Google Apps Script allows you to create a custom email API that Dornorium can call to send messages. The script validates credentials and uses Gmail's native sending capabilities.

What You'll Need

1 Create a New Google Apps Script Project
  1. Go to script.google.com and sign in with your Gmail account
  2. Click the blue + New project button in the top-left corner
Google Apps Script Dashboard showing the New project button
2 Paste the Code and Configure Credentials
  1. Delete any existing text in the code editor
  2. Copy and paste the code block below (use the Copy button):
/********************************************************************************
 * DORNORIUM GMAIL API WRAPPER
 * User Configuration — Edit the values below with your own credentials
 * 
 * IMPORTANT: Do not change anything else in this script after the CONFIG section
 ********************************************************************************/
var CONFIG = {
  SECRET_KEY: "YourSecretKey123",  // Change to your private security secret
  API_USERNAME: "user",             // Change to your desired API username
  API_PASSWORD: "SomePassword"      // Change to your desired API password
};

/********************************************************************************
 * CORE SCRIPT LOGIC (DO NOT EDIT BELOW THIS LINE)
 ********************************************************************************/
function doGet(e) {
  return handleRequest(e);
}

function doPost(e) {
  return handleRequest(e);
}

function handleRequest(e) {
  var p = e.parameter;

  // Validate the secret key
  if (p.secret !== CONFIG.SECRET_KEY) {
    return ContentService.createTextOutput(JSON.stringify({status: "error", message: "Unauthorized"}))
      .setMimeType(ContentService.MimeType.JSON);
  }

  // Validate username and password credentials
  if (p.username !== CONFIG.API_USERNAME || p.password !== CONFIG.API_PASSWORD) {
    return ContentService.createTextOutput(JSON.stringify({status: "error", message: "Invalid Credentials"}))
      .setMimeType(ContentService.MimeType.JSON);
  }

  try {
    var options = {
      htmlBody: p.message
    };
    if (p.from) {
      options.from = p.from;
    }

    GmailApp.sendEmail(p.to, p.subject, "", options);

    return ContentService.createTextOutput(JSON.stringify({status: "success"}))
      .setMimeType(ContentService.MimeType.JSON);
  } catch (err) {
    return ContentService.createTextOutput(JSON.stringify({status: "error", message: err.toString()}))
      .setMimeType(ContentService.MimeType.JSON);
  }
}
  1. Update the three configuration values at the top:
    • SECRET_KEY — A private security secret (can be any random string)
    • API_USERNAME — Your desired API username
    • API_PASSWORD — Your desired API password
  2. Choose strong credentials and store them securely—you will need them when configuring Dornorium
Security: Use strong, random credentials. Avoid simple passwords like "password123" or "admin". Consider using a password manager to generate secure values like:
  • SECRET_KEY: "k7$9mLpQ2#xRvW8nB1yZ4@Dj5"
  • API_USERNAME: "dornorium_api"
  • API_PASSWORD: "G9$2pL!8vK#4mX@5qRyT7*Wn"
Google Apps Script code editor with code pasted and save button
  1. Click the Save icon (floppy disk) at the top of the toolbar, or press Ctrl + S
  2. Name your project something like Dornorium Gmail API
3 Deploy as a Web App
  1. In the top-right corner, click the blue Deploy button
  2. Select New deployment
  3. Click the gear icon next to "Select type" and choose Web app
Web App deployment configuration window
  1. Fill in the deployment fields:
    • Description: Dornorium Gmail API
    • Execute as: Me (your email address)
    • Who has access: Anyone (Critical!)
  2. Click the blue Deploy button
Web App deployment configuration showing Who has access set to Anyone
4 Authorize Permissions
  1. Google will display an "Authorization required" prompt—click Review permissions
  2. Select your Google account
  3. You will see a warning that "Google hasn't verified this app"—this is normal and expected. Click Advanced (bottom left)
Google unverified app warning screen
  1. Click Go to [Project Name] (unsafe) (this is safe—it's your own script)
  2. Click Allow at the bottom of the page
Google app permission approval screen
  1. Copy your generated Web App URL from the deployment confirmation (looks like: https://script.googleapis.com/macros/d/XXXXX/usercache)
  2. Store it securely—you will need it for Dornorium configuration
Complete! You now have a working Gmail API relay. Next, optionally configure domain email aliases to send from custom addresses.

Configuring Domain Email Aliases Optional

Set up Gmail to send emails from your custom domain (e.g., support@yourdomain.com) instead of a plain Gmail address.

Optional: This step is only needed if you want to send from custom domain addresses. If you're happy sending from your Gmail address (e.g., support@gmail.com or noreply@gmail.com), skip this section entirely.

Overview

To send emails from addresses like support@yourdomain.com without security warnings, you must link your custom domain to Gmail using SMTP and a Google App Password. This section covers the setup.

Phase 1: Generate Your Google App Password

1 Access Your Security Settings
  1. Go to Google Account Security Settings
  2. Verify that 2-Step Verification is enabled (required for app passwords)
Google Account Security settings page
2 Create an App Password
  1. Scroll down and click App passwords
App passwords menu in Google Account settings
  1. Give your app password a name (e.g., Dornorium SMTP)
  2. Click Create
Creating a new app password in Google Account
  1. Google displays a 16-character password
  2. Copy this password and store it securely—you need it for Gmail alias setup
Generated 16-character app password

Phase 2: Configure "Send As" in Gmail

1 Open Gmail Settings
  1. Open your Gmail inbox at mail.google.com
  2. Click the Gear icon (Settings) in the top-right corner
  3. Select See all settings
  4. Go to the Accounts and Import tab
Gmail Settings menu
2 Add a Custom Email Address
  1. Under Send mail as:, click Add another email address
Send mail as section in Gmail settings
  1. Enter your custom domain email (e.g., support@yourdomain.com)
  2. Click Next Step
3 Configure SMTP Settings

Fill in the SMTP configuration with these values:

Setting Value
SMTP Server smtp.gmail.com
Port 465
Username Your Gmail account email
Password Your 16-character App Password (remove spaces)
Connection ✓ Secured connection using SSL
SMTP configuration window for custom domain alias
4 Verify Your Email Address
  1. Click Add Account
  2. Gmail sends a verification email to the address you just added
  3. Open the verification email and copy the confirmation URL
  4. Paste the URL into your browser and complete the verification
  5. Once verified, the email address will be available for sending through Dornorium
Account Limits: Free Gmail accounts can send from up to 99 email aliases and have a limit of 500 emails per 24 hours. This is usually plenty for support and notification emails.
Complete! You've now configured all optional email components. Your Dornorium platform is ready to send from custom domain addresses.

Permissions Reference

Final permission set for Dornorium installer and worker (Account API tokens).

Template (partial)

Pre-fill Dornorium token — then add Email Routing manually (see Cloudflare API Token section).

Required summary

ScopePermission
All zonesDNS Write
All zonesZone Write
All zonesEmail Routing Rules Write
Entire accountWorkers Scripts Write
Entire accountWorkers KV Storage Write
Entire accountD1 Write
Entire accountEmail Routing Addresses Write
Entire accountEmail Routing Rules Write (ok if present)

What each is for

PermissionPurpose
Workers ScriptsDeploy the worker
Workers KV StorageKV namespace
D1Database
DNS + ZoneDomains and DNS records
Email Routing Rules / AddressesInbound email to the worker