1. Documentation
  2. Deploying
  3. Self-hosting
ReadmeGitHub
  • Introduction
  • Quickstart
  • CLI
  • Configuration
  • Identity
  • Branding
  • Themes
  • Monitors
  • Checks and scheduling
  • Metrics and badges
  • Incidents
  • Maintenance
  • Notifications
  • Subscribers
  • React Router
  • Next.js
  • Astro
  • SQLite
  • Cloudflare D1
  • PostgreSQL
  • Schema and migrations
  • Cloudflare
  • Vercel
  • Self-hosting
  • API overview
  • Status endpoints
  • Incident endpoints
  • Maintenance endpoints
  • Subscriber endpoints
  • Badges, feeds and metrics
  • Admin endpoints
  • The check run
  • Uptime and history
  • Automatic incidents
  • Notification delivery
  • Public subscriptions

Self-hosting

Run the status page with persistent storage and one production scheduler.

Start with a project generated with Configure later. Run its framework server and a check scheduler as two processes that share a database. Keep exactly one scheduler per deployment, even if you run several web-server replicas. A static build alone cannot serve current snapshots or the status API.

Create a project

Choose Configure later to skip platform-specific deployment files. This example uses React Router and SQLite; change the template to next or astro, or choose PostgreSQL if you can't keep a local database file.

bash
bun create @heyo-sh/heyo-status my-status-page --template react-router --deployment later --database sqlite
cd my-status-page

The generated development script (bun dev) starts the framework and local scheduler, including an initial check. It is not your production process manager. You need Bun 1.4.3+ for the generator, CLI and example scheduler below. If serving SQLite through Node's node:sqlite, use Node 22.13+ (or 22.5–22.12 with --experimental-sqlite); with PostgreSQL, Next.js and React Router need Node 20.19+, and Astro 7 needs Node 22.12+.

Set up persistent storage

For SQLite, edit heyo-status.config.ts to point at a mounted, writable volume. The database must survive process and container restarts:

heyo-status.config.ts (database setup)
import { heyoStatus } from "@heyo-sh/heyo-status/config";
import { sqlite } from "@heyo-sh/heyo-status/db";

export const statusPage = heyoStatus({
  database: sqlite("/data/status.sqlite"),
  title: "Acme Status",
});

SQLite applies its migrations automatically. If you chose PostgreSQL, provide a shared connection in that same file and run bun run db:migrate before starting the app and after upgrades. See the SQLite and PostgreSQL guides.

Set the public HTTPS address for links in feeds and emails:

heyo-status.config.ts
siteUrl: "https://status.acme.com",

Run a scheduler once

The generated start script runs the web server, not the three scheduled jobs. Install node-cron in the project and add a separate process:

bash
bun add node-cron
scheduler.ts
import { scheduleStatusPage } from "@heyo-sh/heyo-status/deployments/node";
import cron from "node-cron";
import { statusPage } from "./heyo-status.config";

const scheduler = scheduleStatusPage(statusPage, cron);
process.once("SIGTERM", () => scheduler.stop());
process.once("SIGINT", () => scheduler.stop());

node-cron calls runChecks, summarize and cleanup according to the three expressions in the config. In production, supervise one bun scheduler.ts process alongside your web server, with TZ=UTC so node-cron interprets the configured times in UTC. It must see the same database and secrets as the server. Starting one scheduler per replica duplicates checks and may send duplicate alerts. The scheduler doesn't run an immediate check when it starts; use the generated bun run check script for a one-off check if the page is empty.

You can use a different scheduler, but it must call all three statusPage.cron methods on their respective schedules. The admin HTTP endpoint runs checks only; the CLI has no standalone summarize or cleanup command. Don't rely on an HTTP check trigger alone to maintain history.

Build, start and verify

bash
bun run build
bun run start       # web server (keep running)
# In a second terminal or managed process:
TZ=UTC bun scheduler.ts

Put the server behind a reverse proxy that forwards the public host. After a check has run, verify both the API and its database-backed summary:

bash
curl https://status.acme.com/api/heyo-status/healthz
curl https://status.acme.com/api/heyo-status/status/summary

/healthz says the API process is reachable, not that the database works or checks are running. Look for hasData: true in /status/summary after the first check. The management API remains closed unless you configure adminToken from a private secret source.

Vercel< PreviousAPI overviewNext >

Powered by heyo

On this page

Create a projectSet up persistent storageRun a scheduler onceBuild, start and verify