What is Code Server?
Code Server is the open-source project (MIT, 79 000 GitHub stars) that packages VS Code on the server side and exposes it over HTTP. It runs in a lightweight Docker container, exposes port 8080, and serves a browser UI indistinguishable from the desktop app. Extensions, themes, IntelliSense, debugger, integrated terminal — everything works, including keyboard shortcuts. The only notable limitation: extensions tied to proprietary Microsoft APIs (Remote SSH, Live Share) are unavailable on the Open VSX registry, but free equivalents exist.
What you get
- Full VS Code in the browser — IntelliSense, terminal, debugger, integrated git
- A single lightweight container, ~500 MB RAM — no database or Redis required
- Password-protected access — secret generated at provisioning time
- Persistent volume — home directory, extensions and settings survive restarts
- Works without a domain via SSH tunnel, or with HTTPS when a domain is attached
- Open VSX registry — thousands of extensions: ESLint, Prettier, Python, GitLens
Deploy Code Server on VPS in 4 steps
Provision the VPS
A 2 vCPU / 2 GB RAM VPS is enough for individual use. Debian 12 is the recommended OS — lightweight, predictable, and supported by the official codercom/code-server template.
Start the container
Create a docker-compose.yml with the codercom/code-server:latest image. Mount a named volume on /home/coder for persistence. Pass the PASSWORD variable with a strong password. Expose port 8080 on loopback (127.0.0.1:8080:8080) if you add a reverse proxy, or directly if you use an SSH tunnel.
Set up access
Without a domain: ssh -L 8080:127.0.0.1:8080 user@<your-ip> then http://localhost:8080. With a domain: put nginx or Caddy as a reverse proxy on 443 -> 8080. HTTPS unlocks browser clipboard access and Web Workers.
Install your extensions
Open the Extensions panel (Ctrl+Shift+X), search for your tools on the Open VSX registry and install them. They are stored in /home/coder/.local/share/code-server — in the persistent volume — and survive every container restart.
SSH tunnel vs domain: when to choose which?
An SSH tunnel is the fastest way to get started: no certificate, no DNS, immediate access. But it blocks the clipboard (browser security rule on HTTP) and requires your SSH session to stay open. A domain with HTTPS lifts those restrictions and lets you access from networks where port 22 is blocked (mobile hotspot, airport Wi-Fi). If you code from multiple networks, a dedicated subdomain is worth it.
Common use cases
Coding from a Chromebook or tablet: your VPS becomes your main development machine. Open the browser, enter the password — your project is where you left it, with the same Node.js or Python runtime.
Uniform team environment: each developer gets an identical instance on the server with the same runtime and tool versions. No more 'works on my machine' — the reference is on the VPS.
Remote pair programming: share the URL with an authenticated collaborator. Two people can view the same files without screen sharing or local installation.