Your laptop is five years old, the build takes eight minutes, and you want to fix a bug from a tablet on the train. code-server runs Visual Studio Code on a server and gives you the full editor in a browser tab — same extensions, same terminal, same keyboard shortcuts. The heavy lifting happens on the VPS; your device just draws the UI.
Why a VPS works well for it
- One environment everywhere. The same checkout, tools and settings from your laptop, a borrowed PC or an iPad.
- Builds don't drain your battery. Compiles and test runs use the server's CPU.
- Long jobs survive. Close the lid, and a job running in tmux keeps going.
- Fast downloads.
npm installanddocker pullrun on the server's own fast uplink, not hotel Wi-Fi.
What it needs
| Workload | Suggested plan |
|---|---|
| Scripts, config editing, small Python projects | Micro — 1 vCPU, 2 GB, $5/mo |
| Web apps with TypeScript, PHP or Go | Small — 2 vCPU, 4 GB, $8/mo |
| Several projects, Docker builds, big monorepos | Medium — 4 vCPU, 6 GB, $12/mo |
Language servers are the hidden cost. A TypeScript project with a few thousand files can take a gigabyte on its own.
Install
As a regular user with sudo (not root — see our sudo user guide):
curl -fsSL https://code-server.dev/install.sh | sh
sudo systemctl enable --now code-server@$USER
The install script picks the right package for your distribution. Settings live in ~/.config/code-server/config.yaml:
bind-addr: 127.0.0.1:8080
auth: password
password: use-a-long-random-password
cert: false
Restart after editing: sudo systemctl restart code-server@$USER. Keep bind-addr on 127.0.0.1 — it should never listen on a public address without HTTPS in front.
Access option 1: SSH tunnel (works on any plan)
From your own machine:
ssh -p 22 -N -L 8080:127.0.0.1:8080 you@203.0.113.10
Then open http://localhost:8080. Nothing is exposed to the internet, and SSH does the encryption. On a NAT plan, use your personal SSH port from the dashboard instead of 22. This is the setup we'd recommend for a single developer.
Access option 2: HTTPS on your own domain
For access from devices where you can't run SSH, put nginx in front on a dedicated-IP plan. Point a subdomain at the server (here's how), then proxy with WebSocket support:
server {
server_name code.example.com;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
proxy_set_header Accept-Encoding gzip;
}
}
Get a certificate with certbot --nginx -d code.example.com. Our reverse proxy guide covers the details. With a public URL, the password in config.yaml is the only thing between the internet and a shell on your server, so make it long.
Things to know before you switch
- Extensions come from Open VSX. Most popular ones are there; a few Microsoft-only extensions aren't. Check yours first.
- Browser shortcuts win sometimes. Ctrl+W closes the tab, not the editor file. Installing code-server as a PWA from the browser menu fixes most of this.
- No GPU. It's a CPU server — fine for code, not for training models.
- Run long jobs in tmux. The integrated terminal dies with the tab.
Pairs well with
If you use AI coding agents, the same server can run them next to your editor — see running a coding agent on a VPS and the Claude Code use case. Plan details and upgrade paths are in the plans docs.
Comments
No comments yet. Be the first.