> ## Documentation Index
> Fetch the complete documentation index at: https://docs.remotemux.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Managed Cloud

> Configure RemoteMux against the hosted control plane using RemoteMux-operated sandboxes.

Use `backend=managed` when you want RemoteMux-operated infrastructure behind the hosted control plane. Users do not need their own cloud credentials -- the control plane provisions sandbox environments on your behalf.

## What This Backend Does

1. Authenticates with `rmux login` or a scoped service token
2. Creates and manages sandbox environments through the control plane
3. Uses the same host-`tmux` workspace model as other backends

Hosted environments are organization-scoped resources and can also be project-scoped. Use `.rmux.toml`, `RMUX_ORGANIZATION_ID`, and `RMUX_PROJECT_ID` to set the default hosted scope for environment creation and `rmux usage`.

## Prerequisites

* A RemoteMux user session or scoped service token
* A control plane base URL

## Configure

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
cd /path/to/project
rmux auth use oauth
rmux configure --backend managed
```

No cloud credentials or infrastructure settings required. Authenticate with either a stored OAuth session or a stored scoped service token/API key, then let the control plane handle provisioning.

Interactive `rmux configure --backend managed` prompts for the hosted auth mode on each run so you can explicitly choose OAuth or API key auth for the project.
That selection is stored in the session state, not in `.rmux.toml`.

If `RMUX_API_KEY` is set in your shell, it overrides the stored auth selection until you unset it.

Use `rmux auth status` to inspect the active source and `rmux auth use oauth` or `rmux auth use api-key --token <api-key>` to switch it explicitly.

## Create and Use

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
rmux env new
rmux workspace new main
rmux workspace attach
```

Attach uses the E2B PTY API. Editor SSH access (`rmux workspace code`) is not supported for managed -- use `rmux workspace attach` for interactive access.

## Inspect Scope

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
rmux usage
```

`rmux usage` shows the active hosted organization/project scope from your current config or session defaults.

## Admin Commands

These require a key with admin permissions:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
rmux admin keys ls
rmux admin keys create --label "Customer A" --plan starter
rmux admin subscription --key-id <key-id> --status active
```
