There is a myth that you need "Enterprise Cloud" to run a production SaaS. While AWS Lightsail is great, many founders prefer the simplicity and predictable billing of providers like **DigitalOcean, Hetzner, Linode, or Vultr**. For as low as $5 to $10 a month, you can own a piece of infrastructure that is faster and more reliable than many "managed" platforms. ![The $5 Budget SaaS Stack: Deploying Nuxt, Svelte, or React on any Cheap VPS](/assets/images/infog/the-5-dollar-saas-stack-on-any-cheap-vps.webp) The beauty of this setup is that it's **framework agnostic**. Whether you are building with Nuxt, SvelteKit, or Next.js, the infrastructure logic stays exactly the same. You can even run all three on the same $5 server! This guide is the "Generic VPS Edition" of my deployment framework. It’s framework-agnostic—working perfectly for **Nuxt 3, SvelteKit, or Next.js**—and focuses on building a "Steward-class" environment on raw Ubuntu soil. ### Phase 1: The Raw Metal (Any VPS Provider) Choose your provider, spin up an instance with **Ubuntu 22.04 or 20.04 LTS**, and let's go. #### 1. Initial Access Most budget providers give you a `root` password or ask for an SSH key during setup. I always recommend using SSH keys for safety. #### 2. Local SSH Config Keep your terminal organized. Add your new server to your local `~/.ssh/config`: ```text Host my-saas HostName YOUR_SERVER_IP User root IdentityFile ~/.ssh/id_rsa ``` Now you can just type `ssh my-saas` to get in. Simple. Tactical. ### Phase 3: The Orchestrator (PM2) PM2 is what makes your $10 server feel like an enterprise cluster. It handles restarts, logging, and performance. ```bash sudo npm install pm2 -g ``` #### The Universal `ecosystem.config.js` Drop this in your app folder. It detects the framework and handles the execution: ```javascript module.exports = { apps: [ { name: 'my-saas-app', exec_mode: 'cluster', instances: 'max', // Choose your script based on your framework: script: './.output/server/index.mjs', // Nuxt 3 // script: './build/index.js', // SvelteKit // script: './node_modules/next/bin/next', // Next.js (args: 'start -p 3001') env: { NODE_ENV: 'production', PORT: 3001 } } ] } ``` ### Phase 5: CI/CD with GitHub Actions The goal is **Zero-Manual-Work**. When you push code to GitHub, the server should update itself. In your GitHub Repo > Settings > Secrets, add: - `HOST`: Your Server IP - `USERNAME`: carmelyne - `SSHKEY`: Your Private SSH Key Create `.github/workflows/deploy.yml`: ```yaml name: Deploy on: push: branches: [main] jobs: build: runs-on: ubuntu-latest steps: - name: Deploy via SSH uses: appleboy/ssh-action@master with: host: $ username: $ key: $ script: | cd ~/my-app git pull origin main npm install npm run build pm2 restart ecosystem.config.js ``` --- ### Final Intent: Resilience over Complexity By choosing a $10 VPS over a black-box platform, you are practicing **Infrastructure Sovereignty**. You know where your files are, you control your security, and your costs are fixed. This setup is the foundation of every tool I build. It's resilient, it's fast, and it respects your budget. 💚