josegonzalez / openvscode-server

Run upstream VS Code on a remote machine with access through a modern web browser from any device, anywhere.

Home Page:https://www.gitpod.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenVSCode Server

Gitpod ready-to-code GitHub Discord

What is this?

This project provides a version of VS Code that runs a server on a remote machine and allows access through a modern web browser. It's based on the very same architecture used by Gitpod or GitHub Codespaces at scale.

Screenshot 2021-09-02 at 08 39 26

Why?

VS Code has traditionally been a desktop IDE built with web technologies. A few years back, people started patching it in order to run it in a remote context and to make it accessible through web browsers. These efforts have been complex and error prone, because many changes had to be made across the large code base of VS Code.

Luckily, in 2019 the VS Code team started to refactor its architecture to support a browser-based working mode. While this architecture has been adopted by Gitpod and GitHub, the important bits have not been open-sourced, until now. As a result, many people in the community still use the old, hard to maintain and error-prone approach.

At Gitpod, we've been asked a lot about how we do it. So we thought we might as well share the minimal set of changes needed so people can rely on the latest version of VS Code, have a straightforward upgrade path and low maintenance effort.

Getting started

Docker

  • Start the server:
docker run -it --init -p 3000:3000 -v "$(pwd):/home/workspace:cached" gitpod/openvscode-server
  • Visit the URL printed in your terminal. Just going to port 3000 won't work, because VS Code requires that you provide a uniquely generated security token to prevent unauthorized access.

A note about security tokens

Since OpenVSCode Server v1.62, you must access the Web UI using a connection token generated by the server. If that's not what you're looking for, and instead want to generate these tokens by yourself, start the server with --connectionToken YOUR_TOKEN to force your secret to be used. If you want your development environment to be even more secure, create a plaintext file with the desired token as its contents and provide it to the server with --connection-secret YOUR_SECRET_FILE.

Note: Feel free to use the nightly tag to test the latest version, i.e. gitpod/openvscode-server:nightly.

Custom Environment

  • If you want to add dependencies to this Docker image, here is a template to help:
     FROM gitpod/openvscode-server:latest
    
     USER root # to get permissions to install packages and such
     RUN # the installation process for software needed
     USER openvscode-server # to restore permissions for the web interface
    
  • For additional possibilities, please consult the Dockerfile for OpenVSCode Server at https://github.com/gitpod-io/openvscode-releases/

Linux

tar -xzf openvscode-server-v${OPENVSCODE_SERVER_VERSION}.tar.gz
cd openvscode-server-v${OPENVSCODE_SERVER_VERSION}
./server.sh
  • Visit the URL printed in your terminal. Just going to port 3000 won't work, because VS Code requires that you provide a uniquely generated security token to prevent unauthorized access.

Note: You can use pre-releases to test nightly changes.

Deployment guides

Please refer to Guides to learn how to deploy OpenVSCode Server to your cloud provider of choice.

The scope of this project

This project only adds minimal bits required to run VS Code in a server scenario. We have no intention of changing VS Code in any way or to add additional features to VS Code itself. Please report feature requests, bug fixes, etc. in the upstream repository.

For any feature requests, bug reports, or contributions that are not specific to running VS Code in a server context, please go to Visual Studio Code - Open Source "OSS"

Documentation

All documentation is available in the docs branch of this project.

Supporters

The project is supported by companies such as GitLab, VMware, Uber, SAP, Sourcegraph, RStudio, SUSE, Tabnine, Render and TypeFox.

Contributing

Thanks for your interest in contributing to the project 🙏. You can start a development environment with the following button:

Open in Gitpod

To learn about the code structure and other topics related to contributing, please refer to the development docs.

Community & Feedback

To learn what others are up to and to provide feedback, please head over to the Discussions.

You can also follow us on Twitter @gitpod or come chat with us.

Legal

This project is not affiliated with Microsoft Corporation.

About

Run upstream VS Code on a remote machine with access through a modern web browser from any device, anywhere.

https://www.gitpod.io/

License:MIT License


Languages

Language:TypeScript 93.4%Language:JavaScript 3.4%Language:CSS 1.4%Language:HTML 0.8%Language:Inno Setup 0.8%Language:Shell 0.1%Language:Batchfile 0.0%Language:PowerShell 0.0%Language:SCSS 0.0%Language:Groovy 0.0%Language:Cuda 0.0%Language:C++ 0.0%Language:Python 0.0%Language:Makefile 0.0%Language:Perl 0.0%Language:Ruby 0.0%Language:Objective-C 0.0%Language:Objective-C++ 0.0%Language:Clojure 0.0%Language:Handlebars 0.0%Language:Less 0.0%Language:PHP 0.0%Language:Julia 0.0%Language:Jupyter Notebook 0.0%Language:Visual Basic .NET 0.0%Language:C 0.0%Language:C# 0.0%Language:Pug 0.0%Language:Go 0.0%Language:F# 0.0%Language:Java 0.0%Language:CoffeeScript 0.0%Language:Rust 0.0%Language:Dockerfile 0.0%Language:R 0.0%Language:Roff 0.0%Language:ShaderLab 0.0%Language:Dart 0.0%Language:Swift 0.0%Language:Lua 0.0%Language:HLSL 0.0%Language:Hack 0.0%