Astro
Deploy static Astro sites or standalone Node SSR with a managed preset.
Nitroship supports Astro’s static output and the standalone Node adapter.
Detection and build output
- Detection:
astroinpackage.json; use abuildscript such asastro build. - With
@astrojs/node, configurenode({ mode: "standalone" })inastro.config.mjs. The server starts withnode dist/server/entry.mjs, whiledist/clientis served from the CDN. - The Node server bundle includes production dependencies. Put packages imported at runtime in
dependencies, not onlydevDependencies. - Without an adapter, Astro’s static
distis published with no compute region. Other adapters are not managed by this preset.
Deploy
Install the CLI
curl -fsSL https://nitroship.co/install.sh | bash
ntro loginAlready installed? Skip ahead. Full options, PATH setup, and updates: Install the CLI.
{
"build": {"framework": "astro"},
"compute": {"regions": ["kr-icn"]}
}Setting build.framework skips detection and uses this preset, even if your project root has a Dockerfile. It can't be combined with build.dockerfile. Without it, Nitroship detects the build as described in How Nitroship chooses a build.
ntro apps create my-astro-app
ntro deploy . --prodAfter installing dependencies, you can also build locally with ntro deploy . --prod --local. After deployment, open static assets and a server route at the URL printed by the CLI.
Node adapter example
import { defineConfig } from "astro/config";
import node from "@astrojs/node";
export default defineConfig({
output: "server",
adapter: node({ mode: "standalone" }),
});For /_image transformation on a static site, add {"images":{"protocol":"astro"}} to nitroship.json. Remote images require an allowlist; see Image optimization.
Limits and custom setups
Server deployments need a compute region. Your server must listen on 0.0.0.0:$PORT (default 3000). Client assets come from the CDN, and a single Node server handles all SSR and API requests; routes aren't split into separate functions the way Next.js routes are.
Nitroship does not automatically run migrations, queue workers, or schedulers. Run migrations in CI or locally; see Scheduled jobs for periodic work. Store uploads in S3 or other object storage, and configure secrets through Environment variables.
For adapters or output layouts outside this contract, use your own Dockerfile. Remove build.framework and define installation, build, and startup in the Dockerfile.