Skip to main content

Welcome to Morph Cloud

Morph Cloud's Infinibranch technology lets you snapshot, branch, and restore entire computational environments in under 250ms. With this technology, you can now parallelize and time travel between VM states, unlocking entirely new patterns for developing, testing, and debugging. The age of linear computing is behind us.

Get early access here!

How are we different?

FeatureTraditional VM InfrastructureInfinibranch
Startup Times2-3 minutes for typical VMs<250ms
CopyingFull clone required, consuming equal resourcesNear-zero overhead branching
BranchingNot natively supportedNative support for unlimited parallel branches
State ManagementManual snapshots and restoresInstant snapshots and restores at any point
Remote DesktopNo built-in supportBuilt-in browser-based access

Quick Start (5 minutes)

Prerequisites

Set up your Morph-enabled environment:

# Python developers
curl -LsSf https://astral.sh/uv/install.sh | sh # Install uv package manager
source ~/.local/bin/env
uv venv && source .venv/bin/activate # Create virtual environment
uv pip install morphcloud # Install SDK

# TypeScript developers
npm install morphcloud

# Set your API key (get it from cloud.morph.so)
export MORPH_API_KEY='your-api-key-here'

Your First Morph Environment

Create a VM that boots in milliseconds and branches efficiently. Choose your preferred language below and save as tutorial.[sh|py|ts]:

# simple_tutorial.py
from morphcloud.api import MorphCloudClient
import sys

def main():
# Set number of instances from args (default: 2)
num_instances = 2
if len(sys.argv) > 1 and sys.argv[1].isdigit():
num_instances = min(int(sys.argv[1]), 5)

client = MorphCloudClient()

print("Creating initial snapshot...")
snapshot = client.snapshots.create(
image_id="morphvm-minimal",
vcpus=1,
memory=128,
disk_size=700
)
print(f"✓ Created snapshot: {snapshot.id}")

print("Starting base instance...")
base_instance = client.instances.start(snapshot.id)
print(f"✓ Started instance: {base_instance.id}")

# Set up HTML content for base instance
print("Setting up web server...")
with base_instance.ssh() as ssh:
# Install Python and tmux
ssh.run("curl -LsSf https://astral.sh/uv/install.sh | sh").raise_on_error()
ssh.run("source ~/.local/bin/env && uv python install").raise_on_error()
ssh.run("apt-get update && apt-get install -y tmux").raise_on_error()

# Create simple HTML file
ssh.run("echo '<html><body style=\"font-family:sans-serif;max-width:800px;margin:40px auto;\">" +
f"<h1>Instance 1 of {num_instances}</h1>" +
"<p>This instance was created with Morph Cloud</p>" +
"</body></html>' > /root/index.html")

# Start simple HTTP server in tmux
ssh.run("tmux new-session -d -s webserver 'uv run python -m http.server 8080 --bind 0.0.0.0 --directory /root'")
print("✓ Server started in tmux session 'webserver'")

base_instance.expose_http_service("web", 8080)
base_url = f"https://web-{base_instance.id.replace('_', '-')}.http.cloud.morph.so"
print(f"✓ Base instance running at: {base_url}")

# Create a snapshot with web server already running
print("\nCreating snapshot of configured instance...")
configured_snapshot = base_instance.snapshot()
print(f"✓ Created snapshot: {configured_snapshot.id}")

# Create additional instances from the snapshot
instances = [base_instance]
for i in range(2, num_instances + 1):
print(f"\nStarting instance {i}...")
instance = client.instances.start(configured_snapshot.id)
print(f"✓ Started instance: {instance.id}")

# Only update the HTML to show different instance number
with instance.ssh() as ssh:
ssh.run("echo '<html><body style=\"font-family:sans-serif;max-width:800px;margin:40px auto;\">" +
f"<h1>Instance {i} of {num_instances}</h1>" +
"<p>This instance was created with Morph Cloud</p>" +
"</body></html>' > /root/index.html")

# The HTTP service is already exposed from the snapshot
url = f"https://web-{instance.id.replace('_', '-')}.http.cloud.morph.so"
instances.append(instance)
print(f"✓ Instance {i} running at: {url}")

# Print summary of all instances
print("\nAll instances are now running! Visit each URL to see they're all unique:")
for i, instance in enumerate(instances, 1):
url = f"https://web-{instance.id.replace('_', '-')}.http.cloud.morph.so"
print(f" Instance {i}: {url}")

print("\nThe instances will remain running until you stop them with:")
for instance in instances:
print(f" morphcloud instance stop {instance.id}")

if __name__ == "__main__":
main()

Then, run the code:

python tutorial.py

Understanding What Happened

In this simple tutorial, you've experienced the core capabilities of Morph Cloud:

  • Created a base VM with minimal configuration
  • Installed Python and set up a web server
  • Created a snapshot that preserves the entire running state
  • Created multiple instances from this snapshot, each starting in under 250ms
  • Customized each instance with its own unique content
  • Exposed HTTP endpoints so you can see each instance running independently

The key innovation here is the Infinibranch snapshot - every byte of memory, every running process, and every system state is preserved perfectly. When you create new instances from this snapshot, they boot almost instantly and have full isolation from each other. This ability to create thousands of perfectly isolated copies instantly enables entirely new development patterns - whether you're running AI agents in parallel, managing deployment environments, or debugging complex system states.

Next Steps

See what Morph Cloud can do:

Real-World Applications

  • CI/CD Debugging: Access the exact state of any failure instantly
  • Agent Development: Enable agents to explore thousands of parallel paths with minimal overhead
  • Development Environments: Create staging environments that mirror production perfectly
  • Testing at Scale: Generate and validate thousands of test cases efficiently

Start Building

Check out our API documentation
Explore our SDKs (PythonTypeScript) and repositories
Read our blog
Follow us on Twitter/X to stay up to date with our latest releases