← All templates · Developer tools
Deploy code-server in one click
VS Code in the browser
A self-hosted alternative to GitHub Codespaces.
What is code-server?
code-server is an open-source project that runs VS Code on a server and opens it in any browser, a self-hosted alternative to GitHub Codespaces. You get the editor, its terminal and your extensions on a laptop or an iPad, with the same setup on each. Tests, builds and downloads run on the server, so the device in your hands keeps its battery.
People run code-server for one development environment that follows them, on a server they choose, free under the MIT license. Settings are kept on the server's disk, as in desktop VS Code, and its web views do not call out to Microsoft's servers. The catch is that Microsoft's closed-source extensions, Live Share and the Remote ones for SSH, Containers and WSL, do not work.
Hosting code-server on Pethost
- You sign in to Pethost with a passkey, GitHub or Google. No machine yet? You pick a plan, and the link waits until it is ready.
- New project opens at code-server. You fill in what it asks for and click Create project: Password.
- In a minute or two code-server is live at its own address with HTTPS. Its secrets are made at random, and its data is in the nightly backup.
- It is a project like any other: you or your agent can change it, roll it back or restore it.
Questions about code-server
Is code-server free and open source?
Yes. code-server is free under the MIT license, and its source is on GitHub at coder/code-server, a project of Coder.
What is the difference between code-server and GitHub Codespaces?
Both open VS Code in a browser. Codespaces is a closed-source, paid service from GitHub and Microsoft; code-server is free software on your own server, with password sign-in, a built-in proxy to the server's ports and your choice of marketplace.
Does code-server support VS Code extensions?
Yes, from the Open VSX gallery rather than Microsoft's marketplace, whose terms limit it to Microsoft's products. You can also install a .vsix file, or point code-server at another marketplace with $EXTENSIONS_GALLERY.
Can I use code-server on an iPad?
Yes. Open it in Safari, tap Share, then Add to Home Screen: as an app it gets more room and shortcuts such as cmd+w. Expect to edit some shortcuts, and ctrl+c does not stop a long-running terminal process.
Can several people share one code-server?
Not well. code-server was built for individuals, with a single password. For several users the project recommends one virtual machine each, and it points teams to Coder, made by the same company.
How much memory and disk does code-server need?
code-server is heavy: the editor is small, but language servers, extensions and your builds take a few gigabytes. On Pethost the Grow plan is enough for it, with room for other apps beside it.
code-server Docker Compose file
The template is this compose.yaml and the variables written into the project’s .env as it is created. Pethost runs the file as it is written.
Containers: code-server (codercom/code-server:4.141.0).
Volumes, in the nightly backup: home.
services:
code-server:
image: codercom/code-server:4.141.0
restart: unless-stopped
environment:
PASSWORD: ${PASSWORD}
volumes:
- home:/home/coder
volumes:
home:
More in Developer tools
- GiteaGit hosting with pull requests and issues
- KrokiDiagrams from text: PlantUML, Mermaid, Graphviz and more
- CoderRemote development environments from Terraform templates, opened in VS Code, JetBrains, a browser or over SSH
- HasuraInstant GraphQL and REST APIs over a Postgres database, with permissions, events and a web console
- InsForgeA backend for apps that coding agents build: Postgres, auth, storage and edge functions
- LibreDB StudioA SQL IDE in the browser for PostgreSQL, MySQL, SQLite, MongoDB, Redis and more