Files
coder/docs/workspaces.md
2022-06-08 21:23:54 +00:00

2.4 KiB

Workspaces

Workspaces contain the IDEs, dependencies, and configuration information needed for software development.

Create workspaces

Each Coder user has their own workspaces created from shared templates:

# create a workspace from the template; specify any variables
coder create <workspace-name>

# show the resources behind the workspace and how to connect
coder show <workspace-name>

Connect with SSH

Once you've added your workspaces to your SSH hosts, you can connect from any IDE with remote development support:

coder config-ssh
coder ssh <workspaceName>

Editors and IDEs

The following desktop IDEs have been tested with Coder, though any IDE with SSH support should work!

  • VS Code (with Remote - SSH extension)
  • JetBrains (with Gateway installed)
    • IntelliJ IDEA
    • CLion
    • GoLand
    • PyCharm
    • Rider
    • RubyMine
    • WebStorm

Workspace lifecycle

Workspaces in Coder are started and stopped, often based on whether there was any activity or if there was a template update available.

Resources are often destroyed and re-created when a workspace is restarted, though the exact behavior depends on the template's definitions. For more information, see persistent and ephemeral resources.

⚠️ To avoid data loss, refer to your template documentation for information on where to store files, install software, etc., so that they persist. Default templates are documented in ../examples/templates.

You can use coder show <workspace-name> to see which resources are persistent and which are ephemeral.

When a workspace is deleted, all of the workspace's resources are deleted.

Dotfiles

Users can install configuration from a personal dotfiles repository with the coder dotfiles <repo> command in their workspace. Templates can also prompt users for their dotfiles repo (example).

Updating workspaces

Use the following command to update a workspace to the latest template version. The workspace will be stopped and started:

coder update <workspace-name>