Deploy by framework

SvelteKit

Deploy SvelteKit with adapter-node or adapter-static.

Nitroship manages SvelteKit’s Node output or publishes its static output. Choose an explicit adapter before deploying.

Detection and build output

  • Detection: @sveltejs/kit in package.json; keep the usual vite build script.
  • @sveltejs/adapter-node: starts node build/index.js, includes production dependencies, and publishes build/client to the CDN. Runtime packages must be in dependencies, not only devDependencies.
  • @sveltejs/adapter-static: publishes build without compute. Prerender your routes and configure a fallback in SvelteKit if your app needs one.
  • adapter-auto and other adapters do not satisfy the managed contract. Install and configure adapter-node or adapter-static; Nitroship does not silently pick one.

Deploy

Install the CLI

curl -fsSL https://nitroship.co/install.sh | bash
ntro login

Already installed? Skip ahead. Full options, PATH setup, and updates: Install the CLI.

nitroship.json
{
  "build": {"framework": "sveltekit"},
  "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-sveltekit-app
ntro deploy . --prod

After 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

vite.config.ts (SvelteKit 3)
import adapter from "@sveltejs/adapter-node";
import { sveltekit } from "@sveltejs/kit/vite";
import { defineConfig } from "vite";

export default defineConfig({
  plugins: [sveltekit({ adapter: adapter() })],
});

Keep your existing plugins and other configuration. Older SvelteKit projects configure kit.adapter in svelte.config.js; that layout is supported too. For static output, use adapter-static and prerender the routes you need, for example export const prerender = true in src/routes/+layout.ts.

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.

On this page