Multiple users can securely connect to a single Coder workspace for programming and debugging.
<!-- Insert screenshot of UI here -->
## Features
Workspace sharing is available to all Coder users by default, but platform admins with a Premium subscription can choose to disable sharing within their organizations or for their entire deployment.
Owners of a workspace can grant access to other users or groups with scoped roles.
This is helpful in a number of scenarios, including:
- Developers can do ad-hoc debugging or pair programming.
- A workspace can be owned by a group of users for QA, on-call rotations, or shared staging.
- AI workflows where an agent prepares a workspace and a developer takes over to review or finalize the work (ex. with [Coder Agents](https://coder.com/docs/ai-coder/agents).)
Workspaces can be shared through either the Coder CLI or UI.
Before you begin, ensure that you have a version of Coder with workspace sharing enabled and that your account has permission to share workspaces. This is true by default if you are an OSS user, but deployments with Premium licenses may be restricted by admins.
### CLI
To share a workspace:
-`coder sharing share <workspace> --user alice`
- Shares the workspace with a single user, `alice`, with `use` permissions
There are several sharing policy levels that can be selected on a per-organization basis.
- **Everyone** – Anybody can share their workspace with any individual or group in the same organization.
- **Service Accounts Only** – Only workspaces owned by service accounts can be shared with any individual or group in the same organization.
- **Disabled** – Workspaces within the organization cannot be shared.
The **Disabled** policy can also be applied to the entire deployment by [setting the `CODER_DISABLE_WORKSPACE_SHARING` environment variable, or by using the corresponding command argument or config value](https://coder.com/docs/reference/cli/server#--disable-workspace-sharing).