Using Cursor with your own VPS instead of a managed cloud

A workflow for developers who build in Cursor and want to run their apps on a VPS they control, without losing the convenience of managed hosting.

AI editors like Cursor make it fast to build an app. Deployment is where many people fall back on managed hosting, because a VPS feels like a lot of manual work. With the right setup, the editor can help run the server too, and the bill stays flat.

The pieces

  • A VPS from any provider (2 to 4 GB of RAM is plenty for several small apps)
  • A deployment layer on that VPS that handles builds, TLS and routing
  • Git as the source of truth
  • Optionally, an MCP connection so the editor’s agent can see deploy status and logs

Keep the server boring

Do not let the agent SSH in and improvise. The best results come from a server that is set up once, carefully:

  1. Create a non root user and disable password SSH logins
  2. Enable a firewall that allows only 22, 80 and 443
  3. Turn on unattended security updates
  4. Install Docker and your deployment platform
  5. Point a wildcard DNS record at the server

After that, day to day work happens through Git and the platform, not shell sessions.

Let the agent work in the repo

Cursor is excellent at writing Dockerfiles, Compose files, health endpoints and CI configuration. Ask it to:

  • Generate a multi stage Dockerfile for your stack
  • Add a /healthz endpoint
  • Write a .dockerignore
  • Add graceful shutdown handling

Review those changes like any other code, then push. The platform builds and deploys.

Connect deploy context with MCP

If your deployment platform exposes an MCP server, add it to Cursor with a token scoped to your project. Now you can ask “why did the last deploy fail?” and the agent reads the build log directly, instead of you copying and pasting it. Keep write actions limited to redeploys and rollbacks.

Environment variables

Never paste production secrets into chat. Keep them in the platform’s environment settings, and reference variable names in code. If the agent needs to know a variable exists, it can read names without values.

What you replace, and what you do not

A VPS plus a deployment layer can replace managed app hosting, preview deployments, cron jobs and small databases. It does not replace:

  • Global CDNs for heavy static traffic (put a CDN in front)
  • Managed databases with automatic failover if you truly need them
  • Compliance certifications you inherit from big clouds

Cost comparison

A handful of side projects on managed platforms often run 20 to 60 dollars a month once each has a database. The same projects on one VPS can cost under 10, plus your deployment tool.

A weekly routine

  • Glance at disk usage and backups
  • Apply any pending updates
  • Ask the agent to summarize errors from the week’s logs

There is a fuller walkthrough in this guide on using Cursor with a VPS to replace managed cloud.

Disclosure: I work on Peon, a deployment layer with an MCP server that fits this workflow.


Write a comment