Skip to content

Coder Workspaces

Seth Erickson edited this page Sep 30, 2025 · 13 revisions

https://coder.dreamlab.ucsb.edu

Coder workspaces are on-demand virtual machines with commonly used data science tools. They run a Linux-based operating system (Ubuntu 24.04 LTS) on computing infrastructure provided by College of Letters and Science IT.

Anyone with an active UCSB Net ID may create a workspace and use it for the duration of the quarter (see policies below). You can use your workspace for data science projects (without needing to install software on your personal computer) or to learn about Linux system management.

Each workspace VM includes the following:

Resource Description
CPU 4 vCPUs
Memory 16 GiB
Disk Storage 15 GB for OS and 64 GB for user data (‘/home’ directory)
Operating System Ubuntu Linux (24.04 LTS)
Software R (v4.5.1) ; RStudio Server (2025.09.0); Pixi (v 0.55.0).

Additional software can be installed, using the sudo apt install command.

Policies

  • Data stored on the workspace is not backed up. You are responsible for maintaining backups of your data.
  • All workspaces are automatically deleted at the end of each quarter.
  • You may create and use one workspace at a time. If you have multiple active workspaces, they may be deleted without notice.
  • Workspaces may be inaccessible during scheduled maintenance windows, which will be announced by email.
  • Your workspaces will “stop” (shut off) automatically after four hours of inactivity to conserve resources. To resume the workspace, click the “start” button in the top right corner of the workspace page.
  • You may install additional software on the VM as needed.
  • Your workspace may be accessed by staff in the Library or LSIT. Do not store confidential or sensitive information in your workspace.

Creating a Workspace

To create a workspace visit https://coder.dreamlab.ucsb.edu.

  • Click the UCSB Login button to log in using UCSB SSO (via Google).
  • Click the button to create a Dreamlab Workspace.

On the "Create Workspace" page:

  • Give your workspace a name (or use the suggested name).
  • Check the "I understand the usage policies" box.
  • Select additional software that you would like to be installed automatically:
    • Rstudio: to enable the RStudio server web interface.
    • JupyterLab: for working with Jupyter notebooks.
    • Visual Studio Code (Desktop): for connecting to the workspace from your personal computer using VS Code.
    • Visual Studio Code (Web): to enable the browser-based VS Code service.
  • Click "Create Workspace" at the bottom of the form.

It may take a few minutes to create the VM and install the software. When the process is complete, you should see an interface like this (depending on the software you selected):

Coder Workspace Page

The Workspace Lifecycle

Your workspace will shut down automatically after four hours of inactivity. To resume the workspace, you need to click the "Start" button in the upper-right corner of the workspace page.

When you are done with your workspace, you can delete it by selecting Delete in the drop-down menu in the upper-right corner of the workspace page.

Warning

Deleting the workspace deletes all files on the workspace!

Integrating with GitHub/GitLab

Your coder workspace is automatically configured with an ssh public key. Once you've logged in, you'll find the public key in your account settings, under SSH Keys. You can use the public key to authenticate with git-based services like GitHub and GitLab.

Special Use Cases

Installing Gemini CLI

Google's Gemini CLI is a command-line AI coding agent. UCSB faculty and staff should be able to use the CLI with existing UCSB Google accounts.

To install the Gemini CLI on a coder workspace:

# Download and install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash

# in lieu of restarting the shell
\. "$HOME/.nvm/nvm.sh"

# Download and install Node.js:
nvm install 22

# Install Gemini CLI
npm install -g @google/gemini-cli

# Run Gemini
gemini

The first time you run the Gemini CLI, you will be prompted to authenticate: you will need to copy and paste a very long URL into your browser window, and then copy and paste the authentication key on the webpage back into the terminal.

Also note, it's best to run gemini inside a project directory, not your home directory.

Accessing Shared Datasets

Warning

These instructions are experimental!

Some DREAM Lab datasets are stored on an NFS server that can be accessed from the workspace

sudo apt install nfs-common
sudo mkdir /mnt/datasets
sudo mount 10.2.17.91:/mnt/datasets /mnt/datasets

Connecting Your Workspace to the Library VPN

Note

These instructions are for connecting to the Library VPN, used by library staff.

  1. Login to the VPN portal (https://vpn.library.ucsb.edu) using your library account.
  2. Near the bottom of the page, download the VPN connection profile. It's a file called client.ovpn.
  3. Upload the client.ovpn file to your workspace. You can use the File Browser tool to do that.
  4. Install the VPN client on the Workspace virtual machine: run the following commands in the terminal.
sudo apt install -y apt-transport-https curl
sudo mkdir -p /etc/apt/keyrings
sudo sh -c 'curl -sSfL https://packages.openvpn.net/packages-repo.gpg >/etc/apt/keyrings/openvpn.asc'
sudo sh -c 'echo "deb [signed-by=/etc/apt/keyrings/openvpn.asc] https://packages.openvpn.net/openvpn3/debian noble main" >>/etc/apt/sources.list.d/openvpn3.list'
sudo apt update
sudo apt install -y openvpn3
  1. With openvpn3 installed, you can import the previously uploaded connection profile.
openvpn3 config-import --config $client.ovpn
  1. Start a VPN session with the following command. You will bve prompted to enter your library account credentials.
# start a vpn session
openvpn3 session-start --config client.ovpn

# disconnect the session
openvpn3 session-manage --disconnect --config client.ovpn

Warning

DNS name resolution seems to be broken after disconnecting. I got it working again with sudo systemctl restart systemd-resolved

Administering The Service

The service is administered primarily by Seth Erickson, in the library. Members of LSIT also have admin privileges, allowing them to manage users and workspace templates.

Messaging Users

Currently, the easiest way to communicate with users is by generating a list of contacts and sending an email (with user addresses BCCed). Fortunately, the coder CLI makes it easy to generate a list of all users. If you have user admin privileges, you can:

# authenticate with the service:
coder login coder.dreamlab.ucsb.edu

# list emails
coder users list --column email

You can run these commands from a coder workspace to avoid installing the cli on your personal computer!

Here is an email template:

Hello! You're receiving this email because you've logged in to the Dreamlab Coder workspace (https://coder.dreamlab.ucsb.edu/). ... Please let me know if you have any questions or feedback. If you'd like to be more involved in this project you can submit issues on the GitHub repo, or suggest improvements to the wiki. This is very much work in progress! Thanks! Seth