Skip to content

code-server on a VPS

VS Code in the browser

Category
Dev / Tools
Author
Coder
License
MIT
Version
4.139.1

The script is free · VPS from $4.63 per month · installs in about 60 seconds

Install over SSH

root@vps:~# curl -fsSL https://code-server.dev/install.sh | sh && sudo systemctl enable --now code-server@$USER

  • SystemUbuntu 24.04 · x86_64ok
  • Sourcegithub.com/coder/code-serverok
  • Version4.139.1ok
  • Port8080/tcplisten

✓ code-server 4.139.1 installed · about 60 seconds

root@vps:~#

Install command from the library. Output is shortened and may differ on your server.

What it is

  • IDE
  • VS Code
  • Remote development

code-server is Visual Studio Code running on the server and opened in your browser. Write code from a laptop, tablet or someone else's computer while builds and runs happen on a powerful VPS.

Handy for developing bots and websites right where they run: terminal, git, extensions and debugging in one window.

The official script installs the package and runs code-server as a systemd service under the current user.

  • Full VS Code in the browser
  • Extensions from Open VSX
  • Built-in server terminal
  • Password login
  • Works on a tablet or a low-end laptop

Recommended plan

For code-server: at least 2 vCPU, 3 GB RAM and 45 GB NVMe.

Minimum to run
1 vCPU · 1 GB RAM · 10 GB disk
Systems
Ubuntu 22.04 · Ubuntu 24.04 · Debian 11 · Debian 12 · AlmaLinux 9

How to install

Three steps in the bot or one command over SSH; installation takes about 60 seconds.

  1. 01

    Choose a plan in the bot

    Open @ExpressHost_bot and pay for a VPS. The server will be ready in about 60 seconds.

  2. 02

    Add code-server

    At the “Add-ons” step pick the script from the library, or run it later: Server settings → Scripts.

  3. 03

    The password is in ~/.config/code-server/config.yaml

    The bot will send the server address and login details to the chat.

Manually over SSH

Connect to the server as root and run the command. Supported systems: Ubuntu 22.04, Ubuntu 24.04, Debian 11, Debian 12, AlmaLinux 9.

Install command
curl -fsSL https://code-server.dev/install.sh | sh && sudo systemctl enable --now code-server@$USER

Ports

code-server ports
PortProtocolPurpose
8080tcpWeb interface (127.0.0.1 only by default)

After installation

  1. 1.The password is in ~/.config/code-server/config.yaml
  2. 2.Open it through an SSH tunnel: ssh -L 8080:127.0.0.1:8080 root@IP, then http://localhost:8080
  3. 3.For permanent access, set up an HTTPS proxy (Caddy or Nginx) to 127.0.0.1:8080

code-server FAQ

Didn’t find an answer? Message @ExpressHost_SupportBot.

Is it safe to open port 8080?

Better not: code-server gives access to the server's terminal. Use an SSH tunnel or an HTTPS proxy with a strong password.

How do I update?

Re-run the install script and restart the service: systemctl restart code-server@$USER.

Where are settings and extensions stored?

Config in ~/.config/code-server, extensions and data in ~/.local/share/code-server.

code-server installs at checkout — in the bot.