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

# cloudstic source discover

> Discover local source candidates for onboarding

## Overview

The `cloudstic source discover` command scans the current machine for local backup source candidates — the root filesystem and any mounted portable/external drives — and prints them in a format suitable for onboarding decisions.

It's the discovery step that [`cloudstic setup workstation`](/commands/setup-workstation) uses internally to find portable drives, but you can also run it standalone to see what Cloudstic would find, or to feed the results into your own tooling with `-json`.

## Basic Usage

```bash theme={null}
cloudstic source discover [options]
```

## What It Finds

Discovery is OS-aware:

* **macOS**: the root volume (`/`), plus anything mounted under `/Volumes/` (treated as portable)
* **Linux**: the root filesystem (`/`), plus anything mounted under `/media/`, `/run/media/`, or `/mnt/` on a `/dev/` device (treated as portable)
* **Windows**: fixed drives (the system drive `C:\` is not portable; other fixed drives are), plus removable drives (always portable)

<Note>
  Discovery only looks at mounted local filesystems. It does not discover SFTP servers, Google Drive, or OneDrive sources — those are configured directly with `cloudstic profile new` or `cloudstic setup workstation`.
</Note>

For each candidate, Cloudstic reports:

* **Source URI** — a ready-to-use `local:<mount>` source URI
* **Display name** — the drive/volume name if available, otherwise derived from the mount point
* **Mount point**
* **Identity** — a stable volume identity hint (e.g. volume UUID/label), when the platform exposes one
* **FS type**, when known
* **Portable** — whether the source is treated as a portable/external drive rather than a fixed system volume

## Command Flags

<ParamField path="-portable-only" type="boolean" default="false">
  Only show portable/external source candidates (skip the fixed root/system volume).
</ParamField>

<ParamField path="-json" type="boolean" default="false">
  Write discovered sources as JSON instead of a table.
</ParamField>

## Examples

<CodeGroup>
  ```bash Human-readable table theme={null}
  cloudstic source discover
  ```

  ```bash Portable drives only theme={null}
  cloudstic source discover -portable-only
  ```

  ```bash JSON output theme={null}
  cloudstic source discover -json
  ```
</CodeGroup>

### Example Output

```
NAME          SOURCE URI              MOUNT           IDENTITY   FS      PORTABLE
Macintosh HD  local:/                 /                          apfs    no
Backup Drive  local:/Volumes/Backup   /Volumes/Backup  a1b2c3     apfs    yes
```

If nothing is found:

```
No sources discovered.
```

### JSON Output

```json theme={null}
[
  {
    "source_uri": "local:/",
    "display_name": "Macintosh HD",
    "mount_point": "/",
    "fs_type": "apfs",
    "portable": false
  },
  {
    "source_uri": "local:/Volumes/Backup",
    "display_name": "Backup Drive",
    "mount_point": "/Volumes/Backup",
    "identity": "a1b2c3",
    "fs_type": "apfs",
    "portable": true
  }
]
```

<Tip>
  The `identity` field (volume UUID/label, when available) helps preserve backup lineage for portable drives even if the mount point changes between sessions.
</Tip>

## Relationship to Workstation Setup

`cloudstic source discover` is the same discovery logic that powers [`cloudstic setup workstation`](/commands/setup-workstation), which combines it with OS-aware folder suggestions to build a full onboarding plan. Use `source discover` directly when you just want to see what portable drives are currently attached, or when scripting around discovery output.

## See Also

* [Sources Overview](/sources/overview): All supported source types
* [cloudstic setup workstation](/commands/setup-workstation): Guided onboarding that uses this discovery step
* [cloudstic profile new](/commands/profile-new): Create a profile for a discovered source
