# 使用 Homebrew, Nix 安装 code-server

查看 code-server 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:code-server
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install code-server
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#code-server
```

  证据: nixpkgs package indexes: pkgs/by-name/co/code-server/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:code-server
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/code-server>
- **版本:** 4.112.0
- **来源摘要:** Access VS Code through the browser
- **主页:** <https://coder.com>
- **上游文档:** <https://coder.com>
- **许可证:** MIT
- **源码归档:** <https://registry.npmjs.org/code-server/-/code-server-4.112.0.tgz>
- **最后更新:** 2026-06-15T10:20:13-04:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- code-server (cli)
- code-server (别名)

## 依赖

- node@22

## 构建依赖

- pkgconf

## 安装行为

- post-install 钩子: 未定义
- 服务: declared
- 注意事项: The launchd service runs on http://127.0.0.1:8080. Logs are located at $HOMEBREW_PREFIX/var/log/code-server.log.
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 4.112.0
- 管理器更新时间: 2026-06-15
- 本地数据: OK
- 上游仓库: https://coder.com
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

code-server is Coder's project for running VS Code on a remote machine and accessing it through a browser. It packages the VS Code editing experience as a self-hosted web IDE with a `code-server` CLI, install script, service setup, and browser login flow.

### 项目历史

The GitHub repository was created in 2019. The official contributing docs describe the early v1 architecture as a Code submodule plus a large patch that split the UI into a browser front-end and a server process. As VS Code's web architecture matured, code-server v2 and later used the Code front-end while implementing the server side, later reducing its patch set as upstream Code opened more server pieces.

### 采用历史

code-server became a standard self-hosted way to get VS Code in a browser, especially for remote Linux machines and cloud development boxes. Official docs support install scripts, Debian and RPM packages, AUR, Homebrew, Docker, Helm, Raspberry Pi, Termux, and cloud-provider guides; the input also records Homebrew and Nix distribution.

### 使用方式

Typical use is installing `code-server`, starting it as a user service or container, then visiting localhost or a secured remote URL in a browser. The default config is created at `~/.config/code-server/config.yaml`, stores bind address, auth mode, password or hashed password, and TLS settings, and can be overridden by flags or environment variables.

### 为什么软件包爱好者会关心

For package nerds, code-server is significant because it turns a large desktop editor into a service-oriented CLI package. Its packaging story spans native packages, Homebrew, Nix, Docker images, Helm charts, AUR recipes, install scripts, and upstream VS Code version tracking, which makes it a useful case study in repackaging a fast-moving Electron editor for headless and server environments.

### 时间线

- 2019: GitHub repository for coder/code-server created.
- 2019: v1 architecture split Code into browser front-end and server pieces, according to official contributing docs.
- 2022: v4 releases tracked upstream VS Code versions in the changelog.
- 2026: Recent releases continued tracking current VS Code versions.

### Related projects

- Related projects and comparators include Visual Studio Code, Code OSS, Coder, Theia, OpenVSCode Server, GitHub Codespaces, VS Code web, devcontainers, and remote development tooling.

### 来源

- <https://github.com/coder/code-server>
- <https://coder.com/docs/code-server/FAQ>
- <https://coder.com/docs/code-server/install>
- <https://coder.com/docs/code-server/CONTRIBUTING>
- <https://github.com/coder/code-server/releases>


## 安全说明

broad file, network, media, or database tool signal. formula declares a Homebrew service.

- **Geiger 风险:** orange / 中
- broad file, network, media, or database tool signal
- formula declares a Homebrew service


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ~/.config/code-server/config.yaml

## Credential files

- Unix: ~/.config/code-server/config.yaml
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** code-server
- **Version Scheme:** 0
- **Revision:** 1
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** yes
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## 其他软件包管理器记录

- Nix - code-server: normalized package name match | nixpkgs package indexes: pkgs/by-name/co/code-server/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## 相关链接

- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [pkgconf](https://pkg.so/zh-hans/brew/pkgconf/) - Build dependency declared by Homebrew.
- [coder](https://pkg.so/zh-hans/brew/coder/) - Shares the same upstream homepage.
- [atuin-server](https://pkg.so/zh-hans/brew/atuin-server/) - Shares pkgdb curated category or tags: cli, developer-tools, self-hosted, server.
- [soft-serve](https://pkg.so/zh-hans/brew/soft-serve/) - Shares pkgdb curated category or tags: cli, developer-tools, self-hosted, server.
- [temporal](https://pkg.so/zh-hans/brew/temporal/) - Shares pkgdb curated category or tags: cli, developer-tools, server.
- [selenium-server](https://pkg.so/zh-hans/brew/selenium-server/) - Shares pkgdb curated category or tags: cli, developer-tools, server.
- [code-cli](https://pkg.so/zh-hans/brew/code-cli/) - Shares pkgdb curated category or tags: cli, developer-tools, vscode.
- [gitea](https://pkg.so/zh-hans/brew/gitea/) - Shares pkgdb curated category or tags: cli, developer-tools, self-hosted.
- [vscode-langservers-extracted](https://pkg.so/zh-hans/brew/vscode-langservers-extracted/) - Shares pkgdb curated category or tags: cli, developer-tools, vscode.

## Combined YAML source

View the package source record on GitHub. [combined/code-server.yml](https://github.com/mxcl/pkgdb/blob/main/combined/code-server.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
