Skip to content

Self-host code-server

updated Sep 2026prices checked · Jul 2026Install verified on Ubuntu 26.04 · Sep 2026 · how we test
We earn commissions when you shop through the links below. Full disclosure →

VS Code running on a server and opened in the browser, so you can edit code and use a terminal on a remote machine from any device. It is maintained by Coder and protected by a password by default.

Key facts

CategoryDeveloper tools
LicenseMIT
StackTypeScript, Node.js
Min RAM1024 MB
Official imageyes
Measured idle RAM120 MB
Difficulty

What you need

  • Any VPS with at least 1024 MB of RAM
  • A domain you control — most self-hosted setups need HTTPS in front of them
  • Under an hour if you've used Docker before
Where to host itaffiliate disclosure
Hetzner Cloudrun it on
From $23.59/mo · 2 vCPU / 4 GB / 80 GB · EU + US
Get Hetzner Cloud (opens in new tab)
Kamaterafree trial
From $4/mo · 1 vCPU / 1 GB / 20 GB · US + EU + Asia
Start free on Kamatera → (opens in new tab)
DigitalOceanalso works on
From $6/mo · 1 vCPU / 1 GB / 25 GB · US + EU + Asia
Deploy on DigitalOcean → (opens in new tab)

Paid link — we earn a commission if you shop through it.

Install

Run these commands on your server:

# code-server — official Docker image, bound to localhost as upstream recommends
mkdir -p ~/.config ~/.local ~/project
docker run -d --name code-server --restart unless-stopped -p 127.0.0.1:8080:8080 \
  -v "$HOME/.local:/home/coder/.local" -v "$HOME/.config:/home/coder/.config" \
  -v "$HOME/project:/home/coder/project" -u "$(id -u):$(id -g)" -e "DOCKER_USER=$USER" \
  codercom/code-server:latest
# password: cat ~/.config/code-server/config.yaml
# reach it via: ssh -L 8080:127.0.0.1:8080 you@SERVER_IP, then open http://localhost:8080

More self-hosted tools

We use analytics cookies (Google Analytics, PostHog) to see which guides are useful. No ad networks, no cross-site tracking. See our privacy policy.