EN
Log in Create an account

How to deploy SvelteKit on Saplo (lightweight app with SSR)

SvelteKit compiles components to pure JavaScript during the build, so the finished application is extremely lightweight and starts quickly, even on older phones. With the Node adapter, it works as SSR - a long-running process that you can launch on Saplo as a managed service, with deployment straight from a Git repository.

Grzegorz Kalmus ·

SvelteKit differs from React and Vue at the compiler level. Components are transformed into pure JavaScript at build time, without a virtual DOM loaded into the browser. The result is a smaller bundle and faster startup, especially noticeable on slower phones and connections. With the Node adapter, SvelteKit works as SSR, a long-running process analogous to Next.js or Nuxt, not just a directory with static files. On Saplo, you run SvelteKit as a managed service with automatic restart.

Who is SvelteKit on Saplo for?

Before you start the installation, check if it's the right choice for your project:

  • An application where bundle size matters - less JavaScript to download and parse than in a comparable React or Vue application.
  • A website with real interaction, not just content - SvelteKit works well for both simple sites and complex applications.
  • A project targeting slower connections and phones - a smaller bundle reduces time to interactivity.
  • You want deployments with git push instead of manual Node process configuration - you connect the repository once, and Saplo automatically builds and restarts the service.

Do you only need a lightweight SPA without SSR? Check the App catalog for a separate Svelte stack (Vite, without a background process) - this is a different variant than the SvelteKit described in this guide.

Requirements

To set up SvelteKit on Saplo, you need:

  • A Box plan L or higher - the Node adapter keeps the process constantly in memory, and SSR requires more RAM than a regular static site,
  • A minimum of 512 MB of free RAM and 3 GB of disk space for the application process itself,
  • A domain or subdomain, *.saploapp.pl included with every plan,
  • A Git repository if you want to use automatic deployment (optional at the start, you can also upload the application as an archive .zip via the panel).

Step-by-step installation

  1. In your Saplo panel, go to App catalog and select SvelteKit (under "Applications").
  2. Select a Box plan L or higher and the application name - a default subdomain will be created from it.
  3. Choose the Node.js version for the build (18, 20, or 22, default 20) and confirm the installation.
  4. The engine scaffolds a minimal SvelteKit project, installs and replaces the default adapter-auto with @sveltejs/adapter-node in svelte.config.js, builds the project into the build/ directory, and runs it via supervisor on port 3000, with Nginx proxying traffic from the domain to this port.
  5. After the installation is complete, the domain from step 2 will show the SvelteKit start page - from this moment on, you can deploy your own code to it.

Deploying your own code via Git

  1. In the application details, find the Git / CI-CD section and click "Connect GitHub", confirm the installation of the "Saplo Deploy" application, and specify the repository with your SvelteKit project.
  2. Make sure your project has @sveltejs/adapter-node installed in svelte.config.js - without it, the build will generate a version for a different environment, not for a long-running Node process.
  3. Place the saplo.yaml file in the root directory of your repository and push it to the production branch (by default main).
  4. Every subsequent git push to this branch triggers a build and service restart. You can see the status in the Deployments tab.
  5. The build creates the build/ directory with a Node server, which Saplo runs as a managed service.

Example of a minimal saplo.yaml file for SvelteKit:

name: my-project
stack: sveltekit
runtime:
  node: "22"
build:
  install: npm ci
  command: npm run build
start:
  command: node build
  port: 3000

SvelteKit on Saplo vs. alternatives

Vercel for SvelteKit Custom VPS SvelteKit on Saplo
Pricing model function and transfer usage, scales with traffic fixed server cost, manual configuration fixed Box cost
Git deployments yes, native self-managed (CI/CD) yes, git push to production branch
SSR process startup fully managed pm2 or systemd manually managed service with auto-restart
Adapter requires platform-specific adapter manually configured adapter-node automatically replaced during installation

FAQ

What's the difference between SvelteKit and a regular Svelte stack in the catalog? SvelteKit with a Node adapter is SSR - a long-running process. The Svelte stack is a pure SPA built by Vite, with no background process, lighter to maintain, but without server-side rendering.

Do I have to manually replace the adapter with Node in my own project? If your project has the default adapter-auto, replace it with @sveltejs/adapter-node before the first deployment via Git - otherwise, the build will generate a version for a different environment.

How much RAM does SvelteKit need in practice? Our recipe manifest specifies a minimum of 512 MB, but for real production traffic, it's better to plan for a Box L so the SSR process has a buffer for load spikes.

What happens if the build fails? The previous working version of the application remains in place; Saplo does not replace it with a broken one.

Do I get SSL and my own domain? Yes, the SSL certificate is automatic, and a domain or subdomain *.saploapp.pl is included in the price of every plan.

You can set up SvelteKit on Saplo from scratch to a working domain in minutes, and every subsequent git push restarts the service with a new version without your intervention. If the project doesn't need SSR, check out the lighter Svelte stack in the same catalog.

  • #Git Deploy
  • #JavaScript
  • #Guide
  • #Svelte
  • #SvelteKit