# 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: its authentication, port, bind address and editor settings.


This toolconfig tells **code-server**, VS Code in a browser tab, how to run on your
workstation. The [`vscode-web` devtool](https://docs-stg.ringleader.dev/reference/tools/devtools/vscode-web/)
installs it; this configures it.

[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 few lines that make it work, and how to
[require a password](https://docs-stg.ringleader.dev/workstations/connectivity/editors-ssh/#require-a-password-for-vs-code-in-a-browser)
or [change the port](https://docs-stg.ringleader.dev/workstations/connectivity/editors-ssh/#change-the-port-of-vs-code-in-a-browser).
The rest of this page covers [editor settings](#editor-settings),
[the fields](#config-fields) and [how the files are written](#file-writing).

## Editor settings

You do not need this section to use the editor. code-server has the same settings as
desktop VS Code. To set editor settings for everyone who uses the workstation, put them
under `settings`.

Ringleader also writes three settings for the Claude Code extension, so that if you use
it, its panel opens without permission prompts or onboarding. They have no effect on any
other tool:

```json
{
  "claudeCode.allowDangerouslySkipPermissions": true,
  "claudeCode.initialPermissionMode": "bypassPermissions",
  "claudeCode.hideOnboarding": true
}
```

Anything you set wins over Ringleader's three, and any setting you do not
name is left exactly as it is, so a preference someone changes in the editor itself is
not undone the next time the workstation applies its configuration:

```yaml
config:
  auth: none
  settings:
    workbench.colorTheme: Default Dark Modern
    editor.fontSize: 14
```

When the workstation declares [trusted folders](https://docs-stg.ringleader.dev/workstations/packages-tools-settings/code-dotfiles-trusted-folders/),
the workspace-trust prompt is turned off as well, again unless you set that key
yourself.

## `config` fields

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `auth` | `string` | `password` | `none` or `password`. |
| `password` | `string` | none | The password, as a `${secret:NAME}` reference. |
| `port` | `int` | `8080` | The port code-server listens on. |
| `bindAddr` | `string` | `127.0.0.1` | The address code-server listens on: a bare IP or `localhost`, with no port. Leave it alone unless you know why you are changing it. |
| `cert` | `bool` or `string` | none | `true` for a self-signed certificate, or a path to one. |
| `settings` | `object` | none | Editor settings, as described above. |

<div class="callout callout-warning">
  <p class="callout-title">Setting the port alone leaves nobody able to log in</p>
  <div class="callout-body">
    Whenever you set <code>port</code>, <code>bindAddr</code> or <code>cert</code>, set <code>auth</code> in the same block. A field you leave
out takes its default. The default for <code>auth</code> is <code>password</code>, so <code>port: 8081</code> on its own
gives you password authentication with no password. Set <code>auth: none</code> (safe on the default
loopback bind) or <code>auth: password</code> with a <code>password</code>.
  </div>
</div>


Ringleader refuses `auth: none` on any `bindAddr` other than loopback, and the
workstation stops setting up. An unauthenticated browser IDE has a terminal in it, and
on a public interface that is remote code execution for anyone who can reach the port.

## File writing

Ringleader writes code-server's own configuration file
(`~/.config/code-server/config.yaml`) only when you set at least one of `auth`,
`password`, `port`, `bindAddr` or `cert`. With none of those, code-server keeps the file
it generates for itself, with its own random password, and Ringleader touches only the
editor settings.

Both files (`config.yaml` and `~/.local/share/code-server/User/settings.json`) belong to
the login user and are readable by nobody else on the workstation, so a password or a
resolved secret in them is not exposed.

The port you declare is checked every time the workstation applies its configuration,
not only the first time. If code-server is not serving it, because it started before
the configuration landed, crashed, or was restarted by hand, Ringleader restarts the
service so it comes back on the declared port. A workstation already serving the right
port is left alone.

A higher-priority layer that sets `auth` replaces the whole `vscode-web` entry, so declare
`port` there too if you moved it.
[Override a tool configuration from another layer](https://docs-stg.ringleader.dev/workstations/packages-tools-settings/devtools-tool-configuration/#override-a-tool-configuration-from-another-layer)
shows how.

