{
  "manifest_version": "1",
  "slug": "astro",
  "title": "Astro",
  "headline": "Deploy an Astro site",
  "description": "Deploy Astro to an exe.dev VM: git push to deploy, static pages served by Caddy or SSR with @astrojs/node under systemd, SQLite, HTTPS, and backups.",
  "category": "frameworks",
  "tags": [
    "astro",
    "static site",
    "ssr",
    "astrojs node adapter",
    "caddy",
    "content collections",
    "astro actions",
    "git push deploy",
    "sqlite",
    "netlify alternative"
  ],
  "url": "https://exe.dev/deploy/astro",
  "markdown_url": "https://exe-staging.dev/deploy/astro.md",
  "upstream": {
    "website": "https://astro.build",
    "source": "https://github.com/withastro/astro",
    "docs": "https://docs.astro.build",
    "license": "MIT"
  },
  "example_vm_name": "my-astro",
  "time": "10 minutes",
  "stack": [
    {
      "name": "Astro 7",
      "detail": "astro build in each release; pages are prerendered unless you opt out",
      "data": "~/app → the current release in ~/releases"
    },
    {
      "name": "Caddy 2",
      "detail": "serves a static build (dist/) on port 8000",
      "port": 8000
    },
    {
      "name": "Node.js 26 LTS",
      "detail": "@astrojs/node standalone server as app.service, for on-demand pages, actions, and endpoints",
      "port": 8000
    },
    {
      "name": "git push deploys",
      "detail": "A pre-receive hook in ~/app.git builds, picks Caddy or Node.js, and switches"
    },
    {
      "name": "SQLite",
      "detail": "node:sqlite in the new site's guestbook; settings in ~/app.env",
      "data": "~/data"
    },
    {
      "name": "Nightly backup",
      "detail": "app-backup.timer; data, settings, and the repository",
      "data": "~/backups"
    }
  ],
  "access": [
    {
      "url": "https://my-astro.exe.xyz/",
      "who": "private",
      "what": "Your site, until you make it public"
    },
    {
      "url": "my-astro.exe.xyz:app.git",
      "who": "private",
      "what": "`git push exe main` deploys"
    },
    {
      "url": "https://my-astro.exe.xyz:4321/",
      "who": "private",
      "what": "`astro dev` with hot reload, when you or Shelley run it"
    }
  ],
  "inputs": [
    {
      "name": "REPO",
      "description": "the GitHub repository of the Astro site to deploy, as owner/name or a URL, or `new` to start a fresh Astro blog with a server-rendered guestbook"
    }
  ],
  "delivers": [
    "Node.js 26 and Caddy installed; the site answering on port 8000, from Caddy for a static build or from app.service for a build with @astrojs/node, enabled to come back after a reboot.",
    "A ~/app.git repository whose pre-receive hook builds each push to main into a new release and rejects the push if the deploy fails.",
    "Settings and secrets in ~/app.env (mode 600), read by the build and by the server.",
    "Data in ~/data, backed up nightly by app-backup.timer, with the newest backup opened and checked in a scratch directory.",
    "With REPO=new, the Astro 7 blog starter plus a /guestbook page whose Astro Action saves messages to SQLite, signed with the visitor's exe.dev name."
  ],
  "deployable": true,
  "deploy": {
    "new_vm_url": "https://exe-staging.dev/new?prompt=REPO%3D%3Cfill-this-in%3E%0A%0ASet%20up%20Astro%20on%20this%20VM%20by%20following%20the%20exe.dev%20recipe%20at%20https%3A%2F%2Fexe-staging.dev%2Fdeploy%2Fastro.md%3Fvia%3Ddeploy%20from%20top%20to%20bottom.%0A%0AThe%20values%20at%20the%20top%20of%20this%20message%20are%20mine%3A%0A-%20REPO%3A%20the%20GitHub%20repository%20of%20the%20Astro%20site%20to%20deploy%2C%20as%20owner%2Fname%20or%20a%20URL%2C%20or%20%60new%60%20to%20start%20a%20fresh%20Astro%20blog%20with%20a%20server-rendered%20guestbook%0AAsk%20me%20for%20any%20that%20still%20say%20%3Cfill-this-in%3E%20before%20you%20need%20them.%0A%0AThe%20recipe%27s%20example%20VM%20name%20is%20my-astro.%20This%20VM%27s%20name%20is%20the%20output%20of%20%60hostname%60%3A%20use%20it%20wherever%20the%20recipe%20writes%20my-astro.%20Skip%20the%20step%20that%20creates%20the%20VM%3B%20you%20are%20on%20it.%0A%0AYou%20are%20done%20when%20all%20of%20these%20are%20true.%20Check%20each%20one%20yourself%3A%0A-%20Node.js%2026%20and%20Caddy%20installed%3B%20the%20site%20answering%20on%20port%208000%2C%20from%20Caddy%20for%20a%20static%20build%20or%20from%20app.service%20for%20a%20build%20with%20%40astrojs%2Fnode%2C%20enabled%20to%20come%20back%20after%20a%20reboot.%0A-%20A%20~%2Fapp.git%20repository%20whose%20pre-receive%20hook%20builds%20each%20push%20to%20main%20into%20a%20new%20release%20and%20rejects%20the%20push%20if%20the%20deploy%20fails.%0A-%20Settings%20and%20secrets%20in%20~%2Fapp.env%20%28mode%20600%29%2C%20read%20by%20the%20build%20and%20by%20the%20server.%0A-%20Data%20in%20~%2Fdata%2C%20backed%20up%20nightly%20by%20app-backup.timer%2C%20with%20the%20newest%20backup%20opened%20and%20checked%20in%20a%20scratch%20directory.%0A-%20With%20REPO%3Dnew%2C%20the%20Astro%207%20blog%20starter%20plus%20a%20%2Fguestbook%20page%20whose%20Astro%20Action%20saves%20messages%20to%20SQLite%2C%20signed%20with%20the%20visitor%27s%20exe.dev%20name.%0A%0ARead%20the%20whole%20recipe%2C%20including%20the%20closed%20details.%20Follow%20%22Set%20up%20by%0Ahand%22%20from%20%22Install%20Node.js%20and%20Caddy%22%20to%20the%20end%20of%20it%2C%20as%20exedev%3B%20the%0Awalkthrough%20above%20it%20is%20for%20the%20owner%20afterwards.%20Do%20not%20run%20Restore%20or%0AUpdate%2C%20do%20not%20reboot%2C%20and%20do%20not%20set%20up%20%22Deploy%20from%20GitHub%22%20unless%20the%0Aowner%20asks.%20Leave%20public%20sharing%20off.%0AREPO%20picks%20one%20path%20in%20%22Get%20the%20code%22%3A%20%60new%60%20starts%20a%20fresh%20site%3B%0Aanything%20else%20is%20a%20GitHub%20repository%20%28turn%20URLs%20into%20owner%2Fname%29.%20Never%0Acommit%20to%20a%20repository%20you%20cloned%3A%20its%20settings%20go%20in%20~%2Fapp.env.%20If%20a%0Aclone%20fails%2C%20follow%20the%20private-repository%20steps%2C%20and%20if%20that%20fails%0Atoo%2C%20give%20the%20owner%20the%20integration%20command%20and%20wait%20for%20them.%0AFor%20a%20cloned%20site%2C%20read%20its%20astro.config%20and%20README%3A%20fill%20~%2Fapp.env%0Afrom%20.env.example%20if%20there%20is%20one%2C%20ask%20the%20owner%20for%20keys%20to%20outside%0Aservices%2C%20and%20never%20invent%20values.%20If%20a%20build%20fails%2C%20read%20its%20output%2C%0Afix%20what%20you%20can%20without%20editing%20the%20code%2C%20and%20redeploy%20with%0A~%2Fapp.git%2Fhooks%2Fpre-receive%20HEAD.%20If%20the%20site%20uses%20an%20adapter%20other%0Athan%20%40astrojs%2Fnode%20%28Netlify%2C%20Vercel%2C%20Cloudflare%29%2C%20tell%20the%20owner%20what%0A%22Coming%20from%20Netlify%2C%20Vercel%2C%20or%20Cloudflare%22%20says%20instead%20of%20changing%20it.%0AFinish%20with%20the%20site%27s%20URL%20%28and%20%2Fguestbook%20for%20a%20new%20site%29%2C%20whether%20it%0Adeployed%20as%20static%20or%20server%2C%20and%20the%20git%20commands%20the%20owner%20runs%20on%0Atheir%20own%20computer%2C%20from%20%22Deploy%20with%20git%20push%22.%0A%0AFinish%20with%20the%20URLs%20I%20should%20open.%0A",
    "terminal": "curl -fsSL https://exe-staging.dev/deploy/astro/prompt.txt | ssh exe.dev new --prompt=/dev/stdin",
    "prompt": "REPO=\u003cfill-this-in\u003e\n\nSet up Astro on this VM by following the exe.dev recipe at https://exe-staging.dev/deploy/astro.md?via=deploy from top to bottom.\n\nThe values at the top of this message are mine:\n- REPO: the GitHub repository of the Astro site to deploy, as owner/name or a URL, or `new` to start a fresh Astro blog with a server-rendered guestbook\nAsk me for any that still say \u003cfill-this-in\u003e before you need them.\n\nThe recipe's example VM name is my-astro. This VM's name is the output of `hostname`: use it wherever the recipe writes my-astro. Skip the step that creates the VM; you are on it.\n\nYou are done when all of these are true. Check each one yourself:\n- Node.js 26 and Caddy installed; the site answering on port 8000, from Caddy for a static build or from app.service for a build with @astrojs/node, enabled to come back after a reboot.\n- A ~/app.git repository whose pre-receive hook builds each push to main into a new release and rejects the push if the deploy fails.\n- Settings and secrets in ~/app.env (mode 600), read by the build and by the server.\n- Data in ~/data, backed up nightly by app-backup.timer, with the newest backup opened and checked in a scratch directory.\n- With REPO=new, the Astro 7 blog starter plus a /guestbook page whose Astro Action saves messages to SQLite, signed with the visitor's exe.dev name.\n\nRead the whole recipe, including the closed details. Follow \"Set up by\nhand\" from \"Install Node.js and Caddy\" to the end of it, as exedev; the\nwalkthrough above it is for the owner afterwards. Do not run Restore or\nUpdate, do not reboot, and do not set up \"Deploy from GitHub\" unless the\nowner asks. Leave public sharing off.\nREPO picks one path in \"Get the code\": `new` starts a fresh site;\nanything else is a GitHub repository (turn URLs into owner/name). Never\ncommit to a repository you cloned: its settings go in ~/app.env. If a\nclone fails, follow the private-repository steps, and if that fails\ntoo, give the owner the integration command and wait for them.\nFor a cloned site, read its astro.config and README: fill ~/app.env\nfrom .env.example if there is one, ask the owner for keys to outside\nservices, and never invent values. If a build fails, read its output,\nfix what you can without editing the code, and redeploy with\n~/app.git/hooks/pre-receive HEAD. If the site uses an adapter other\nthan @astrojs/node (Netlify, Vercel, Cloudflare), tell the owner what\n\"Coming from Netlify, Vercel, or Cloudflare\" says instead of changing it.\nFinish with the site's URL (and /guestbook for a new site), whether it\ndeployed as static or server, and the git commands the owner runs on\ntheir own computer, from \"Deploy with git push\".\n\nFinish with the URLs I should open.\n",
    "prompt_url": "https://exe-staging.dev/deploy/astro/prompt.txt"
  },
  "updated": "2026-11-18",
  "verified": "2026-11-18",
  "related": [
    "nextjs",
    "nodejs",
    "sqlite",
    "dev-test-prod",
    "umami",
    "migrate-lovable"
  ],
  "alternatives": [
    "Netlify",
    "Vercel",
    "Cloudflare Pages"
  ]
}
