For SvelteKit
SvelteKit, served from a real VM
Free to sign up. No egress fees on any product.
Why SvelteKit on Edge
Tiny apps, real CPU, predictable bills
adapter-node, nothing else
Build with adapter-node and run node build on any Edge VM. Plain Linux, a small memory footprint and no platform-specific step.Real CPU, no cold starts
One long-running Node process on a real VM. Load functions answer in the same time on the first request as on the millionth.Images at build time or on request
Keep enhanced:img for bundled assets. Send uploads and CMS images through the CDN for resizing and AVIF/WebP on the fly.S3-compatible storage
Any AWS SDK client pushes uploads and serves downloads through Edge Storage. The same code runs in dev and production.Global CDN, zero egress
_app/immutable assets cache in 988 locations. Your VM only sees the requests that actually need it.Push from your CI
GitHub Actions, GitLab CI or a single rsync. The Edge CLI scripts everything else, end to end.
Reference architecture
How SvelteKit maps to Edge
Browsers
app.acme.dev via Edge DNS
app.acme.dev
caches _app/immutable and static/
?width=480&format=auto
uploads, transformed at the edge
node build :3000
adapter-node · systemd · Nginx
acme-files
uploads and downloads
- Compute
Runs node build, the adapter-node output, as a systemd service.
- Storage
Holds uploads, downloads and overflow assets. Any S3 client works.
- CDN
Caches _app/, static/ and prerendered pages in every location.
- Image optimisation
Resize, crop and AVIF/WebP from the URL, for images the build never sees.
- DNS
Anycast DNS for production, staging and preview subdomains.
- Shield
Scores form actions server-side with one call. No CAPTCHA widget.
- Assist
One script tag in app.html adds answers grounded in your content.
Deploy
From npm run build to live in four steps
- 01
Switch to adapter-node
Install @sveltejs/adapter-node as a dev dependency and swap it in. npm run build now writes a standalone Node app to build/.
svelte.config.jsimport adapter from '@sveltejs/adapter-node' /** @type {import('@sveltejs/kit').Config} */ export default { kit: { adapter: adapter() }, } - 02
Create a VM and copy the build
The nodejs library script installs Node 22 and an Nginx reverse proxy on first boot. Install production dependencies on the VM.
shell$ edge compute create --name svelte --size s-2vcpu-4gb \ --image ubuntu-24 --region london --script nodejs $ npm run build $ rsync -a build package.json package-lock.json root@<vm-ip>:/srv/app/ $ ssh root@<vm-ip> "cd /srv/app && npm ci --omit=dev" - 03
Run it as a service
systemd keeps the process up and restarts it on failure. Set ORIGIN so form actions pass SvelteKit's CSRF check behind the proxy.
/etc/systemd/system/svelte.service[Unit] Description=SvelteKit app After=network.target [Service] WorkingDirectory=/srv/app ExecStart=/usr/bin/node build Environment=PORT=3000 NODE_ENV=production Environment=ORIGIN=https://app.acme.dev Restart=always [Install] WantedBy=multi-user.target - 04
Front it with the CDN
SSL is issued automatically. Hashed _app/immutable files are cached for as long as their headers allow.
shell$ edge cdn create --name acme-app $ edge cdn domains add cdn-5d1f08 \ --domain app.acme.dev \ --origin https://<vm-ip> \ --jit-image
Prefer to hand it off? Give the job to your AI agent or have our engineers do it.
What it costs
A small app deserves a small bill
- No per-invocation or per-GB-second pricing
- Image transforms included with the CDN
- Billed hourly from a prepaid balance, with optional hard caps
- adapter-node output runs anywhere Node does
Estimated monthly bill on Edge
~300k page views · 2.5M requests · 15 GB of uploads
- Compute$19.24Standard VM · 2 vCPU · 4 GiB · 80 GB NVMe
- CDN$0.502.5M requests: first 500k free, 2M × $0.25 per million
- Storage$0.1515 GB: first 5 GB free, 10 GB × $0.015
- DNS$0.00Production, staging and preview records
- Egress$0.00
FAQ
SvelteKit on Edge, answered
Which adapter should I use?
Do form actions and server-only modules work?
What happens to prerendered pages?
How do I run it as a service?
Can I get a preview per pull request?
Drop-in services
Add these without touching the stack
- Edge ShieldBot protection
POST /siteverify → score: 94Check the humanity score inside a form action before you accept the submission. Nothing ships to the client.
Free for most sites. No puzzles, no widget to style.Explore - Edge AssistAI answers
<script src="…/assist.js">One line in app.html and every route gets an answer box grounded in your site's content.
Free tier: 250 answered questions a monthExplore
Ship SvelteKit on Edge
Bring your repo. adapter-node, one VM and one CDN deployment, live in minutes.
Free tiers hard-cap. Nothing bills until you add a card.