code-server
coder · Code editors
GitHub stars
79,733Awaiting first sync
No measured star history yet
What is code-server?
code-server is VS Code running on a server and opened in a web browser. Your code, tools and terminal stay on the remote machine, and any device with a browser becomes the screen and keyboard. It is built for individuals; the same company's separate product, Coder, covers remote development environments for teams.
code-server runs VS Code on a Linux machine you control and serves it to a web browser. You get the same editor, terminal and extensions on a laptop, a tablet or a borrowed computer, while builds and tests run on the server. It is free, self-hosted and MIT licensed.
Core capabilities
- Open the same VS Code setup from any device with a browser, including an iPad installed as a home-screen app.
- Move builds, tests and downloads to a server (the docs recommend at least 2 CPU cores and 1 GB of RAM).
- Install with one script, a Linux package or the Docker image, and add extensions from the Open VSX registry.
VS Code on a machine you choose
code-server needs a Linux machine with WebSockets enabled; the docs recommend at least 1 GB of RAM and 2 CPU cores. Settings and extensions are stored on the server's disk, and a dropped connection can be resumed for up to three hours by default. Some browser shortcuts get caught by the browser, so the docs suggest installing the page as a progressive web app, which also works on an iPad.
- Remote development
- iPad
- Browser
- Linux
Extensions come from Open VSX
code-server cannot use Microsoft's extension marketplace, because Microsoft's terms limit it to Microsoft's own Visual Studio products. It uses the Open VSX registry instead, which has fewer extensions. Closed-source extensions such as Live Share and the Remote SSH, Containers and WSL extensions are not available. You can install a downloaded .vsix file, or point code-server at your own gallery with EXTENSIONS_GALLERY.
- Extensions
- Open VSX
- VSIX
Install, secure and licence
Install with the script (curl -fsSL https://code-server.dev/install.sh | sh), a deb or rpm package, npm, a standalone archive or the Docker image. By default it listens on 127.0.0.1:8080 with a password, limits logins to two per minute plus twelve per hour, and the docs say never to expose it to the internet without authentication and encryption. They recommend SSH port forwarding, or Caddy or NGINX with Let's Encrypt. The code is MIT licensed.
- Docker
- Password
- HTTPS
- MIT
Where it fits
Use cases
- 01
Code from an iPad or Chromebook
Install code-server on a cloud VM and put it behind HTTPS with Caddy or NGINX and a free Let's Encrypt certificate. Open the address in Safari on the iPad and choose Add to Home Screen to get a full-screen editor.
- 02
Give a thin laptop a bigger machine
Run the install script on a Linux server with plenty of CPU and memory, forward port 8080 over SSH and open 127.0.0.1:8080 in your browser. Compilers, tests and downloads run on the server, and the laptop only shows the editor.
- 03
Keep one development environment everywhere
Start the codercom/code-server Docker image with your project folder mounted at /home/coder/project. Install the same extensions with code-server --install-extension, and every browser you connect from sees the same tools and settings.