Skip to content
betterstack-alchemyUnofficial

Websites

Alchemy deploys frontends to Better Stack Cloud with a family of Cloud.Website composites. Each one builds your project and runs it as a systemd Service on a Server: Node on port 3000, with no Dockerfile, no unit file and no adapter in your framework’s config. Your own astro.config.*, vite.config.ts or nuxt.config.ts loads natively. They are the same composites as Hetzner.Website.*, with the same shared props, minus Hetzner’s DNS zone.

Use the composite named after your framework:

alchemy.run.ts
const site = yield* BetterStack.Cloud.Website.Astro("Web", {
rootDir: "./app",
});

The live url is http://<server ipv4>:3000. The composite returns { url, server, service }; server and service are undefined under alchemy dev, where the framework’s own dev server runs instead. Builds are memoized by hashing their inputs, so an unchanged project skips the build.

Framework Composite
Astro (server-rendered or static) Website.Astro
Next.js (next build, then next({ dev: false }); not OpenNext) Website.Nextjs
vinext Website.Vinext
Nuxt (nitro’s Node server) Website.Nuxt
React Router v7, framework mode Website.ReactRouter
SolidStart Website.SolidStart
SvelteKit Website.SvelteKit
TanStack Start (React or Solid) Website.TanStackStart
Waku Website.Waku
OctaneJS Website.Octane
Foldkit Website.Foldkit
Vocs Website.Vocs
Client-only Vite apps (React, Vue, Solid SPAs) Website.Vite
Hugo, Zola, Eleventy, any build command Website.StaticSite

The framework composites build through @alchemy.run/frontend-frameworks and its per-framework Node deploy target, which must be installed in your project; each reference page names what else it needs:

Terminal window
bun add -d @alchemy.run/frontend-frameworks

Astro can prerender every page and deploy assets only:

alchemy.run.ts
yield* BetterStack.Cloud.Website.Astro("Docs", {
rootDir: "./docs",
astro: { output: "static" },
});

A client-only Vite app is all static assets:

alchemy.run.ts
yield* BetterStack.Cloud.Website.Vite("Spa", { rootDir: "./spa" });

StaticSite runs a command and serves its output directory with a small generated Node server that answers GET /health:

alchemy.run.ts
yield* BetterStack.Cloud.Website.StaticSite("Blog", {
command: "hugo --minify",
outdir: "public",
});

outdir is build output: destroying the site deletes it, so never point it at your sources. spa: true answers misses with the index page, and errorPage serves a page with a real 404:

alchemy.run.ts
yield* BetterStack.Cloud.Website.StaticSite("App", {
command: "npm run build",
outdir: "dist",
spa: true,
});

Pass server to run the site on a server you declare, and firewall when that server has one; the composite then adds an inbound rule for port 3000:

alchemy.run.ts
const wall = yield* BetterStack.Cloud.Firewall("Wall", {
rules: [
{ direction: "inbound", protocol: "tcp", portFrom: 22, ipAddresses: ["0.0.0.0/0", "::/0"] },
{ direction: "outbound", protocol: "any", portFrom: 0, ipAddresses: ["0.0.0.0/0", "::/0"] },
],
});
const box = yield* BetterStack.Cloud.Server("Box", {
serverType: "AM1",
image: "ubuntu-26-04",
firewallIds: [wall.id],
});
const shop = yield* BetterStack.Cloud.Website.SvelteKit("Shop", {
rootDir: "./shop",
server: box,
firewall: wall,
});

A server can run several Services, but every website listens on port 3000, so one website fits per server.

env is the process environment for the hosted unit and for the local dev server. It accepts Outputs of other resources and Redacted secrets, written in clear text only to the unit’s root-only env file:

alchemy.run.ts
yield* BetterStack.Cloud.Website.Vite("Dashboard", {
rootDir: "./dashboard",
env: { VITE_API_URL: "https://api.example.com" },
});

Client inlining is whatever the framework already does, like VITE_* for Vite.

Better Stack has no DNS, so domain takes another provider’s DNS adapter and the site’s url becomes http://<domain>:3000. The site speaks plain HTTP; for HTTPS, put a load balancer with a managed certificate in front. See DNS.

There is no CDN: the object cache fronts buckets for S3 clients, not websites, so the unit serves its own assets.

StaticSite was verified live once, on 2026-12-01, served from a shared server; the other framework composites are tested against the offline mock only (Astro’s SSR build was also built and run locally). See Live verification.

  • Services: what runs the site on the server.
  • Watching your services: an uptime monitor on the site’s /health.
  • examples/cloud-website-static and examples/cloud-website-astro in the repository: runnable stacks.