Servers Vscode Remote development

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.

Michael Johnson
Michael Johnson

Dedicated servers and small-business DevOps

He compares dedicated servers, unmanaged VPS plans, support promises, and the real cost of keeping a stack online.

6 min read

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.
ProviderStarter plan in HostScout dataMonthly priceRAMCPUDiskPractical reading
DigitalOceanBasic Droplet$4.000.5 GB1 vCPU10 GB SSDFine for tiny repos, too tight for heavy language servers.
HetznerCX23$6.284 GB2 vCPU40 GB SSDMore comfortable for Docker and larger dependency trees.
LinodeNanode$5.001 GB1 vCPU25 GB SSDUsable for lightweight services if swap and builds are controlled.
VultrCloud Compute entry$2.500.5 GB1 vCPU10 GB SSDTreat 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?
No. Remote-SSH uses your local VS Code window and runs the server-side editor helper on your VPS. A cloud IDE usually provides the browser workspace, account layer, and compute environment together.
Can I use the same VPS for development and production?
You can, but it is usually a bad trade. Editor helpers, indexing, package installs, and test runs can compete with the live service. Use a separate development VPS when the project matters.
How much RAM do I need for Remote-SSH?
Small repositories can work on very little memory, but modern language servers and Docker builds quickly need more headroom. Pick the plan by project behavior, not by whether the first SSH connection succeeds.
Should I store production secrets on the dev VPS?
Avoid it unless the server is hardened and access is audited. Use scoped development credentials, restrict file permissions, and rotate anything that was copied during experiments.

Prepared by

Michael Johnson
Michael Johnson

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 editorial

Related articles