Skip to main content
Introduction Cloud
web-ui-vuln
Osmedeus Cloud provisions virtual machines across cloud providers and runs security workflows or arbitrary commands on them. This guide covers the architecture, configuration, and operational patterns.

How It Works

Lifecycle:
  1. Provision — Create VMs via Pulumi (or reuse existing ones)
  2. Setup — SSH into each worker, run setup commands (install osmedeus, tools, etc.)
  3. Execute — Run workflow or custom commands, stream output back in real time
  4. Sync — Download results to local machine (optional)
  5. Destroy — Tear down infrastructure (optional, can be automatic)

Supported Providers

Configuration

Cloud config lives in ~/.osmedeus/cloud/cloud-settings.yaml. Manage it with:

Required Configuration

Every provider needs four things: cloud enabled, credentials, SSH keys, and setup commands.

Optional Configuration

Post-Setup Commands

Post-setup commands run per-worker after the main setup, with template variables expanded:
Available variables: {{public_ip}}, {{private_ip}}, {{worker_name}}, {{worker_id}}, {{infra_id}}, {{provider}}, {{ssh_user}}, {{index}}

Two Execution Modes

Workflow Mode (default)

Runs an osmedeus flow or module on remote workers:

Custom Command Mode

Runs arbitrary shell commands on remote workers — no osmedeus workflow required:
--custom-cmd is mutually exclusive with -f/-m. See Custom Command Mode below.

Infrastructure Management

Provisioning

Listing

Reusing Existing Infrastructure

Destroying

Target Distribution

When scanning multiple targets across multiple workers, osmedeus splits the target list into chunks:
Each worker receives its chunk as a file at /tmp/osm-targets-{i}.txt on the remote machine.

Custom Command Mode Details

Run any commands on cloud instances without using osmedeus workflows. Commands run in /tmp/osm-custom/ on the remote.

Flags

Template Variables

All commands and sync paths support these variables:

Execution Rules

  • Custom-cmds run sequentially on each worker, but in parallel across workers
  • If any --custom-cmd fails (non-zero exit), remaining commands and all --custom-post-cmd are skipped for that worker
  • Post-cmd failures are logged but do not affect other workers

Sync-Back

Downloaded files are placed at: <sync-dest>/<worker_name>-<ip>/<remote_path> For example, --sync-path /tmp/osm-custom/results.txt from worker osmw-0 at 1.2.3.4:

Examples

Syncing Results

Workflow Mode: --sync-back

Exports osmedeus workspaces (including database state) from remote workers and imports them locally:

Custom Mode: --sync-path

Downloads specific files or directories via SFTP:

Cost Management

Pre-Provisioning Estimates

Costs are estimated before provisioning. Set limits to prevent overspending:

Spot/Preemptible Instances

Save 70-80% on instance costs:

Cost Reference

Example: 5 DigitalOcean s-2vcpu-4gb instances for 2 hours = 5 x 0.02232x2=0.02232 x 2 = **0.22**

Worker Setup

Workers are set up via SSH after provisioning. The setup flow:
  1. Cloud-init (automatic): Installs SSH keys, basic packages
  2. Setup commands (setup.commands): Install osmedeus, tools, base data
  3. Post-setup commands (setup.post_commands): Per-worker configuration with template variables

Ansible Alternative

For complex setups, use Ansible instead of SSH commands:

Setup on Existing Machines

Troubleshooting

Workers Not Connecting

Infrastructure Stuck

Cost Exceeded

If cost limits are hit, provisioning is blocked. Adjust limits:

Best Practices

  1. Always set cost limits before running large-scale scans
  2. Use --auto-destroy to avoid forgotten instances accruing charges
  3. Use spot instances for non-critical scans (70-80% savings)
  4. Use --reuse to avoid re-provisioning for iterative work
  5. Start small — test with 1 instance before scaling up
  6. Use custom snapshots with tools pre-installed to cut setup time from 5min to 30s
  7. Check cloud list regularly to verify no orphaned infrastructure