[{"data":1,"prerenderedAt":141},["ShallowReactive",2],{"seo-verification":3,"blog-deploying-a-sveltekit-application-on-a-vps-ma-en":6,"promo-bar-likely":140},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"key":7,"data":8},"blog-deploying-a-sveltekit-application-on-a-vps-ma-en",{"id":9,"slug":10,"slugs":11,"title":15,"excerpt":16,"readTime":17,"views":18,"isPinned":19,"noindex":19,"publishedAt":20,"updatedAt":21,"category":22,"categories":28,"featuredImage":30,"bgImage":31,"posterImage":32,"relatedSolution":33,"intro":36,"sections":37,"ctaTitle":83,"ctaBody":84,"ctaButton":85,"ctaUrl":86,"relatedPosts":87},53,"deploying-a-sveltekit-application-on-a-vps",{"fr":12,"en":10,"ar":13,"es":14},"deployer-sveltekit-vps","نشر-تطبيق-sveltekit-على-خادم-vps","desplegar-aplicacion-sveltekit-en-un-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.",3,1,false,"2026-04-28T00:00:00+00:00","2026-11-04T16:30:25+00:00",{"id":23,"name":24,"slug":25,"color":26,"icon":27},4,"Development","developpement","bg-warning\u002F10 text-warning","dev",[29],{"id":23,"name":24,"slug":25,"color":26,"icon":27},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fdeployer-sveltekit-vps-poster.svg",{"categorySlug":34,"appSlug":35},"development","sveltekit-stack","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.",[38,42,52,55,77,80],{"type":39,"title":40,"body":41},"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":43,"title":44,"items":45},"ul","Concrete benefits",[46,47,48,49,50,51],"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":39,"title":53,"body":54},"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":56,"title":57,"steps":58},"steps","Step-by-step deployment",[59,62,65,68,71,74],{"title":60,"body":61},"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":63,"body":64},"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":66,"body":67},"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":69,"body":70},"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":72,"body":73},"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":75,"body":76},"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":78,"body":79},"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.",{"type":39,"title":81,"body":82},"Deploy SvelteKit in One Click from the Marketplace","The ServOrbit Marketplace offers a **SvelteKit Stack** template that automatically sets up Node.js LTS, PM2, and Nginx on your Ubuntu 24.04 VPS in minutes. Pick a VPS, select the template, and get a production-ready environment for your SvelteKit project — no system command line needed. Provisioning installs the complete toolchain; all that remains is transferring your build and configuring Nginx for your domain.","Your SvelteKit Environment Ready in Minutes","The SvelteKit Stack template automatically configures Node.js LTS, PM2, and Nginx — ready to host your SvelteKit application in SSR or static mode.","Deploy My SvelteKit Stack","\u002Fapplications\u002Fdevelopment\u002Fsveltekit-stack",[88,105,123],{"id":89,"slug":90,"slugs":91,"title":95,"excerpt":96,"readTime":23,"views":18,"isPinned":19,"noindex":19,"publishedAt":97,"updatedAt":98,"category":99,"categories":100,"featuredImage":30,"bgImage":31,"posterImage":102,"relatedSolution":103},5,"deploying-laravel-on-a-vps-a-production-guide",{"fr":92,"en":90,"ar":93,"es":94},"deployer-laravel-vps","نشر-laravel-على-خادم-vps-دليل-الإنتاج","desplegar-laravel-en-un-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.","2026-02-09T00:00:00+00:00","2026-09-07T11:26:10+00:00",{"id":23,"name":24,"slug":25,"color":26,"icon":27},[101],{"id":23,"name":24,"slug":25,"color":26,"icon":27},"\u002Fblog\u002Fcovers\u002Fdeployer-laravel-vps-poster.svg",{"categorySlug":27,"appSlug":104},"laravel-stack",{"id":106,"slug":107,"slugs":108,"title":112,"excerpt":113,"readTime":114,"views":18,"isPinned":19,"noindex":19,"publishedAt":115,"updatedAt":116,"category":117,"categories":118,"featuredImage":30,"bgImage":31,"posterImage":120,"relatedSolution":121},43,"deploy-a-nodejs-application-on-a-vps",{"fr":109,"en":107,"ar":110,"es":111},"deployer-nodejs-vps","نشر-تطبيق-nodejs-على-vps","desplegar-una-aplicacion-nodejs-en-un-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,"2026-05-08T00:00:00+00:00","2026-11-08T01:13:12+00:00",{"id":23,"name":24,"slug":25,"color":26,"icon":27},[119],{"id":23,"name":24,"slug":25,"color":26,"icon":27},"\u002Fblog\u002Fcovers\u002Fdeployer-nodejs-vps-poster.svg",{"categorySlug":34,"appSlug":122},"nodejs-stack",{"id":124,"slug":125,"slugs":126,"title":130,"excerpt":131,"readTime":17,"views":132,"isPinned":19,"noindex":19,"publishedAt":133,"updatedAt":21,"category":134,"categories":135,"featuredImage":30,"bgImage":31,"posterImage":137,"relatedSolution":138},44,"deploy-a-django-application-on-a-vps",{"fr":127,"en":125,"ar":128,"es":129},"deployer-django-vps","نشر-تطبيق-django-على-vps","desplegar-una-aplicacion-django-en-un-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.",7,"2026-05-07T00:00:00+00:00",{"id":23,"name":24,"slug":25,"color":26,"icon":27},[136],{"id":23,"name":24,"slug":25,"color":26,"icon":27},"\u002Fblog\u002Fcovers\u002Fdeployer-django-vps-poster.svg",{"categorySlug":34,"appSlug":139},"django",true,1794270389572]