Deploy / SvelteKit

Deploy SvelteKit to Your Own Server

To deploy SvelteKit to your own server, install Temps on a Linux VPS, build with @sveltejs/adapter-node and run up --preset nixpacks-node from the project root. Temps runs your build and starts the Node server behind automatic HTTPS. Without that preset, SvelteKit is detected as a static Vite site and deploys without its server.

Last updated

Preset required

Choose the Autopack (Node.js) preset (nixpacks-node). SvelteKit projects have a vite.config.*, so Temps detects them as the static Vite preset, which only serves files and can't run the SvelteKit server.

How to deploy SvelteKit with Temps

Commands run on your machine unless they say otherwise. The CLI runs with bunx or npx.

  1. 1

    Install Temps on a Linux server

    On a VPS with at least 2 CPU cores and 4 GB of RAM, download the installer, read it, then run it. It installs Docker if needed, the Temps binary and its database, and asks how the console is reached: an sslip.io address or your own domain.

    curl -fsSL https://temps.sh/deploy.sh -o deploy.sh
    less deploy.sh
    bash deploy.sh
  2. 2

    Log in from your machine

    Point the CLI at your Temps console. It opens a browser to approve the login.

    bunx @temps-sdk/cli login https://console.example.com
  3. 3

    Switch to the Node adapter

    Install @sveltejs/adapter-node as a dev dependency and use it in svelte.config.js.

    svelte.config.js
    import adapter from "@sveltejs/adapter-node";
    
    export default {
      kit: { adapter: adapter() },
    };
  4. 4

    Set ORIGIN for form actions

    Behind a proxy, adapter-node needs to know the public URL, or form actions fail with "Cross-site POST form submissions are forbidden".

    bunx @temps-sdk/cli environments vars set ORIGIN "https://app.example.com" -e production
  5. 5

    Deploy SvelteKit

    From the project root, run up with the preset, or set it under Project → Settings → Build & deploy → Build → Framework. If the directory isn't linked to a project yet, up walks you through creating one first. For a project created from a Git repository, pushes to the tracked branch deploy automatically.

    bunx @temps-sdk/cli up --preset nixpacks-node

How Temps builds and runs SvelteKit

Every app runs in a Docker container on your server, behind the Temps proxy. Before traffic switches to a new deployment, Temps health-checks it; if the check fails, the deployment is marked failed and the current version keeps serving.

Adapter@sveltejs/adapter-node
BuildYour build script (for example npm run build)
StartYour start script, or node build/index.js if there isn't one; a Procfile web: line wins
PortTemps injects PORT, which the Node adapter reads

What works with SvelteKit on Temps

  • SSR, API endpoints and form actions via adapter-node
  • Prerendered pages served by the Node server
  • Start falls back to node build/index.js
  • Persistent Node.js process, no cold starts
  • Health check before each cutover
  • Preview environments per branch (opt-in)

Environment variables for SvelteKit

Set your own with environments vars set or in the project settings; values are encrypted at rest.

VariableWhat it does
ORIGINThe public URL, needed by adapter-node for form actions
PUBLIC_*Variables exposed to the browser
PORTSet by Temps

What it costs to self-host SvelteKit

Temps is free to self-host under MIT / Apache 2.0, with no per-seat fee and nothing metered, so hosting SvelteKit costs what the server costs. A Hetzner CX23 (2 shared vCPU, 4 GB RAM, 40 GB NVMe, 20 TB traffic) meets the minimum Temps needs and is €5.49/month excluding VAT, plus €0.50/month for an IPv4 address; Hetzner sells it in Germany and Finland only. Prices checked October 10, 2026.

TempsFree and open source (MIT / Apache 2.0)
ServerHetzner CX23: €5.49/month excluding VAT, plus €0.50/month for IPv4
What SvelteKit runsOne Node.js container running the adapter-node server.
ObservabilityWeb analytics, error tracking, session replay and uptime monitoring are included and run on the same server
Temps PremiumOptional: $399 per organisation per month for SAML SSO, SCIM, custom roles, approval gates and a tamper-evident audit log

For one to three production apps, the server guide recommends 4 vCPU and 8 GB RAM: a Hetzner CX33 is €8.49/month excluding VAT. Any Linux VPS that meets the minimum works; sizes and other providers are in Choosing a server. For what the same app costs on Vercel, see Temps vs Vercel.

SvelteKit on Temps: frequently asked questions

Why did my SvelteKit app deploy as static files with no server?

Because of its vite.config.*, SvelteKit is detected as the static Vite preset. Switch the project to Autopack (Node.js) with up --preset nixpacks-node, or under Project → Settings → Build & deploy → Build → Framework, and deploy again.

Which SvelteKit adapter should I use on Temps?

@sveltejs/adapter-node. Temps runs your app as a long-lived Node.js process, so serverless adapters such as adapter-vercel don't apply.

Why do SvelteKit form actions return 403 on Temps?

adapter-node can't infer the public URL behind a proxy. Set ORIGIN to the URL users visit, for example https://app.example.com.

Included with every Temps project

Deployments, analytics, error tracking, session replay and uptime monitoring run in the same self-hosted platform, so your SvelteKit app doesn't need separate subscriptions for them.

Automatic HTTPS

Let's Encrypt certificates for every domain, issued and renewed for you.

Preview deployments

Turn on preview environments and each branch gets its own URL on your domain.

Web analytics

First-party analytics stored on your server. Add the React provider or a script tag.

Error tracking

Sentry-compatible: any Sentry SDK can report to the SENTRY_DSN Temps injects.

Session replay

Off by default. When on, it records the DOM with every input masked.

Uptime monitoring

HTTP monitors for your apps, with alerts through your notification channels.

Related guides

Deploy another framework

Deploy SvelteKit on a server you own

Temps is free and open source to self-host (MIT / Apache 2.0). You pay only for the server.