VS Code in a Web Browser without Open OnDemand

Warning

This page is under construction pending login nodes.

Run the VS Code Code-Server on Delta in manual mode (without Open OnDemand) by following these steps:

  1. In a terminal, ssh log in to Delta (see Direct Access Login Nodes).

  2. Navigate to /sw/external/vscode/code-server/bin.

  3. Run the following command to start the server. Replace dt-loginNN with the login node you are logged in to.

    In the following example, the user is logged in to dt-login03:

    [arnoldg@dt-login03 bin]$  ./code-server --bind-addr
    dt-login03:8899
    [2023-04-14T15:57:03.059Z] info  code-server 4.11.0 85e083580dec27ef19827ff42d3c9257d56ea7e3
    [2023-04-14T15:57:03.060Z] info  Using user-data-dir ~/.local/share/code-server
    [2023-04-14T15:57:03.132Z] info  Using config file ~/.config/code-server/config.yaml
    [2023-04-14T15:57:03.133Z] info  HTTP server listening on http://141.142.140.196:8899/
    [2023-04-14T15:57:03.133Z] info    - Authentication is enabled
    [2023-04-14T15:57:03.133Z] info      - Using password from ~/.config/code-server/config.yaml
    [2023-04-14T15:57:03.133Z] info    - Not serving HTTPS
    [10:57:12]
    
  4. Open a second terminal window.

  5. In the second terminal, SSH tunnel to the login node running code-server with the following command. Replace:

    • username with your Delta login username (in one place).

    • dt-loginNN with the same login node you used in step 3 (in two places).

    In the following example, the user is logged in to dt-login03:

  6. Read the config.yaml file noted when you started the server (step 3) and copy the password to your clipboard.

    Example output:

  7. Open a web browser on your local desktop/laptop and go to the following URL.

  8. In the password field, enter the password you copied in step 6 and begin using VS Code in your browser.

    vscode in a web browser