Getting Started with Domma CMS

From npx to first published page in under five minutes.

Prerequisites. Node.js 18.17+, npm 9+, and a terminal. That's it — no database required by default.

Scaffold a new site

The fastest way to start — no global install needed.

✓ Creates the project directory
✓ Installs all dependencies
✓ Leaves you ready for the setup wizard

One command.

npx domma-cms@latest my-site cd my-site npm install

No build step, no compilation. Fastify starts in seconds once dependencies are installed.

What the scaffolder creates. A clean, flat layout — content as files, config as JSON, plugins as folders.

my-site/ ├── bin/ # CLI entry point ├── config/ # All configuration JSON files │ ├── auth.json │ ├── content.json │ ├── navigation.json │ ├── plugins.json │ ├── presets.json │ ├── server.json │ └── site.json ├── content/ # All content as flat files │ ├── blocks/ # Reusable HTML block templates │ ├── collections/ # Collection data (JSON entries) │ ├── media/ # Uploaded media files │ ├── pages/ # Markdown pages │ └── users/ # User accounts (JSON) ├── plugins/ # CMS plugins ├── admin/ # Admin SPA (Domma + Fastify) ├── public/ # Public site assets ├── scripts/ # Utility scripts (setup, seed, reset) ├── server/ # Fastify server └── .env # Secrets only (JWT_SECRET, NODE_ENV)

Step 2 — run the setup wizard. Before you can log in, create the first administrator account.

npm run setup

The wizard asks for:

Site title — shown in the admin and public site
Admin name — your display name
Admin email — used to log in
Admin password — minimum 8 characters

On completion, the wizard writes config/site.json and creates your admin user in content/users/<uuid>.json.

One more command.

npm run setup

Locked out later? Run npm run reset to clear all users and start over. Use npm run fresh for a full reset plus demo content reseed.

Step 3 — start the server. Development mode reloads on every file change.

npm start

npm start

Starts the Fastify server on port 4096 by default. Change the port in config/server.json if needed.

npm run dev

npm run dev

Same as npm start, but with Node's --watch flag so the server restarts on file changes.

Your URLs. Public site at http://localhost:4096 — admin panel at http://localhost:4096/admin.

Step 4 — first login. Use the credentials you set during setup.

1. Navigate to http://localhost:4096/admin
2. Enter the email and password from the setup wizard
3. The admin issues a JWT access token (15 min) and a refresh token (7 days) — renewed automatically in the browser

Create your first page. Markdown + frontmatter, published in seconds.

1. Click Pages in the admin sidebar
2. Click New Page
3. Set a URL path (e.g. /about) — this maps directly to the public URL
4. Give the page a title and choose a layout (default, minimal, landing, or with-sidebar)
5. Write Markdown in the editor — shortcodes like [card], [hero], [slideover] are all supported
6. Set Status to published and click Save

Your page is live at http://localhost:4096/about the instant you save.


Batteries, already installed.

Twenty-two themes. Eleven palettes, each in a dark and a light variant. The public site and the admin theme are set independently in Settings.

Palette Dark Light
Charcoal charcoal-dark charcoal-light
Ocean ocean-dark ocean-light
Forest forest-dark forest-light
Sunset sunset-dark sunset-light
Royal royal-dark royal-light
Lemon lemon-dark lemon-light
Silver silver-dark silver-light
Grayve grayve-dark grayve-light
Christmas christmas-dark christmas-light
Unicorn unicorn-dark unicorn-light
Dreamy dreamy-dark dreamy-light

Three bundled plugins — enabled on first run.

analytics

Lightweight page-hit tracking, stored in a JSON file — no third-party service.

theme-roller

Lets visitors cycle through the public site's themes with one click.

domma-effects

Scroll-triggered entrance animations for page elements — tunable per page.

Four page layouts. Pick the one that fits each page's purpose.

Key Description
default Standard page with navbar and footer
with-sidebar Page with navbar, sidebar, and footer
minimal Clean page with no navbar or footer
landing Full-width landing page layout

npm scripts. Everything day-to-day — a single command away.

Script Purpose
npm start Start the server
npm run dev Start with --watch for development
npm run setup Interactive first-run setup wizard
npm run seed Populate demo content
npm run reset Delete users and clear setup state
npm run fresh Full reset plus reseed
npm run build Bundle admin JS with esbuild