Node
The Node adapter is the fallback for any host Velocity doesn’t recognize, including Docker and a VPS. It runs a standalone server that serves prerendered pages and handles Astro Actions.
Build and Run
Section titled “Build and Run”pnpm buildHOST=0.0.0.0 PORT=4321 node dist/server/entry.mjsThe server doesn’t load .env by itself. To use it for runtime variables such as CONTACT_FORM_ENDPOINT, pass it to Node, or set the variables in the server’s environment:
node --env-file=.env dist/server/entry.mjsWithout the form endpoints, the server discards submissions and logs a warning. See Forms & Actions.
Force the target if your build environment sets VERCEL, NETLIFY or similar:
DEPLOY_TARGET=node pnpm buildDocker
Section titled “Docker”FROM node:24-slim AS buildWORKDIR /appRUN corepack enableCOPY . .RUN pnpm install --frozen-lockfileRUN DEPLOY_TARGET=node pnpm build
FROM node:24-slimWORKDIR /appCOPY --from=build /app/dist ./distCOPY --from=build /app/node_modules ./node_modulesENV HOST=0.0.0.0 PORT=4321EXPOSE 4321CMD ["node", "dist/server/entry.mjs"]Static-Only Hosting
Section titled “Static-Only Hosting”Actions need a server, so a pure static host can serve your pages but not your forms. To use one, deploy dist/client/ and point the forms at an external endpoint with the action prop.
Caching and Headers
Section titled “Caching and Headers”Route caching uses an in-memory cache, which resets on restart and isn’t shared between instances. Velocity’s security headers ship in vercel.json and netlify.toml, so set them in your reverse proxy here.