Installation & Setup
Requirements, first-run configuration and the handful of values worth changing straight away.
Updated: September 2026·License: Commercial & Personal
Requirements
- Node.js 22.12 or newer (required by Astro 7) — check with
node -v - npm, pnpm or yarn — the examples use npm
- Any editor; the official Astro VS Code extension adds syntax highlighting for
.astrofiles
First run
bash
npm install
npm run dev
Change these first
Before you get far into customising, set the values that appear across the whole site:
- Site URL — in
astro.config.mjs, setsiteto your real domain. Canonical URLs, the sitemap and the RSS feed are all derived from it. - Site metadata — title, description and social image defaults live in the shared layout under
src/layouts/. - Favicon — replace the files in
public/.
js
// astro.config.mjs
import { defineConfig } from 'astro/config';
export default defineConfig({
site: 'https://your-domain.com',
});
Leaving
siteat its placeholder value is the single most common setup mistake. It produces a sitemap and feed full of the wrong domain.
Explore production-ready themes
Hand-built Astro themes — SaaS, storefront, portfolio, and dashboard.