# vscode-web

> For the complete documentation index, see [llms.txt](https://docs-stg.ringleader.dev/llms.txt).


> VS Code in your browser, running on the workstation: code-server installed, started for you, reachable only from your laptop.


Installs **code-server**, which is VS Code in a browser tab, running on the workstation.
It starts on boot as the login user and listens on port 8080 on the workstation's own
loopback address.

[Set up VS Code in your browser](https://docs-stg.ringleader.dev/workstations/connectivity/editors-ssh/#set-up-vs-code-in-your-browser)
shows the devtool, the toolconfig and the port forward that make it work.

`version` picks the code-server release a workstation installs. Omit it for the pinned
default, `4.146.0` today. A changed `version` replaces the installed release on the next
configuration pass, and the editor restarts as [Updates](#updates) describes. Everything
else on this page is optional: [extensions](#extensions),
[configuring it](#configuration) and [how it behaves](#notes).

## Extensions

The default set is one extension, Claude Code. Declare the
[`claude-code` devtool](https://docs-stg.ringleader.dev/reference/tools/devtools/claude-code/) too, and you can also start
Claude Code from the terminal in the browser IDE. To choose your own extensions, list
[Open VSX](https://open-vsx.org) ids on the devtool's `config`, optionally pinned as
`<namespace>.<name>@<version>`:

```yaml
devtools:
  - name: vscode-web
    config:
      extensions:
        - anthropic.claude-code
        - golang.go
        - ms-python.python@2024.14.0
```

| You declare | You get |
|---|---|
| nothing | `anthropic.claude-code` |
| `extensions: []` | no extensions; an empty list is taken literally |
| a list | those, up to 32 |
| a malformed id | refused at apply, so the typo surfaces while you are looking at it |

If one extension fails to install, only that extension is lost; the rest, and the IDE
itself, are unaffected.

## Configuration

The devtool installs; the
[`vscode-web` toolconfig](https://docs-stg.ringleader.dev/reference/tools/tool-configuration/vscode-web/) configures.
Use it to set editor settings for everyone. To
[require a password](https://docs-stg.ringleader.dev/workstations/connectivity/editors-ssh/#require-a-password-for-vs-code-in-a-browser)
or [move the IDE off port 8080](https://docs-stg.ringleader.dev/workstations/connectivity/editors-ssh/#change-the-port-of-vs-code-in-a-browser),
follow the tasks on Editors and plain SSH.

## Purpose

1. Installs the `code-server` binary from the official release for the workstation's
   architecture.
2. Installs the declared extensions for the login user.
3. Registers a Ringleader-managed service that starts `code-server` as the login user on
   boot, carrying the workstation's declared `environment`. When that environment
   changes, the service restarts, so a variable declared in a config layer reaches the
   editor and its terminals without anyone restarting anything.

The browser IDE is served under Ringleader's mark: the tab icon and the app-install
icons are the Ringleader ring, and the install prompt reads "Install Ringleader app".
Nothing else about the editor is changed.

## Updates

With `updatePolicy: latest` and no `version`, code-server takes the
[Ringleader default route](https://docs-stg.ringleader.dev/reference/tools/devtools/#update-routes). It moves when an update to
Ringleader raises the default release.
The editor restarts to run the new release. The restart waits for the workstation's
[maintenance window](https://docs-stg.ringleader.dev/reference/tools/devtools/#service-restarts-and-maintenance-windows), if it declares one.

## Notes

- code-server listens only on the workstation's loopback address, so it is never
  exposed on a network; the forward is the only way in.
- If you also run a service on 8080, move code-server with the toolconfig's `port`.
  Tool configuration is applied before your provisioning scripts run, so code-server has
  already moved by the time a script tries to bind 8080.
- To attach desktop VS Code over SSH instead, no devtool is needed; see the
  [`vscode-server` toolconfig](https://docs-stg.ringleader.dev/reference/tools/tool-configuration/vscode-server/).
- **Debian and Ubuntu only.** code-server publishes no musl build, so on an Alpine
  workstation this devtool fails with a message saying so.

