Why Deploy to the Cloud?
Running Opperator locally is perfect for development and personal automation. But what if you need your agents to run 24/7? What if you want them responding to webhooks, processing data continuously, or monitoring services while your laptop is closed? Cloud deployment solves this. With one command, you can spin up a cloud Opperator instance that runs your agents continuously, independently of your local machine. Use cases for cloud deployment:- 24/7 availability: Agents that need to respond to webhooks or scheduled tasks at any time
- Long-running tasks: Data processing, monitoring, or batch operations that take hours or days
- Team collaboration: Shared agent instances accessible to multiple team members
- Resource-intensive workloads: Offload heavy processing to cloud infrastructure
- Production deployments: Run customer-facing agents with guaranteed uptime
Quick Start
Deploy an Opperator instance to Hetzner cloud:- Naming your cloud daemon
- Providing your Hetzner API key (or using a saved one)
- Selecting server type (CPU, RAM, pricing)
- Choosing datacenter location
- Confirming deployment
- Provisions a cloud server on Hetzner
- Installs Opperator and dependencies
- Configures networking and security
- Connects your local Opperator to the remote instance
- Returns connection details and credentials
Moving an Agent to the Cloud
After deploying your cloud instance, you can move an existing local agent to run 24/7 in the cloud:- Stop the local agent
- Transfer agent code and configuration to the cloud instance
- Sync any secrets the agent needs
- Start the agent on the cloud instance
Prerequisites
Before deploying to the cloud, you’ll need:1. Hetzner Cloud Account
Sign up at Hetzner Cloud if you don’t have an account.2. Hetzner API Token
Create an API token from your Hetzner Cloud Console:- Go to Security → API Tokens
- Click “Generate API Token”
- Give it Read & Write permissions
- Copy the token (you’ll only see it once)
- Enter it during the deployment wizard (it will be saved for future deployments)
- Pre-store it as an Opperator secret:
3. SSH Key (Optional but Recommended)
If you want SSH access to your cloud instance:Deployment Process
Deploy New Cloud Instance
Start the interactive deployment wizard:Step 1: Daemon Name
Enter a name for your cloud daemon (e.g., “production”, “cloud-1”):- Must not contain spaces
- Should be descriptive and memorable
- Will be used to reference this daemon in CLI commands
Step 2: API Key
Enter your Hetzner Cloud API key:- If you’ve saved a key previously, you can press Enter to use it
- Otherwise, paste your Hetzner API token
- The key is securely stored and reused for future deployments
Step 3: Server Type
Choose your VPS size from the available options: Example server types:- cx23 - 2 vCPU, 4 GB RAM, 40 GB SSD - Good for light workloads
- cx33 - 4 vCPU, 8 GB RAM, 80 GB SSD - Balanced performance
- cx43 - 8 vCPU, 16 GB RAM, 160 GB SSD - Heavy workloads
- cx53 - 16 vCPU, 32 GB RAM, 320 GB SSD - High performance
The wizard displays exact pricing and available server types from Hetzner’s API at deployment time. Options and prices may vary by region.
Step 4: Location
Choose the datacenter location:The wizard automatically filters locations to show only those available for your selected server type.
- nbg1 - Nuremberg, Germany
- fsn1 - Falkenstein, Germany
- hel1 - Helsinki, Finland
- ash - Ashburn, Virginia, USA
- hil - Hillsboro, Oregon, USA
Step 5: Confirmation
Review your choices and confirm deployment:What Happens During Deployment
Once you confirm, the deployment process:- Validates credentials - Checks your Hetzner API key
- Provisions server - Creates the VPS in your chosen location (takes ~30-60 seconds)
- Installs Opperator - Downloads and installs the latest stable version
- Configures networking - Sets up firewall and SSH access
- Starts daemon - Launches the Opperator daemon on the remote server
- Registers daemon - Adds the remote daemon to your local Opperator configuration
- Tests connection - Verifies the remote daemon is accessible
After Deployment
Once deployment completes, you’ll receive:- Daemon name - Use this to reference the cloud instance (e.g., “production”)
- IP address - The public IP of your VPS (for SSH access)
- Connection status - Whether the local daemon successfully connected
- Running and accessible from your local TUI
- Ready to host agents
- Connected for secret synchronization
- Available for remote command execution
List Cloud Instances
View all your cloud deployments:To get the IP address for SSH access, use
op daemon list and extract it from the ADDRESS column.Update Cloud Instance
Update Opperator version on cloud instance:Delete Cloud Instance
Remove a cloud instance and all its resources:This permanently deletes the server, all agent data, and configuration. Make sure to backup any important data first.
Managing Cloud Agents
Once you have a cloud instance running, you can manage agents on it just like local agents.Deploy Agent to Cloud
Transfer an existing local agent to the cloud:- Stop the local agent
- Transfer agent code and configuration
- Sync secrets the agent needs
- Start the agent on the cloud instance
Create New Cloud Agent
Create a new agent locally, then move it to the cloud:The
op agent bootstrap command only works locally. After creating an agent, use op agent move to transfer it to a cloud instance.Monitor Cloud Agents
Cloud agents appear in your TUI alongside local agents:Secret Synchronization
Secrets are automatically synced between local and cloud instances when agents need them.How It Works
- Agent on cloud instance requests a secret
- If secret exists locally, it’s securely transferred
- Secret is stored in cloud instance’s system keyring
- Subsequent access uses the cached cloud copy
Security Considerations
- Secrets are encrypted in transit using TLS
- Cloud instances use system keyring (same as local)
- Secrets are never logged or stored in plaintext
- Each cloud instance has isolated secret storage
Multi-Daemon Architecture
Opperator supports running multiple daemons simultaneously. This enables hybrid deployments with agents distributed across local and cloud infrastructure.Daemon Health Checks
View local daemon status:Command Routing
Commands are automatically routed to the appropriate daemon:Cost Management
Estimating Costs
Hetzner cloud pricing is shown in the deployment wizard. Example server configurations:| Server Type | vCPU | RAM | Storage |
|---|---|---|---|
| cx23 | 2 | 4GB | 40GB |
| cx33 | 4 | 8GB | 80GB |
| cx43 | 8 | 16GB | 160GB |
| cx53 | 16 | 32GB | 320GB |
- Traffic: First 20TB typically free, then additional charges apply
- Backups: Optional (not configured by default)
- Snapshots: Optional
The deployment wizard fetches current pricing and available server types from Hetzner’s API. Exact costs are displayed before you confirm deployment and may vary by region.
Cost Optimization Tips
- Right-size your instance: Start with cx23 (the smallest option), scale up only if needed
- Delete unused instances: Use
op cloud destroyfor instances you’re not using - Monitor usage: SSH into cloud instances to check actual resource usage with
htopanddf -h - Share instances: Run multiple agents on one cloud instance when possible
- Use local for development: Keep cloud instances for production only
Stop vs Delete
Currently, Opperator doesn’t support stopping/pausing cloud instances - you can only delete them. If you need temporary deployments:- Delete the instance when not needed
- Redeploy when needed (takes ~2 minutes)
- Use infrastructure-as-code to automate redeployment
SSH Access
Connect via SSH
If you provided an SSH key during deployment:Useful SSH Commands
Manual Configuration
Advanced users can manually configure the cloud instance:Troubleshooting
Connection Issues
Problem: Can’t connect to cloud instanceAgent Won’t Start on Cloud
Problem: Agent starts locally but fails on cloud Common causes:- Missing secrets: Ensure secrets are synced
- Different environment: Cloud instance might lack dependencies
- File paths: Avoid hardcoded absolute paths
High Resource Usage
Problem: Cloud instance using too many resources- Upgrade to larger instance type
- Optimize agent code
- Distribute agents across multiple instances
Deployment Failed
Problem:op cloud deploy fails
Common causes:
- Invalid API token: Verify your Hetzner API key
- Region availability: Some server types aren’t available in all regions
- Network issues: Check internet connection
Best Practices
Development Workflow
- Develop locally: Build and test agents on your machine (see Building Your First Agent)
- Test in isolation: Ensure agents work with synced secrets
- Deploy to cloud: Move stable agents to cloud for 24/7 operation
- Monitor: Watch logs and metrics in production
- Iterate: Update cloud agents with
op cloud update
Security
- Rotate secrets: Regularly update API keys and credentials
- Limit SSH access: Use SSH keys, disable password authentication
- Monitor logs: Watch for suspicious activity
- Use firewall: Hetzner provides built-in firewall rules
- Separate environments: Use different instances for dev/staging/prod
Reliability
- Enable auto-restart: Set
auto_restart: truein agents.yaml - Monitor health: Regularly check
op daemon status - Set up alerts: Use external monitoring (UptimeRobot, Healthchecks.io)
- Backup configuration: Keep agents.yaml and agent code in git
- Document setup: Maintain deployment runbook for your team
Resource Management
- Start small: Use cx23 until you need more
- Monitor metrics: SSH into instances regularly to check resource usage
- Clean up logs: Implement log rotation
- Archive old data: Move completed tasks out of active database
- Scale horizontally: Use multiple small instances instead of one large one
Advanced: Custom Cloud Providers
Currently, Opperator supports Hetzner out of the box. Support for other cloud providers (AWS, GCP, Azure, DigitalOcean) is planned.Manual Daemon Connection
You can manually provision a server on any cloud provider and connect it to your local Opperator: Step 1: Provision and Install- Create a Linux server (Ubuntu 22.04+ recommended)
- Install Opperator on the server
- Start the Opperator daemon
- Configure firewall to allow TCP connections on Opperator’s port
op daemon add to manually register a remote daemon:
op agent move to transfer agents to the remote daemon: