Angular
Deploy Angular browser builds, prerendered pages, or Node SSR.
Nitroship supports Angular’s application builder and separates browser assets from Node SSR output.
Detection and build output
- Detection:
@angular/coreplus@angular/buildor@angular-devkit/build-angularinpackage.json, withangular.json. Keep anng buildscript. - The project comes from
ng build <project>,defaultProject, or the single application inangular.json. For multiple applications, name the project in your build script. - The default base directory is
dist/<project>; configuredoutputPathis honored. With@angular/ssr, the server bundle starts atserver/server.mjsrelative to that base (node dist/<project>/server/server.mjsin the source layout), and thebrowserdirectory is served from the CDN. - Without SSR,
dist/<project>/browseris a static SPA with an automatic/index.htmlfallback. WithoutputMode: "static", the same browser directory is published as generated pages without a SPA fallback. Neither static mode needs a compute region.
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": "angular"},
"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-angular-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.
SSR host allowlist
Recent Angular SSR servers validate the request hostname. Nitroship supplies NG_ALLOWED_HOSTS=* when you have not set it; the edge already validates the app’s domain binding. If you explicitly set NG_ALLOWED_HOSTS, your comma-separated allowlist is preserved. Include every deployment/custom hostname you want to serve. See Environment variables.
After deploying, open a rendered route and a file under the browser assets. For a static SPA, open a nested route directly to check the automatic fallback.
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.