Workspace Management
A workspace is the environment that a developer works in. Developers in a teameach work from their own workspace and can usemultiple IDEs.
A developer creates a workspace from ashared template. This lets an entire team work inenvironments that are identically configured and provisioned with the sameresources.
Creating workspaces
You can create a workspace in the UI. Log in to your Coder instance, go to theTemplates tab, find the template you need, and selectCreate Workspace.

When you create a workspace, you will be prompted to give it a name. You mightalso be prompted to set some parameters that the template provides.
You can manage your existing templates in theWorkspaces tab.
You can also create a workspace from the command line:
Each Coder user has their own workspaces created fromtemplates:
# create a workspace from the template; specify any variablescoder create --template="<templateName>" <workspaceName># show the resources behind the workspace and how to connectcoder show <workspace-name>
Workspace name rules and restrictions
Constraint | Rule |
---|---|
Start/end with | Must start and end with a letter or number |
Character types | Letters, numbers, and hyphens only |
Length | 1-32 characters |
Case sensitivity | Case-insensitive (lowercase recommended) |
Reserved names | Cannot usenew orcreate |
Uniqueness | Must be unique within your workspaces |
Workspace filtering
In the Coder UI, you can filter your workspaces using pre-defined filters orCoder's filter query. Filters follow the pattern[filter name]:[filter text]
and multiple filters can be specified separated by a space i.eowner:me status:running
The following filters are supported:
owner
- Represents theusername
of the owner. You can also useme
as aconvenient alias for the logged-in user, e.g.,owner:me
name
- Name of the workspace.template
- Name of the template.status
- Indicates the status of the workspace, e.g,status:failed
For alist of supported statuses, seeWorkspaceStatus documentation.outdated
- Filters workspaces using an outdated template version, e.g,outdated:true
dormant
- Filters workspaces based on the dormant state, e.gdormant:true
has-agent
- Only applicable for workspaces in "start" transition. Stoppedand deleted workspaces don't have agents. List of supported valuesconnecting|connected|timeout
, e.g,has-agent:connecting
id
- Workspace UUID
Updating workspaces
After updating the default version of the template that a workspace was createdfrom, you can update the workspace.

If the workspace is running, Coder stops it, updates it, then starts theworkspace again.
Updating via the CLI
Update a workspace through the command line:
coder update <workspace-name>
Automatic updates
It can be tedious to manually update a workspace everytime an update is pushedto a template. Users can choose to opt-in to automatic updates to update to theactive template version whenever the workspace is started.
Note: If a template is updated such that new parameter inputs are required fromthe user, autostart will be disabled for the workspace until the user hasmanually updated the workspace.

Bulk operations
Note
Bulk operations are a Premium feature.Learn more.
Licensed admins may apply bulk operations (update, delete, start, stop) in theWorkspaces tab. Select the workspaces you'd like to modify with thecheckboxes on the left, then use the top-rightActions dropdown to apply theoperation.
The start and stop operations can only be applied to a set of workspaces whichare all in the same state. For update and delete, the user will be prompted forconfirmation before any action is taken.

Starting and stopping workspaces
By default, you manually start and stop workspaces as you need. You can alsoschedule a workspace to start and stop automatically.
To set a workspace's schedule, go to the workspace, thenSettings >Schedule.

Coder might also stop a workspace automatically if there is atemplate updateavailable.
Learn more aboutworkspace lifecycle and ourscheduling features.
Workspace resources
Workspaces in Coder are started and stopped, often based on whether there wasany activity or if there was atemplate updateavailable.
Resources are often destroyed and re-created when a workspace is restarted,though the exact behavior depends on the template. For more information, seeResource Persistence.
Repairing workspaces
Use the following command to re-enter template input variables in an existingworkspace. This command is useful when a workspace fails to build because itsstate is out of sync with the template.
coder update <your workspace name> --always-prompt
First, try re-entering parameters from a workspace. In the Coder UI, you canfilter your workspaces using pre-defined filters or employing the Coder's filterquery. Take a look at the following examples to understand how to use theCoder's filter query:
- To find the workspaces that you own, use the filter
owner:me
. - To find workspaces that are currently running, use the filter
status:running
.

You can also do this in the CLI with the following command:
coder update <your workspace name> --always-prompt
If that does not work, a Coder admin can manually push and pull the Terraformstate for a given workspace. This can lead to state corruption or deletedresources if you do not know what you are doing.
coder state pull <username>/<workspace name># Make changescoder state push <username>/<workspace name>
Logging
Coder stores macOS and Linux logs at the following locations:
Service | Location |
---|---|
startup_script | /tmp/coder-startup-script.log |
shutdown_script | /tmp/coder-shutdown-script.log |
Agent | /tmp/coder-agent.log |
Note
Logs are truncated once they reach 5MB in size.