Repository navigation
Support and publish Windows release #1397
Description
- Should be able to build on Windows
- See linked issues, make sure they work
- Publish Windows releases as part of CI
Activity
- addedenhancementSome improvement that isn't a featureSome improvement that isn't a feature
on Mar 5, 2020 @nhooyr Any updates? Does 3.0 release support Windows?
There are no self contained windows releases yet.
We haven't tested but the npm package might work on windows.
yarn global add code-serverThere are no self contained windows releases yet.
We haven't tested but the npm package might work on windows.
yarn global add code-serverI was able to install the npm package in windows, but I encounter a few bugs,
-
src/browser/media/manifest.jsonnot found -
All vscode-remote-resource path returns 404 not found, but this bug can easily be solved by removing leading slash in the path agument, eg.
http://127.0.0.1:8080/vscode-remote-resource?path=/c:/Users/Max/AppData/Local/Yarn/Data/global/node_modules/@coder/code-server/lib/vscode/extensions/markdown-basics/language-configuration.json
➡ 404 not foundhttp://127.0.0.1:8080/vscode-remote-resource?path=c:/Users/Max/AppData/Local/Yarn/Data/global/node_modules/@coder/code-server/lib/vscode/extensions/markdown-basics/language-configuration.json
➡ Correct path -
Syntax highlighting, extensions and themes not working (because of 2)
-
Automatic update not working because
https://github.com/cdr/code-server/releases/download/3.2.0/code-server-3.2.0-win32-x86_64.tar.gzdoes not exist
Furthermore, running the post install scripts requires Visual Studio and "VC++ 2015.3 v140 toolset for desktop (x86,x64)" to be installed, but since running code-server does not require electron to be built, I think it may be unnecessary.
-
@MaxLOh Awesome thanks for looking into it!
The package is now just
code-serveron npm. We were able to get ownership from the previous owner.src/browser/media/manifest.json not found
Fixed.
All vscode-remote-resource path returns 404 not found, but this bug can easily be solved by removing leading slash in the path agument, eg.
Automatic update not working because https://github.com/cdr/code-server/releases/download/3.2.0/code-server-3.2.0-win32-x86_64.tar.gz does not exist
We'll be removing automatic updates soon. See #1532 .
Furthermore, running the post install scripts requires Visual Studio and "VC++ 2015.3 v140 toolset for desktop (x86,x64)" to be installed, but since running code-server does not require electron to be built, I think it may be unnecessary.
Will mention this in docs, it is required as vscode uses native modules that have to be built.
Reacted by max-hkAsher has fixed the paths, will publish a new release soon.
Reacted by max-hk and Diego de Blas MateoReacted by GMWe're going to need to test/rewrite any shell scripts that will have to run on Windows.
Marking this for v3.4.0, couldn't test/get CI going in time for v3.3.0
67 remaining items
cannot find module 'minimist'implies that the dependency installation step failed so you might want to try runningnpmwith verbose logging and see if anything shows up.Strange. Is it any different with verbose logging? I have seen npm hide installation errors from the post-install script.
I wonder if we are doing the socket incorrectly on Windows. None of this is currently tested on Windows unfortunately.
Windows/NPM install fails inside
postinstall.shscriptFirst, some (brief) background:
- The
postinstall.shbash script is executed using git-bash on Windows, as far as I know. - When
case $OS windows),mklinkis used for symlinking. mklinkis not an exe, but a CMD built-in, hence it is unavailable ingit-bash.
Solution:
Calls to
mklinkshould be passed tocmdwith heredoc syntax as described at https://stackoverflow.com/questions/18641864/git-bash-shell-fails-to-create-symbolic-links.Workaround:
- Install with
--ignore-scriptsnpm install -g code-server --unsafe-perm --ignore-scripts
- Manually install dependencies and create symlinks from
postinstall.sh- Open an admin CMD if not already (i.e. if you normally use git-bash / powershell)
- Navigate to the global
node_modulesfolder- (This can vary depending on how NPM is installed, i.e. NVM / Scoop)
- You can find it with
npm root -g - I did
cd "C:\ProgramData\Scoop\Global\apps\nvm\current\nodejs\nodejs\node_modules"
cd code-server- (commands below are based on commands from
postinstall.sh -
cd "lib\vscode" npm install --unsafe-perm --omit=dev REM from symlink_asar mklink /J "node_modules.asar" "node_modules" REM from symlink_bin_script remote-cli code code-server pushd "bin\remote-cli" mklink /J "code-server.cmd" "code.cmd" popd REM from symlink_bin_script helpers browser browser .sh pushd "bin\helpers" REM actually don't run this, as the original command may be another bug: on *nix, maybe the error level isn't affected if the symlink already exists, but on Windows, could this be enough to kill the postinstall script? REM mklink /J "browser.cmd" "browser.cmd" popd cd extensions npm install --unsafe-perm --omit=dev REM if no errors: exit
- Manually build
argon2as the--ignore-scriptsprevented it- In admin CMD again
-
cd "C:\ProgramData\Scoop\Global\apps\nvm\current\nodejs\nodejs\node_modules" cd code-server\node_modules\argon2 npm install --unsafe-perm --omit=dev REM if no errors: exit
- If none of the commands failed, code-server should be installed successfully on Windows, and you can test by running
code-serverand opening http://127.0.0.1:8080 as described in the docs.
For what it's worth, this workaround appears to address some of the recent issues with Windows installations, as described in #7093. I was using code-server@v4.103 and node@22.17.0.
Reacted by as, Liuziwei, VinciYan and roblframpton- The
This works great, thanks. Just wanted to point out in "cd code-server\node-modules\argon2" in the last code block it should be "node_modules" with an underscore.
Reacted by Gian Singh Sarao- marked Request: Official Windows binary for code-server (similar to Linux/macOS releases) #7638 as a duplicate of this issue
on Jan 21, 2026 - marked Reported npm error gyp ERR! stack Error:
gypfailed with exit code: 1 when installing on Windows with npm #7380 as a duplicate of this issueon Apr 7, 2026 I recently re-installed to update to the latest versions of everything (i.e. code-server@4.117.0 and node@22.23.1) and the previous steps applied almost verbatim. The only difference I think is noteworthy is that the method to manually build argon2 had changed.
cd "C:\ProgramData\Scoop\Global\apps\nvm\current\nodejs\nodejs\node_modules" cd code-server\node_modules\argon2 npm install --ignore-scripts npx node-gyp rebuild -C ./
As an aside, I will probably switch to
fnm, as mentioned in vscode's "How to Contribute" page (eventually), but for now I stuck with NVM for Windows / Scoop as it's what I know. And I did try to install with the newer LTS releases (i.e.>= 24.11.0) but it doesn't seem ready yet. node-argon2 is replaced by a built-in, in node versions>=24.7, as far as I can tell, so hopefully one potential blocker will be resolved sooner or later.Reacted by Asher"Windows releases are now available" in v4.137.0. Any plans to close this issue? Also, curious if anyone has used the Windows releases in production?
Ah right this issue should be closed, thanks!
I have only spun it up in a Windows VM to make sure it runs, which it did, but I have not done any significant testing on it.


