Skip to content

Commit

Permalink
Update the README to reflect changes in upstream
Browse files Browse the repository at this point in the history
Add docs about the new `--without-connection-token`, including other changes.

Correct the entrypoint

Update 'em docs again

Mention `--without-connection-token`

Co-authored-by: Jean Pierre <jeanp413@hotmail.com>

Rephrase the `Securing access to your IDE` section

Co-authored-by: Jean Pierre <jeanp413@hotmail.com>
  • Loading branch information
filiptronicek and jeanp413 committed May 4, 2022
1 parent 172281a commit ed5d468
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,8 @@ At Gitpod, we've been asked a lot about how we do it. So we thought we might as
```bash
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.
- Visit the URL printed in your terminal.

#### 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 `--connection-token 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`.

For those using docker-compose you can set a connection token by using `command`. For example:

```yaml
command: --connection-token yourTokenHere
```

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

Expand All @@ -56,16 +47,29 @@ _Note_: Feel free to use the `nightly` tag to test the latest version, i.e. `git
### Linux

- [Download the latest release](https://github.com/gitpod-io/openvscode-server/releases/latest)
- Untar and run the server:
```bash
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.
- Untar and run the server
```bash
tar -xzf openvscode-server-v${OPENVSCODE_SERVER_VERSION}.tar.gz
cd openvscode-server-v${OPENVSCODE_SERVER_VERSION}
./bin/openvscode-server # you can add arguments here, use --help to list all of the possible options
```

From the possible entrypoint arguments, the most notable ones are
- `--port` - the port number to start the server on, this is 3000 by default
- `--without-connection-token` - used by default in the docker image
- `--connection-token` & `--connection-secret` for securing access to the IDE, you can read more about it in [Securing access to your IDE](#securing-access-to-your-ide).
- `--host` - determines the host the server is listening on. It defaults to `localhost`, so for accessing remotely it's a good idea to add `--host 0.0.0.0` to your launch arguments.

- Visit the URL printed in your terminal.

_Note_: You can use [pre-releases](https://github.com/gitpod-io/openvscode-server/releases) to test nightly changes.

### Securing access to your IDE

Since OpenVSCode Server v1.64, you can access the Web UI without authentication (anyone can access the IDE using just the hostname and port), if you need some kind of basic authentication then you can start the server with `--connection-token YOUR_TOKEN`, the provided `YOUR_TOKEN` will be used and the authenticated URL will be displayed in your terminal once you start the server. You can also create a plaintext file with the desired token as its contents and provide it to the server with `--connection-secret YOUR_SECRET_FILE`.

If you want to use a connection token and are working with OpenVSCode Server via [the Docker image](https://hub.docker.com/r/gitpod/openvscode-server), you will have to edit the `ENTRYPOINT` in [the Dockerfile](https://github.com/gitpod-io/openvscode-releases/blob/eb59ab37e23f8d17532b4af4de37eafaf48037a5/Dockerfile#L64) or modify it with the [`entrypoint` option](https://docs.docker.com/compose/compose-file/compose-file-v3/#entrypoint) when working with `docker-compose`.

### Deployment guides

Please refer to [Guides](https://github.com/gitpod-io/openvscode-server/tree/docs/guides) to learn how to deploy OpenVSCode Server to your cloud provider of choice.
Expand Down

0 comments on commit ed5d468

Please sign in to comment.