VSCode Remote SSH on a VPS: practical setup
VSCode Remote SSH on a VPS lets you code against a real Linux server; compare starter plans, setup steps, and operational risks.
Dedicated servers and small-business DevOps
He compares dedicated servers, unmanaged VPS plans, support promises, and the real cost of keeping a stack online.
Use VS Code Remote-SSH when you want your editor local but your runtime on a VPS. It works best for real Linux services, Docker-heavy projects, and background tasks, provided you choose predictable CPU, enough RAM, clean SSH access, and a backup plan before installing extensions.
What Remote-SSH changes
Remote-SSH keeps the VS Code window on your laptop while the code, terminal, language servers, and build tools run on the VPS. That closes the usual works-on-my-machine gap, but it also moves editor comfort onto server resources you now pay for.
The failure mode is not the first connection. VS Code can connect. The bill comes later, when search indexing, formatters, container builds, and package installs compete for the same CPU, disk, and memory that make the workspace feel usable.
For a solo project, the clean pattern is simple: use a separate VPS for development, keep data disposable, and automate rebuilds. If the same box serves real users, Remote-SSH becomes an operational risk, not a convenience feature.
Pick a VPS for the development loop
Do not buy the smallest VPS just because the editor opens. VS Code extensions run server-side helpers. Language servers scan files. Package managers and Docker builds spike CPU and disk writes. A cheap plan can work, but only when the project is small and rebuilds are rare.
Use HostScout provider data as a sanity check, not as a blind ranking. These starter VPS rows show the trade-off to inspect before you create the server.
Before comparing providers, separate the buying criteria:
- CPU and RAM decide whether the editor feels usable during indexing and tests.
- Disk headroom decides whether dependency caches, container layers, and logs become a daily cleanup job.
- Region and backup policy decide whether the server is convenient after the first successful connection.
| Provider | Starter plan in HostScout data | Monthly price | RAM | CPU | Disk | Practical reading |
|---|---|---|---|---|---|---|
| DigitalOcean | Basic Droplet | $4.00 | 0.5 GB | 1 vCPU | 10 GB SSD | Fine for tiny repos, too tight for heavy language servers. |
| Hetzner | CX23 | $6.28 | 4 GB | 2 vCPU | 40 GB SSD | More comfortable for Docker and larger dependency trees. |
| Linode | Nanode | $5.00 | 1 GB | 1 vCPU | 25 GB SSD | Usable for lightweight services if swap and builds are controlled. |
| Vultr | Cloud Compute entry | $2.50 | 0.5 GB | 1 vCPU | 10 GB SSD | Treat as a throwaway test box, not a main workspace. |
The price is only the first filter. Check region, backup cost, snapshot retention, egress policy, and whether the plan can resize without a painful migration. Remote development fails slowly when storage fills or CPU steal rises.
Build the server like a workspace, not a pet
Start with a fresh Linux image and a non-root user. Keep SSH key access only. Disable password login after confirming that a second shell can still connect. The boring access steps matter because the editor will reconnect often and may open terminals automatically.
adduser dev
usermod -aG sudo dev
mkdir -p /home/dev/.ssh
chmod 700 /home/dev/.ssh
Copy your public key into the dev user account, then lock down the file permissions. Use a separate key for this server, because a remote dev box tends to collect private repositories, deployment credentials, and package tokens if you are careless.
chmod 600 /home/dev/.ssh/authorized_keys
On your laptop, define a named SSH host. This keeps VS Code configuration readable and lets you test the connection outside the editor before blaming extensions.
Host dev-vps
HostName example-hostname
User dev
IdentityFile ~/.ssh/dev-vps
IdentitiesOnly yes
Open VS Code, install Remote-SSH, connect to the named host, and open the project directory on the server. The first connection installs the VS Code server component in the user account. That is normal, but it consumes disk and can break if the home directory is tiny.
Keep the repo and runtime reproducible
Clone the repository on the VPS, not through a synced desktop folder. Build tools should see the same filesystem, shell, and container runtime that your app expects. For Docker projects, confirm the dev user can run Docker without using root for every command.
Use a small bootstrap file for the project. It should install dependencies, copy a local environment template, and run the narrowest health check. If a new VPS cannot run the project from those steps, Remote-SSH only hides configuration drift behind a nicer editor.
Keep secrets out of the repository and out of shell history. A development VPS is still an internet server. Use environment files with restricted permissions, rotate tokens after experiments, and avoid pasting production database credentials into a disposable workspace.
What to avoid
Avoid using Remote-SSH as a cheap replacement for production observability. The integrated terminal is convenient, but it is not a deployment system, a log platform, or a permission model. Manual fixes over SSH are hard to repeat and easy to forget.
Also avoid mixing heavy indexing with real traffic. TypeScript, Python, Java, and Rust tooling can be aggressive. If the VPS serves users, pin background services, watch memory pressure, and keep editor work away from the live process tree.
The strongest reason to use a VPS is a real server dependency: Linux-only packages, container networking, native binaries, persistent queues, or long-running workers. If your app is a static site or a small script, a local dev container may be cheaper and less fragile.
Setup checklist
Checklist
- VPS sizing: choose enough RAM and disk for language servers, dependency caches, and one failed build without filling the server.
- SSH access: require key login and confirm a second terminal session before disabling password fallback.
- Repository bootstrap: rebuild the project from a fresh clone and inspect which steps still depend on laptop state.
- Backups: test a snapshot or restore path before storing private repositories or long-lived credentials.
- Runtime isolation: keep editor tooling away from production services when CPU, memory, or disk pressure can affect users.
Decision guide
Choose Remote-SSH on a VPS when server parity matters. It is a good fit for API services, Docker Compose stacks, background workers, queue consumers, Linux-native packages, and projects where local macOS or Windows behavior keeps lying to you.
Avoid it when latency and credentials are the real problem. If your network is poor, your team needs shared previews, or the project depends on managed databases and SaaS credentials, a disposable cloud workspace or local container may be cleaner.
For provider choice, start with location and rebuild cost. Hetzner is attractive when the extra memory matters. DigitalOcean, Linode, and Vultr are easier to place near US, UK, or Canadian readers. Check the current plan page before treating any starter price as final.
Data freshness and method
HostScout compares provider pages, plan samples, and infrastructure attributes, then uses editorial checks to separate hard fields from judgment. Prices and plan specs in this article come from the current HostScout dataset for the named providers. Treat them as planning inputs, then recheck the provider page before purchase.
FAQ
Is VS Code Remote-SSH the same as a cloud IDE?
Can I use the same VPS for development and production?
How much RAM do I need for Remote-SSH?
Should I store production secrets on the dev VPS?
Prepared by
Dedicated servers and small-business DevOps
He compares dedicated servers, unmanaged VPS plans, support promises, and the real cost of keeping a stack online.
Verified facts
HostScout editorialRelated articles
Fix Slow MySQL Queries Without Guessing
Fix slow MySQL queries with a measured workflow: find the real statement, read EXPLAIN safely, test one index or rewrite, and verify the workload.
Self-host n8n on a VPS: a safe setup plan
Self-host n8n on a VPS with persistent Docker storage, TLS, correct webhook URLs, credential protection, backups, and a tested update plan.
Linux swap file setup for a low-RAM VPS
Linux swap file setup for a low-RAM VPS, with practical sizing rules, OOM tradeoffs, checks, and when to upgrade RAM instead.
Machine learning server requirements
Machine learning server requirements for training and inference: compare CPU, GPU, RAM, storage, provider fit, and operational risks.
RAID levels explained for dedicated servers
RAID levels explained for server buyers: compare RAID 0, 1, 5, 6 and 10 by speed, redundancy, usable capacity and rebuild risk.
What Is an IP Address? IPv4, IPv6, Public and Private
What is an IP address? Learn how IPv4, IPv6, public, private, static, and shared addresses affect hosting, DNS, security, and server choice.