Getting Started

Quick Start

Learn how to quickly setup and configure Tenon. In a few minutes you have a running site with an admin and a first published post.

To add Tenon to an app you already have, see Add to an existing site.

Prerequisites

  • Node.js - v24 or higher. Odd-numbered versions like v23 are not supported.
  • Package manager - Your preferred package manager. I like pnpm, but anything vite supports should work.
  • Accounts & Infrastructure - If you're just using node, you can skip this. But depending on where you want to deploy, you will need a hosting account (e.g. cloudflare, vercel), S3-compatible storage (e.g. AWS, B2) or a db provider (like neon, turso).

How to create a new project

Run the wizard

Run the following command in your terminal to start the install wizard and configure your project as you like:

npm create tenoncms@latest

If all goes well, you will see a success message followed by some recommended next steps. For more details on the cli, see create-tenoncms.

Go to your project

Now that your project has been created, you can cd into your new project directory to begin using Astro. If you skipped the “Install dependencies?” step during the CLI wizard, then be sure to install your dependencies before continuing.

npm install

Start the dev server

Depending on your selected configuration, you may need to add credentials to the generated .env file first. After that you can just run the following command as usual.

npm run dev

Create the admin account

Open the URL the dev server prints and add /admin. Enter your name, email and a password, then select Create admin account.

The first account is the admin. After that, sign-up closes, and admins invite everyone else. If you mess up during this step or need to create a user, you can do so using the cli.

Publish your first post

The starter comes with a Posts collection. In the admin, create a post, then select Publish. Every save is a draft until you publish it.

Open the home page of your site. It lists your post, and the link opens the post's own page.

The general structure of a Tenon project

my-site/
├── .env                    # the secret and the database settings
├── tenon.config.ts         # creates the CMS instance
├── cms/
│   └── collections/
│       └── posts.ts        # the fields of a post (in an optional sub-file)
└── src/pages/              # the home page and the post page
  • .env holds a random secret the wizard generated, and the database settings.
  • tenon.config.ts creates the CMS instance. See Configuration.
  • The posts collection describes the fields of a post. You can also just write them into the tenon.config.ts, but it it's best practice to extrat the content types. See Collections and globals.

Next steps

Content modeling

Add collections, all field types, relations and blocks for page sections.

Your framework

What the integration sets up, and the helpers it gives your pages.

Deployment

Run the site on Node, Vercel or Cloudflare.