{"id":15984,"library":"code-server","title":"code-server","description":"code-server enables running Microsoft's Visual Studio Code on a remote server, accessible via a web browser. This facilitates a consistent development environment across various devices, leveraging cloud server resources for computationally intensive tasks like compilation, testing, and downloads, thereby preserving local device battery life. The current stable version is 4.116.0, which updates to VS Code 1.116.0. The project maintains a frequent release cadence, generally updating monthly to align with new VS Code versions. Key differentiators include its ability to centralize development environments, utilize server-side processing power, and offer a web-based IDE experience without direct client-side VS Code installation. It requires a Linux machine with WebSockets enabled, at least 1GB RAM, and 2 vCPUs, and is built for Node.js 22.","status":"active","version":"4.116.0","language":"javascript","source_language":"en","source_url":"https://github.com/coder/code-server","tags":["javascript","vscode","development","ide","coder","vscode-remote","browser-ide","remote-development"],"install":[{"cmd":"npm install code-server","lang":"bash","label":"npm"},{"cmd":"yarn add code-server","lang":"bash","label":"yarn"},{"cmd":"pnpm add code-server","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[],"quickstart":{"code":"# Install code-server using the official script\ncurl -fsSL https://code-server.dev/install.sh | sh\n\n# The install script will print instructions for running code-server.\n# A common way to run it is:\n# code-server --auth password\n# \n# For unattended or background operation, you might use nohup or tmux:\n# nohup code-server --auth password --bind-addr 0.0.0.0:8080 & \n#\n# Replace 'yourpassword' with a strong password.\n# Access it in your browser at the specified address (e.g., http://your-server-ip:8080)\n#\n# To specify a specific workspace or folder:\n# code-server --auth password --bind-addr 0.0.0.0:8080 /path/to/your/project","lang":"bash","description":"This quickstart demonstrates how to install `code-server` using its recommended `install.sh` script and provides basic command-line examples for running the server, setting authentication, binding to an address, and specifying a project directory."},"warnings":[{"fix":"Ensure your system's Node.js version matches the `engines.node` requirement (currently 22). Use a Node Version Manager (e.g., nvm) to easily switch versions: `nvm install 22 && nvm use 22`.","message":"code-server strictly adheres to a specific Node.js major version, currently Node.js 22. Running with an unsupported Node.js version can lead to startup failures or unexpected behavior.","severity":"breaking","affected_versions":">=4.113.0"},{"fix":"Upgrade immediately to `code-server v4.113.1` or newer if running on `arm64` or `armv7l` architectures.","message":"code-server v4.113.1 fixed an issue where `arm64` and `armv7l` architectures were packaging `amd64` Node binaries due to a CI refactoring mistake in v4.113.0. Users on ARM-based systems might experience startup failures or incorrect architecture detection with v4.113.0.","severity":"breaking","affected_versions":"=4.113.0"},{"fix":"If encountering `glibc` related errors on older Linux systems, upgrade to `code-server v4.114.1` or a newer version to benefit from the reduced `glibc` requirement (2.28).","message":"The required `glibc` version was temporarily raised, potentially causing issues on older Linux distributions. Version v4.114.1 reverted this, bringing the requirement back down to 2.28.","severity":"gotcha","affected_versions":">4.113.1 <4.114.1"},{"fix":"Review your `--trusted-origins` configuration. If you intend to allow subdomains, use `*.domain.com`. If strict matching is desired, ensure no `*` is present and list each origin explicitly.","message":"The `--trusted-origins` configuration now supports wildcard `*.` at the beginning of a domain, allowing `*.example.com` to match both `example.com` and `sub.example.com`. Older configurations expecting only exact matches might need adjustment for broader access or stricter security.","severity":"gotcha","affected_versions":">=4.113.0"},{"fix":"If you experience sessions being terminated too quickly after a disconnection, configure `--reconnection-grace-time` with a higher value (in seconds) suitable for your network conditions, e.g., `code-server --reconnection-grace-time 300`.","message":"The `--reconnection-grace-time` flag was added in v4.113.0, controlling how many seconds clients have to reconnect before a session is permanently killed. This changes default session persistence behavior, which might impact long-running browser sessions or intermittent network connections.","severity":"gotcha","affected_versions":">=4.113.0"}],"env_vars":null,"last_verified":"2026-04-21T00:00:00.000Z","next_check":"2026-07-20T00:00:00.000Z","problems":[{"fix":"Install and use the required Node.js version. If using nvm, run `nvm install 22 && nvm use 22`. Otherwise, ensure your system's default `node` executable is version 22.","cause":"`code-server` requires a specific Node.js major version (currently 22) as indicated by its `engines.node` requirement.","error":"Error: The Node.js version is too old. Expected 22. Found X.Y.Z"},{"fix":"Upgrade `code-server` to v4.114.1 or newer, which explicitly lowered the `glibc` requirement to 2.28. If the issue persists, consider upgrading your OS or running `code-server` in a more modern environment like a Docker container.","cause":"Your Linux distribution's `glibc` version is older than what `code-server` requires, leading to missing shared libraries.","error":"code-server: error while loading shared libraries: libm.so.6: cannot open shared object file: No such file or directory"},{"fix":"Ensure `code-server` is running with the correct `--bind-addr` (e.g., `0.0.0.0:8080` for external access), check server firewall rules, and verify your `--trusted-origins` setting if accessing via a custom domain or reverse proxy.","cause":"This typically indicates an issue with `code-server`'s startup arguments, firewall rules, or reverse proxy configuration preventing a successful WebSocket connection.","error":"WebSocket connection to 'ws://...' failed: Error during WebSocket handshake: Unexpected response code: 400"},{"fix":"Increase the `--reconnection-grace-time` value when starting `code-server` to allow for longer disconnections, for example: `code-server --reconnection-grace-time 300` (for 5 minutes).","cause":"The client lost connection to `code-server` for longer than the configured (`--reconnection-grace-time`) or default grace period, causing the server to terminate the session.","error":"Session has been permanently killed. Please reload the window."}],"ecosystem":"npm"}