Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for self-hosted version of vscode.dev with host environment access #135856

Closed
PALuczak opened this issue Oct 26, 2021 · 21 comments
Closed

Allow for self-hosted version of vscode.dev with host environment access #135856

PALuczak opened this issue Oct 26, 2021 · 21 comments
Labels
feature-request Request for new features or functionality remote Remote system operations issues web Issues related to running VSCode in the web
Milestone

Comments

@PALuczak
Copy link

Given that running VS Code in the browser is now possible (with vscode.dev), it would be extremely useful to be able to self-host a VS Code instance with full access to the host environment (similar to how RStudio Server works). This could serve as an equivalent to the "Remote-SSH" workflow for devices without native support for VS Code, as well as an easy way of creating development environments for students/presentation attendees (just spawn a docker container with VS Code server and all required dependencies for each student) without requiring them to install any software on their own machines.

@janus-reith
Copy link

janus-reith commented Jan 7, 2022

It seems to me like the title of this ("vscode.dev") and the issue description are contradicting.
There are multiple existing solutions which allow running the VSCode GUI in the browser, backed by a server.
Don't get me wrong, official support for this would be great to have instead of third parties, but technically it's not the main interesting part of vscode.dev but something that was available for a while.

AFAIK The interesting part about vscode.dev is that it actually runs in the browser, including the language server, without any non-static server-side counterpart involved. (Hence the limitations like not having a terminal).

@janus-reith
Copy link

janus-reith commented Jan 7, 2022

Could #135733 please be reopened (unless there is an even older issue on this topic that I haven't found, commenting there is locked) and could the title of this topic be changed to reflect the actual use case?

@PALuczak
Copy link
Author

PALuczak commented Jan 7, 2022

@janus-reith

The interesting part about vscode.dev is that it actually runs in the browser, including the language server, without any non-static server-side counterpart involved.

That is only true for a very small subset of workloads (AFAIK it is possible only for JS and related languages) - it is, for example, impossible to run a Python based course (even an introductory one) without some locally hosted environment with a Python interpreter.
A self-hosted vscode.dev without host access would have extremely limited use since you would still have to have a local dev environment on every machine to run the code (or even full intellisense that can deal with external libraries), and if you have that, you might as well install VScode locally (since in comparison with setting up any dev environment local vscode installation is negligible in both time and required disk space). Only with host access can you have a complete dev environment for any language in the browser on any device without having to install anything locally.

There are multiple existing solutions which allow running the VSCode GUI in the browser

And now, we can avoid duplicating engineering efforts by settling on one official method - vscode.dev hosted either by Microsoft or the local IT department, depending on the intended use.

@janus-reith
Copy link

A self-hosted vscode.dev without host access would have extremely limited use

I'm aware of the limitations and I do have use cases ;)

The interesting part about vscode.dev is that it actually runs in the browser, including the language server, without any non-static server-side counterpart involved.

That is only true for a very small subset of workloads (AFAIK it is possible only for JS and related languages)

As said earlier, I'm totally supporting your request and don't want to force one solution over the other. However, what you are asking for seems more like a self-hosted codespaces like solution(Which also used to exist with vscode online, although that even was another different thing, the frontend part and some was gateway where hosted by MS, the code server could be self-hosted).

I am interested in a self-hostable version of vscode.dev, the limited environment which actually works in the browser. Other tickets for that have been closed, pointing to this one.

@Igorgro
Copy link

Igorgro commented Jan 8, 2022

Seems related to this: #139725

@bpasero bpasero added the remote Remote system operations issues label Apr 19, 2022
@fdendorfer
Copy link

Is there an update on this? The mentioned MR has been merged into main a few months ago.

@orellabac
Copy link

I am also looking for this. I want to host vscode.dev on my own site

@akaytatsu
Copy link

I am also looking for this. I want to host vscode.dev on my own site

I too. I'm following this issue for months, waiting for this solution

@pktiuk
Copy link

pktiuk commented Jun 23, 2022

For now you can use vscode server from Gitpod
https://github.com/gitpod-io/openvscode-server

@orellabac
Copy link

code server requires a container. Self-hosted doesnt

@yume-chan
Copy link
Contributor

yume-chan commented Jun 29, 2022

OpenVSCode Server also provides non-docker instructions. However, it's Linux only.

Although can't find any documentation, Code ships its server binary publicly (for all of Linux x64, macOS x64 and Windows x64). I found them from https://github.com/bpasero/vscode-bisect/blob/main/src/builds.ts .

It's the full featured one, like the Visual Studio Online/Visual Studio Codespace/GitHub Codespace (/other hundreds of names Microsoft will rename it to), means it has file system and terminal access on server, not like vscode.dev/github.dev

Assume on Linux x64:

  1. Open https://update.code.visualstudio.com/api/commits/insider/server-linux-x64-web in browser, you will see a JSON array contains a bunch of hashes, take note of the first one (newest), say 0e3304bca9e862eddc7e437e2bab8a4a4a4f33c9
  2. Download https://az764295.vo.msecnd.net/insider/{hash}/vscode-server-linux-x64-web.tar.gz, replace {hash} with the above one, like https://az764295.vo.msecnd.net/insider/0e3304bca9e862eddc7e437e2bab8a4a4a4f33c9/vscode-server-linux-x64-web.tar.gz
  3. Uncompress the downloaded file somewhere you like
  4. pretend to read the license terms.
  5. Run bin/code-server-insiders --accept-server-license-terms
  6. Open the printed link in browser

I believe someone smart can make a script to automate the process.

Note:

  1. Run bin/code-server-insiders --help for options
  2. To let Code server listen on all interfaces (instead of localhost only), add --host=0.0.0.0 argument.
  3. To disable the connect token (so you don't need to see the output), add --without-connection-token argument.

Other platforms:

(Not tested) Replace server-linux-x64-web in both links with:

  • macOS: server-darwin-web
  • Windows: server-win32-x64-web

Stable releases:

(Not tested) Replace insider in both links with stable

@Igorgro
Copy link

Igorgro commented Jul 1, 2022

(Not tested) Replace insider in both links with stable

Works normally. Great thanks for this instruction! (Hope it won't be deleted)

@joern19
Copy link

joern19 commented Jul 1, 2022

I believe someone smart can make a script to automate the process.

For the lazy people, like me:

Download the stable version:

wget https://az764295.vo.msecnd.net/stable/$(curl https://update.code.visualstudio.com/api/commits/stable/server-linux-x64-web | cut -d '"' -f 2)/vscode-server-linux-x64-web.tar.gz


Download the insider version:

wget https://az764295.vo.msecnd.net/insider/$(curl https://update.code.visualstudio.com/api/commits/insider/server-linux-x64-web | cut -d '"' -f 2)/vscode-server-linux-x64-web.tar.gz

@kovalchukrs
Copy link

Unfortunately for Darwin does't work.

@Igorgro
Copy link

Igorgro commented Jul 7, 2022

For darwin use https://az764295.vo.msecnd.net/insider/{hash}/vscode-server-darwin-x64-web.zip or https://az764295.vo.msecnd.net/insider/{hash}/vscode-server-darwin-arm64-web.zip

@bamurtaugh
Copy link
Member

Hey all, thanks for the comments in this issue!

We're happy to share that we just released a private preview service called the Visual Studio Code Server. The VS Code Server is a service you can run on a remote development machine, like your desktop PC or a virtual machine. It allows you to securely connect to that remote machine from anywhere through a vscode.dev URL, without the requirement of SSH.

You can learn more in the announcement blog post and docs.

We'll track future issues and feedback on the VS Code Server in the VS Code Remote Dev repo: https://github.com/microsoft/vscode-remote-release.

We're looking forward to getting your feedback. Thank you!

@zhzhxtrrk
Copy link

I don't think the requirement is fulfilled, in some cases(slow internet connection or private internal network without internet access, etc...), vscode.dev is not an option, then self-hosted vscode.dev will be the only choice.

Please consider to reopen this issue.

@molamooo
Copy link

molamooo commented Jul 21, 2022

I don't think the requirement is fulfilled, in some cases(slow internet connection or private internal network without internet access, etc...), vscode.dev is not an option, then self-hosted vscode.dev will be the only choice.

Current VSCode Server can run in serve-local mode. This should meet your requirements. Check the doc

@zhzhxtrrk
Copy link

I don't think the requirement is fulfilled, in some cases(slow internet connection or private internal network without internet access, etc...), vscode.dev is not an option, then self-hosted vscode.dev will be the only choice.

Current VSCode Server can run in serve-local mode. This should meet your requirements. Check the doc

Wow, it works like a charm, it helps a lot, thank you.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality remote Remote system operations issues web Issues related to running VSCode in the web
Projects
None yet
Development

No branches or pull requests

16 participants