[{"data":1,"prerenderedAt":117},["ShallowReactive",2],{"seo-verification":3,"blog-deployer-sveltekit-vps-en":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"id":7,"slug":8,"title":9,"excerpt":10,"readTime":11,"views":12,"isPinned":13,"publishedAt":14,"category":15,"categories":21,"featuredImage":23,"bgImage":24,"posterImage":25,"relatedSolution":26,"intro":28,"sections":29,"ctaTitle":72,"ctaBody":73,"ctaButton":74,"ctaUrl":75,"relatedPosts":76},53,"deployer-sveltekit-vps","Deploying a SvelteKit application on a VPS","Deploy a SvelteKit app on a Cloud VPS with the Node adapter, Docker, PM2, reverse proxy and SSL. A tutorial for front-end developers.",7,361,false,"2026-04-28T00:00:00+00:00",{"id":16,"name":17,"slug":18,"color":19,"icon":20},4,"Development","developpement","bg-warning\u002F10 text-warning","dev",[22],{"id":16,"name":17,"slug":18,"color":19,"icon":20},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fdeployer-sveltekit-vps-poster.svg",{"categorySlug":18,"appSlug":27},"sveltekit","SvelteKit produces high-performance full-stack applications, but most tutorials assume a serverless deployment. On a VPS, the Node adapter gives you a real long-running server, with no cold start or execution limit. Here is how to deploy it cleanly with Docker and a reverse proxy.",[30,34,44,47,69],{"type":31,"title":32,"body":33},"h2","Why self-host SvelteKit on a VPS","SvelteKit adapts to many targets via its adapters (Vercel, Netlify, Cloudflare…), but the official `@sveltejs\u002Fadapter-node` adapter produces a standalone Node server, perfect for a VPS. Instead of splitting your application into serverless functions subject to cold starts and execution-time limits, you get a persistent process that keeps its database connections open and responds without startup latency. Form actions, server-side `load` functions and `+server.ts` endpoints run in a single runtime that you control. On a VPS, you also avoid per-invocation billing, common on front-end platforms, which becomes unpredictable as soon as traffic rises.",{"type":35,"title":36,"items":37},"ul","Concrete benefits",[38,39,40,41,42,43],"Persistent Node server via adapter-node: no cold start on server routes","Database connections kept open in a pool, without reconnecting on each request","No per-invocation billing: stable cost even with high and irregular traffic","Form actions and `+server.ts` endpoints executed without an imposed duration limit","WebSockets and SSE possible, where serverless forbids or complicates them","Environment variables and secrets managed directly, without a third-party platform dashboard",{"type":31,"title":45,"body":46},"Hardware and software prerequisites","A SvelteKit application in Node mode consumes moderately: a VPS with 1 vCPU and 2 GB of RAM suits a medium-traffic site; scale up to 2 vCPU \u002F 4 GB if you co-locate a PostgreSQL database and have heavy server `load` functions. Install Node.js 20 LTS, and either Docker or PM2 to manage the process as a daemon. Nginx will serve as a reverse proxy. Point your domain at the VPS IP. The build (`build\u002F` generated by adapter-node) stays light; 5 to 10 GB of disk is enough with the `node_modules`.",{"type":48,"title":49,"steps":50},"steps","Step-by-step deployment",[51,54,57,60,63,66],{"title":52,"body":53},"Install and configure the Node adapter","Add `@sveltejs\u002Fadapter-node` and declare it in `svelte.config.js` (`adapter: adapter()`). It is what transforms your app into a standalone Node server rather than a serverless bundle.",{"title":55,"body":56},"Build the application","Run `npm run build`. SvelteKit generates a `build\u002F` folder containing `index.js`, the server's entry point. You test it locally with `node build`; it listens by default on port 3000.",{"title":58,"body":59},"Containerize or daemonize the process","With Docker: a `node:20-alpine` Dockerfile that copies `build\u002F` and `package.json`, installs the production dependencies (`npm ci --omit=dev`) and runs `node build`. Without Docker: use PM2 with `pm2 start build\u002Findex.js --name svelte-app` for automatic restart.",{"title":61,"body":62},"Inject the runtime configuration","Pass `PORT`, `ORIGIN` (indispensable for SvelteKit to validate form actions) and your secrets via the environment: `ORIGIN=https:\u002F\u002Fmydomain.com`. Without a correct `ORIGIN`, form actions will fail in production with a CSRF error.",{"title":64,"body":65},"Configure Nginx as a front end","Create a vhost with `proxy_pass http:\u002F\u002F127.0.0.1:3000;` and the `proxy_set_header Host` and `X-Forwarded-Proto $scheme` headers. Enable `proxy_http_version 1.1` and the `Upgrade` headers if you use WebSockets.",{"title":67,"body":68},"Secure with Let's Encrypt","Run `certbot --nginx -d mydomain.com`. Once the certificate is installed, check that `ORIGIN` matches the final HTTPS URL, otherwise form submissions will be rejected.",{"type":70,"body":71},"tip","Cache the output of static routes with the `Cache-Control` header in your `load` functions, and enable precompression: adapter-node automatically serves `.gz` and `.br` files if they exist. Build with precompression by setting `precompress: true` in the adapter options. On the process management side, prefer PM2's cluster mode (`pm2 start build\u002Findex.js -i max`) to make use of all the VPS cores under a high CPU load.","Deploy your SvelteKit app without cold starts","The ServOrbit Cloud VPS gives you a persistent Node environment with dedicated resources: ideal for running adapter-node continuously and serving your SvelteKit routes without startup latency.","Discover the Cloud VPS","\u002Fvps-cloud",[77,90,104],{"id":78,"slug":79,"title":80,"excerpt":81,"readTime":11,"views":82,"isPinned":13,"publishedAt":83,"category":84,"categories":85,"featuredImage":23,"bgImage":24,"posterImage":87,"relatedSolution":88},5,"deployer-laravel-vps","Deploying Laravel on a VPS: a production guide","Take Laravel to production on a VPS: PHP, workers, cache, database, reverse proxy and HTTPS configured cleanly.",2840,"2026-02-09T00:00:00+00:00",{"id":16,"name":17,"slug":18,"color":19,"icon":20},[86],{"id":16,"name":17,"slug":18,"color":19,"icon":20},"\u002Fblog\u002Fcovers\u002Fdeployer-laravel-vps-poster.svg",{"categorySlug":20,"appSlug":89},"laravel-stack",{"id":91,"slug":92,"title":93,"excerpt":94,"readTime":95,"views":96,"isPinned":13,"publishedAt":97,"category":98,"categories":99,"featuredImage":23,"bgImage":24,"posterImage":101,"relatedSolution":102},43,"deployer-nodejs-vps","Deploy a Node.js Application on a VPS","Deploy a Node.js application to production on a VPS: PM2, Nginx reverse proxy, Let's Encrypt SSL, and automatic startup at boot.",8,591,"2026-05-08T00:00:00+00:00",{"id":16,"name":17,"slug":18,"color":19,"icon":20},[100],{"id":16,"name":17,"slug":18,"color":19,"icon":20},"\u002Fblog\u002Fcovers\u002Fdeployer-nodejs-vps-poster.svg",{"categorySlug":18,"appSlug":103},"nodejs",{"id":105,"slug":106,"title":107,"excerpt":108,"readTime":95,"views":109,"isPinned":13,"publishedAt":110,"category":111,"categories":112,"featuredImage":23,"bgImage":24,"posterImage":114,"relatedSolution":115},44,"deployer-django-vps","Deploy a Django Application on a VPS","Deploy Django on a VPS: Gunicorn, Nginx, PostgreSQL, Docker, and SSL. A complete guide for Python developers who want to self-host.",628,"2026-05-07T00:00:00+00:00",{"id":16,"name":17,"slug":18,"color":19,"icon":20},[113],{"id":16,"name":17,"slug":18,"color":19,"icon":20},"\u002Fblog\u002Fcovers\u002Fdeployer-django-vps-poster.svg",{"categorySlug":18,"appSlug":116},"django",1785628432289]