# Connect a computer to your workspace

# Connect a computer to your workspace

Join a computer to your workspace so its data syncs to the cloud. No password is
typed on the computer itself.

## Before you start

- Phloem installed on the computer. See [Install](https://phloem.ai/docs/install/).
- A Phloem account in the workspace. Enrolling a headless machine needs an
  admin to approve it.

## Steps: a computer with a screen

1. Open Phloem Computer. The first screen reads **Connect** followed by the
   computer's name.
2. Press **Continue in browser**. Your browser opens.
3. In the browser, sign in if asked. The page reads **Approve** followed by the
   computer's name, with *Phloem Computer wants to join your workspace*.
4. Press **Approve**. The page reads *… is connected*.
5. Return to Phloem Computer. It connects by itself.

To approve on a phone or another laptop, press **Approving on another device?**
Open the **Approve link** there, approve, then paste the code it shows into
**Paste the code** and press **Connect**.

Not ready to sign in? **Use this computer locally** records without the cloud.
Sign in later from **Settings** › **Cloud connection** › **Sign in to cloud**.

## Steps: a headless machine

1. On the machine, run:

   ```bash
   phloem device enrol rig-2
   ```

   `rig-2` is the name the device gets. The command prints a link.
2. Open the link in any browser. The page reads **Enrol** followed by the name.
3. An admin of the workspace presses **Enrol machine**.
4. If the browser was on another computer, copy the code it shows. Paste it
   into the waiting terminal.
5. The page reads *… is enrolled*. The terminal prints `enrolled`, the
   device's name and who approved it.

The machine signs in as itself, not as any person. No `phloem login` is needed.

## Check it worked

- In the account's **Devices** page, the computer is listed under **Active**,
  with **Signed in by**.
- In Phloem Computer, **Settings** › **Cloud connection** no longer offers
  **Sign in to cloud**.

> **Note:** If the terminal says to restart Phloem, restart its service once to
> connect to the cloud.

- [Devices](https://phloem.ai/docs/workspace/devices/): Rename, inspect and revoke devices
- [Sync](https://phloem.ai/docs/workspace/sync/): What goes to the cloud, and when
- [Install](https://phloem.ai/docs/install/): Install Phloem on a computer
