spacedriveapp/spacedrive · error · anyhow::Error

No cloud volumes found. Add a cloud volume first with: sd

Error message

No cloud volumes found. Add a cloud volume first with:
  sd volume add-cloud

What it means

Thrown by the interactive location-add flow when the user picks 'Cloud storage' and the volume list query (VolumeListQueryInput { filter: VolumeFilter::TrackedOnly }) returns an empty volumes array. Without at least one tracked cloud volume there is nothing to hang the cloud location on, so the wizard aborts and names the command that creates one.

Source

Thrown at apps/cli/src/domains/location/mod.rs:174

		}
		if !path_buf.is_dir() {
			anyhow::bail!("Path must be a directory: {}", path_buf.display());
		}

		SdPath::local(path_buf)
	} else {
		// Cloud storage
		use sd_core::ops::volumes::list::VolumeListQueryInput;

		let volumes: sd_core::ops::volumes::list::VolumeListOutput = execute_query!(
			ctx,
			VolumeListQueryInput {
				filter: sd_core::ops::volumes::VolumeFilter::TrackedOnly
			}
		);

		if volumes.volumes.is_empty() {
			anyhow::bail!(
				"No cloud volumes found. Add a cloud volume first with:\n  sd volume add-cloud"
			);
		}

		// Present volume choices (showing service-based URIs)
		let volume_choices: Vec<String> = volumes
			.volumes
			.iter()
			.map(|v| {
				format!(
					"{} ({}) - {}",
					v.name,
					v.mount_point.display(), // Show mount point like "s3://bucket"
					v.volume_type
				)
			})
			.collect();

View on GitHub (pinned to 6dfeccf211)

Solutions

  1. Run 'sd volume add-cloud' to register a cloud volume (e.g. an S3 bucket)
  2. Re-run 'sd location add', choose Cloud storage, then select the volume
  3. If the volume exists but isn't tracked, check the daemon's volume list and tracking state
Defensive patterns

Strategy: validation

Validate before calling

let volumes: VolumeListOutput = execute_query!(
    ctx,
    VolumeListQueryInput { filter: sd_core::ops::volumes::VolumeFilter::TrackedOnly }
);
if volumes.volumes.is_empty() {
    eprintln!("Run 'sd volume add-cloud' before adding a cloud location");
    return Ok(());
}

Type guard

fn has_tracked_cloud_volumes(out: &VolumeListOutput) -> bool {
    !out.volumes.is_empty()
}

Prevention

When it happens

Trigger: Choosing 'Cloud storage' in 'sd location add' before any cloud volume has been added; the daemon's volume registry has zero tracked volumes.

Common situations: Fresh setup where the user thinks location-add can create the bucket/login itself; cloud credentials were added but the volume was never tracked; dev daemon with a wiped state directory.

Related errors


AI-assisted analysis of spacedriveapp/spacedrive@6dfeccf211 (2026-08-16). Data as JSON: /api/errors/2fcb943567b4318c. Report an issue: GitHub.