Sitelet https://github.com/coder/code-server/issues/1397
Skip to content

Support and publish Windows release #1397

Description

@nhooyr
  • Should be able to build on Windows
  • See linked issues, make sure they work
  • Publish Windows releases as part of CI

Activity

  1. danny-laa commented on May 1, 2020

    @danny-laa

    @nhooyr Any updates? Does 3.0 release support Windows?

  2. nhooyr commented on May 1, 2020

    @nhooyr
    ContributorAuthor

    There are no self contained windows releases yet.

    We haven't tested but the npm package might work on windows. yarn global add code-server

  3. max-hk commented on May 2, 2020

    @max-hk
    Contributor

    There are no self contained windows releases yet.

    We haven't tested but the npm package might work on windows. yarn global add code-server

    I was able to install the npm package in windows, but I encounter a few bugs,

    1. src/browser/media/manifest.json not found

    2. 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 found

      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
      ➡ Correct path

    3. Syntax highlighting, extensions and themes not working (because of 2)

    4. 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

    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.

  4. self-assigned this
    on May 3, 2020
  5. nhooyr commented on May 3, 2020

    @nhooyr
    ContributorAuthor

    @MaxLOh Awesome thanks for looking into it!

  6. nhooyr commented on May 6, 2020

    @nhooyr
    ContributorAuthor

    The package is now just code-server on 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.

    @code-asher

    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.

  7. added a commit that references this issue on May 12, 2020
  8. nhooyr commented on May 13, 2020

    @nhooyr
    ContributorAuthor

    Asher has fixed the paths, will publish a new release soon.

  9. nhooyr commented on May 13, 2020

    @nhooyr
    ContributorAuthor

    We're going to need to test/rewrite any shell scripts that will have to run on Windows.

  10. nhooyr commented on May 18, 2020

    @nhooyr
    ContributorAuthor

    Marking this for v3.4.0, couldn't test/get CI going in time for v3.3.0

  11. added this to the v3.4.0 milestone on May 18, 2020
  12. modified the milestones: v3.4.0, on May 27, 2020
  13. 65 remaining items

  14. changed the title [-]Publish windows release[/-] [+]Support and publish windows release[/+] on Feb 29, 2024
  15. changed the title [-]Support and publish windows release[/-] [+]Support and publish Windows release[/+] on Jul 10, 2024
  16. dosgo commented on Sep 12, 2024

    @dosgo

    image

  17. code-asher commented on Sep 12, 2024

    @code-asher
    Member

    cannot find module 'minimist' implies that the dependency installation step failed so you might want to try running npm with verbose logging and see if anything shows up.

  18. dosgo commented on Sep 19, 2024

    @dosgo

    image
    The installation seems to have no errors

  19. code-asher commented on Sep 19, 2024

    @code-asher
    Member

    Strange. Is it any different with verbose logging? I have seen npm hide installation errors from the post-install script.

  20. zby909 commented on Nov 5, 2024

    @zby909

    Image
    Why can't I use code-server -r [path]? Moreover, the sock file displayed in the console error message does not actually exist. -------I am a Windows system and installed code-server through npm.

  21. code-asher commented on Nov 5, 2024

    @code-asher
    Member

    I wonder if we are doing the socket incorrectly on Windows. None of this is currently tested on Windows unfortunately.

  22. GianSinghSarao commented on Sep 11, 2025

    @GianSinghSarao

    Windows/NPM install fails inside postinstall.sh script

    First, some (brief) background:

    • The postinstall.sh bash script is executed using git-bash on Windows, as far as I know.
    • When case $OS windows), mklink is used for symlinking.
    • mklink is not an exe, but a CMD built-in, hence it is unavailable in git-bash.

    Solution:

    Calls to mklink should be passed to cmd with heredoc syntax as described at https://stackoverflow.com/questions/18641864/git-bash-shell-fails-to-create-symbolic-links.

    Workaround:

    • Install with --ignore-scripts
      • npm 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_modules folder
        • (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 argon2 as the --ignore-scripts prevented 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-server and 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.

  23. alsc-tr commented on Sep 14, 2025

    @alsc-tr

    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.

  24. GianSinghSarao commented on Jul 5, 2026

    @GianSinghSarao

    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.

  25. sheen-aa commented on Oct 9, 2026

    @sheen-aa

    "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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ciIssues related to cienhancementSome improvement that isn't a featureos-windowsWindows related

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions