A comprehensive, real-time system for managing distributed Doh instances through a unified web dashboard. Cloud Manager enables remote administration, file synchronization, database backup orchestration, Git repository management, SSL certificate monitoring, reverse proxy configuration, and direct SSH terminal access across multiple cloud-connected Doh deployments.
Cloud Manager transforms individual Doh instances into a connected, event-driven ecosystem where you can:
Think of it as your mission control for distributed Doh deployments, built on a secure, modern, and event-driven architecture.
Each connected Doh deployment appears as an "instance" in Cloud Manager. Instances maintain persistent connections via WebSocket and can be controlled remotely. Instances can be owned or shared, with ownership and permissions clearly displayed in the UI.
A Cloud Manager is not a special type of server; it is simply a standard Doh instance with the cloud_manager module installed. This provides incredible flexibility:
Any instance owner can share access with other users—either to specific instances or all their instances at once. Shares can have custom permissions (e.g., read-only, command execution) and optional expiration dates.
Smart bidirectional sync between instances with server-side comparison, conflict detection, and progress tracking. Options include:
Cloud Manager provides multiple ways to manage instances remotely:
Cloud Manager implements the Model Context Protocol (MCP), enabling AI assistants and LLMs to securely interact with managed instances. When you use AI coding tools like Claude Code, Cursor, or other MCP-compatible editors, Cloud Manager exposes your instances as controllable resources—allowing AI to list instances, read logs, execute commands, sync files, and manage deployments on your behalf.
Important: Instances must explicitly opt-in by setting mcp_controllable: true in their configuration. Only instances with this flag can be controlled via MCP.
Cloud Manager can act as a reverse proxy for managed instances, creating HTTPS servers that forward HTTP and Socket.IO traffic over the secure WebSocket connection. This allows external access to instances without direct network exposure.
Step 1: Install the Cloud Manager Module
On the Doh instance you want to designate as your Cloud Manager, run:
doh install cloud cloud_manager
Step 2: Create a Superadmin User
A Cloud Manager needs at least one user account to own and manage instances:
doh poduser
Follow the prompts to create a superadmin user. This user will be able to log in to the Cloud Manager and anchor other instances to their account.
Step 3: Start Your Manager
doh run
Ensure this instance is accessible over the network from any other instances you plan to connect.
From any other Doh instance you want to manage:
doh cloud anchor http://your-cloud-manager-url.com
This command will prompt for the username and password you created in Part 1. Your credentials are used only once to get a secure token and are never stored on the client instance.
Once anchored, the instance will appear on your Cloud Manager's dashboard at /admin/cloud.
The Cloud Manager dashboard at /admin/cloud is a centralized UI for all management tasks. It features a responsive, event-driven interface that updates in real-time without polling.
| Tab | Description |
|---|---|
| Instances | Main overview of all owned and shared instances. Monitor status, view system information, and access quick actions |
| File Sync | Dual-pane file browser for comparing and syncing files between instances. Manage pins and mirrors |
| Git | Discover and manage Git repositories. View status, stage/commit files, manage branches, push and pull |
| SSH | Full-featured, low-latency SSH terminal to any connected instance |
| Logs | View real-time logs from instances directly within the dashboard |
| Shares | Manage who has access to your instances. Create, view, and revoke shares |
| Pods | Inspect the pod.yaml configuration files of connected instances |
| Proxies | View and manage reverse proxy states. Pause and resume external access |
| DB Backup | Create, restore, and schedule database backups. Configure cross-instance backup mirroring |
| SSL | Monitor SSL certificate status and configure auto-renewal schedules |
| Redbird | Manage Redbird reverse proxy sites and configurations |
| uNET | Visualize uNET network topology and node connections |
update, restart, and upgradeThe File Sync tab provides a modern, efficient synchronization system with server-side comparison and cross-platform compatibility.
For ongoing synchronization, save a sync configuration as an "Active Mirror". The dashboard shows the mirror's status (in sync, needs sync, stale) and allows one-click re-sync.
Pull Mirrors work in the opposite direction—the destination instance pulls changes from a source. Useful when the destination needs to control when updates are applied.
Configure automated sync operations at regular intervals:
| Interval | Description |
|---|---|
| 1m, 5m, 30m | Minutes |
| 1h, 3h, 6h, 12h | Hours |
| 1d, 7d | Days |
| 1mo, 1y | Month/Year |
The scheduler checks mirrors every 60 seconds and executes sync when due.
Save location bookmarks for quick navigation between frequently-used paths across instances. Pins store both left and right pane positions for instant dual-pane restoration.
node_modules/**, .doh/**)The DB Backup tab provides comprehensive database backup, restore, and replication capabilities.
Configure cross-instance backup replication:
Configure automated backups with preset intervals (1m to 1y). The scheduler:
Cloud Manager provides a fully functional, browser-based SSH terminal compatible with both Bun and Node.js runtimes.
Navigate to the SSH tab, or click the "Terminal" button on any instance card. A terminal window opens with direct shell access to the instance.
The terminal uses the script command on Unix-like systems to allocate a proper pseudo-terminal (PTY). This ensures the shell runs in interactive mode with a visible prompt and full terminal feature support.
SIGWINCH handlingcd ~, doh update, etc.)The Git tab provides a comprehensive UI for managing Git repositories on any connected instance.
The SSL tab monitors SSL certificates across instances and provides auto-renewal scheduling.
Configure automatic certificate renewal checks:
All SSL operations are logged with:
Cloud Manager can act as a reverse proxy for managed instances, allowing external access to instances behind firewalls or NAT.
When an instance connects with reverse proxy enabled:
external_portOn the Cloud Manager (ensure SSL certificates are configured):
express_config:
ssl_info:
key: '/path/to/private.key'
cert: '/path/to/certificate.crt'
On the Managed Instance:
cloud:
endpoint: 'https://your-cloud-manager.com'
reverse_proxy:
enabled: true
external_port: 4443
The Proxies tab displays all active reverse proxies with controls to:
Proxy states persist across Cloud Manager restarts (stored in /.doh/static/cloud_proxies.yaml).
The Redbird tab manages Redbird reverse proxy configurations on instances that have Redbird installed.
The Shares tab allows secure sharing of instance access with other users.
| Type | Description |
|---|---|
| Instance-Specific | Share access to one particular instance |
| Global | Share access to ALL your current and future instances |
Shares can grant specific permissions:
read:cloud_instance - View instance status and informationcommand:cloud_instance - Execute commands on the instanceupdate:cloud_instance - Manage instance settings and filesIf no permissions are specified, the sharee inherits the owner's full permissions.
Shares can be configured with optional expiration dates for time-limited access.
When you share an instance, the sharee sees it in their dashboard under "Shared with Me". All Cloud Manager features (Git, SSH, File Sync, etc.) respect sharing permissions.
# boot.pod.yaml or pod.yaml
cloud_manager:
auth_required: true # Require authentication for dashboard
session_timeout: 3600000 # Session timeout in ms (1 hour)
max_instances_per_user: 10 # Maximum instances per user
command_timeout: 30000 # Default command timeout in ms (30 seconds)
heartbeat_timeout: 120000 # Instance heartbeat timeout in ms (2 minutes)
jwt_secret: 'your-secret' # JWT signing secret (required for production)
# SSL configuration for reverse proxy
express_config:
ssl_info:
key: '/path/to/private.key'
cert: '/path/to/certificate.crt'
# boot.pod.yaml or pod.yaml
cloud:
endpoint: 'https://your-cloud-manager.com'
mcp_controllable: true # Allow AI assistants to control this instance
# Optional: Enable reverse proxy
reverse_proxy:
enabled: true
external_port: 4443 # Unique port for this instance
Instance connections are secured using JSON Web Tokens (JWT):
siteAuthToken generated during anchor processAccess control is dynamically evaluated against the action being performed and the specific object being acted upon. This enables:
The dashboard uses WebSocket connections for real-time updates:
All persistent data (shares, mirrors, schedules, pins) stored in database tables ensuring data integrity across sessions and restarts.
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/cloud/instances |
List all accessible instances |
| POST | /api/cloud/instances/refresh |
Force verification sweep |
| GET | /api/cloud/instance/:id/status |
Get instance status |
| POST | /api/cloud/instance/:id/command |
Execute command on instance |
| POST | /api/cloud/instance/:id/disconnect |
Disconnect instance |
| GET | /api/cloud/instance/:id/info |
Get detailed instance info |
| GET | /api/cloud/instance/:id/folders |
List project folders |
| POST | /api/cloud/instance/:id/browse |
Browse filesystem |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/cloud/instance/:id/transfer/start |
Start chunked transfer |
| GET | /api/cloud/instance/:id/transfer/:tid/status |
Get transfer status |
| POST | /api/cloud/instance/:id/transfer/:tid/cancel |
Cancel transfer |
| POST | /api/cloud/sync/compare-cross-instance |
Compare two instances |
| POST | /api/cloud/sync/execute-from-comparison |
Execute sync from comparison |
| POST | /api/cloud/sync/cross-instance |
Direct cross-instance sync |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/cloud/mirrors/list |
List active mirrors |
| POST | /api/cloud/mirrors/save |
Create/update mirror |
| POST | /api/cloud/mirrors/delete |
Delete mirror |
| POST | /api/cloud/mirrors/sync |
Execute mirror sync |
| POST | /api/cloud/mirrors/check |
Check mirror status |
| GET | /api/cloud/pulls/list |
List pull mirrors |
| POST | /api/cloud/pulls/save |
Create/update pull mirror |
| POST | /api/cloud/pulls/delete |
Delete pull mirror |
| POST | /api/cloud/pulls/sync |
Execute pull sync |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/cloud/pins/list |
List saved pins |
| POST | /api/cloud/pins/save |
Create/update pin |
| POST | /api/cloud/pins/delete |
Delete pin |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/cloud/shares/list |
List shares |
| POST | /api/cloud/shares/save |
Create/update share |
| POST | /api/cloud/shares/delete |
Delete share |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/cloud/ssl/operations |
Log SSL operation |
| GET | /api/cloud/ssl/status |
Get SSL status cache |
| GET | /api/cloud/ssl/schedules |
List SSL schedules |
| POST | /api/cloud/ssl/schedules/save |
Create schedule |
| POST | /api/cloud/ssl/schedules/delete |
Delete schedule |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/cloud/redbird/instances |
List Redbird instances |
| GET | /api/cloud/redbird/:id/status |
Get proxy status |
| GET | /api/cloud/redbird/:id/sites |
List proxy sites |
| POST | /api/cloud/redbird/:id/sites |
Create/update site |
| POST | /api/cloud/redbird/:id/sites/delete |
Delete site |
| POST | /api/cloud/redbird/:id/reload |
Reload configuration |
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/cloud/proxies/list |
List all proxies |
| POST | /api/cloud/proxies/:id/toggle |
Pause/activate proxy |
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/cloud/request-anchor-token |
Get site auth token |
| POST | /api/cloud/request-anchor-token-as |
Get token for another user (admin) |
| Event | Direction | Description |
|---|---|---|
cloud:instance-update |
Server → Client | Instance list/status changes |
cloud:sync-activity |
Server → Client | Sync operation progress |
cloud:command-progress |
Server → Client | Command execution progress |
| Event | Direction | Description |
|---|---|---|
tty_data |
Bidirectional | Terminal input/output data |
tty_exit |
Server → Client | Terminal session ended |
| Event | Direction | Description |
|---|---|---|
cloud:authenticate |
Instance → Manager | Register instance connection |
ping |
Bidirectional | Heartbeat with health metrics |
status_update |
Instance → Manager | Instance status change |
backup_created |
Instance → Manager | New backup notification |
backup_deleted |
Instance → Manager | Backup deletion notification |
The Model Context Protocol enables AI assistants to interact with Cloud Manager programmatically. MCP-compatible tools (Claude Code, Cursor, etc.) connect via a dedicated Socket.IO namespace (/mcp) and can then control instances using the authenticated user's permissions.
How It Works:
/mcp namespacesiteAuthTokenmcp_controllable: trueNote: Only instances that have opted-in with mcp_controllable: true will appear in MCP command results.
socket.emit('mcp:authenticate', {
siteAuthToken: '<jwt>',
connectionType: 'mcp_client'
}, callback);
These commands are what AI assistants use to interact with your instances:
| Command | Description |
|---|---|
mcp:list_user_instances |
List all instances the user can access |
mcp:get_logs |
Retrieve instance logs for debugging |
mcp:restart_instance |
Restart an instance |
mcp:run_command |
Execute shell commands on instances |
mcp:get_status |
Get detailed instance health/status |
mcp:sync_files |
Upload or download files to/from instances |
mcp:cross_instance_sync_files |
Sync files between two instances |
mcp:compare_files_cross_instance |
Compare files across instances |
mcp:execute_sync_from_comparison |
Execute sync based on comparison results |
Cloud Manager automatically creates and manages the following tables.
cloud_sharesCREATE TABLE cloud_shares (
id TEXT PRIMARY KEY,
sharerId TEXT NOT NULL,
shareeId TEXT NOT NULL,
instanceId TEXT, -- NULL for global shares
permissions TEXT, -- JSON array or NULL for all
description TEXT,
createdTimestamp TEXT NOT NULL,
expiresTimestamp TEXT,
isEnabled INTEGER DEFAULT 1
);
active_mirrorsCREATE TABLE active_mirrors (
id TEXT PRIMARY KEY,
userId TEXT NOT NULL,
sourceInstanceId TEXT NOT NULL,
destinationInstanceId TEXT NOT NULL,
sourcePath TEXT NOT NULL,
targetPath TEXT NOT NULL,
type TEXT NOT NULL, -- 'File' or 'Folder'
description TEXT,
createdTimestamp TEXT NOT NULL,
lastCheckTimestamp TEXT,
lastSyncTimestamp TEXT,
needsSync INTEGER, -- 0 for false, 1 for true
isEnabled INTEGER DEFAULT 1
);
pull_mirrorsCREATE TABLE pull_mirrors (
id TEXT PRIMARY KEY,
userId TEXT NOT NULL,
sourceInstanceId TEXT NOT NULL,
destinationInstanceId TEXT NOT NULL,
path TEXT NOT NULL,
type TEXT NOT NULL,
description TEXT,
createdTimestamp TEXT,
lastCheckTimestamp TEXT,
lastSyncTimestamp TEXT,
needsSync INTEGER,
isEnabled INTEGER DEFAULT 1
);
pinsCREATE TABLE pins (
id TEXT PRIMARY KEY,
userId TEXT NOT NULL,
name TEXT NOT NULL,
description TEXT,
leftInstanceId TEXT,
rightInstanceId TEXT,
leftPath TEXT,
rightPath TEXT,
createdTimestamp TEXT
);
ssl_operationsCREATE TABLE ssl_operations (
id TEXT PRIMARY KEY,
userId TEXT,
instanceId TEXT,
hostname TEXT,
operation TEXT,
status TEXT,
timestamp TEXT
);
ssl_statusCREATE TABLE ssl_status (
id TEXT PRIMARY KEY,
instanceId TEXT,
hostname TEXT,
port INTEGER,
certStatus TEXT,
certMtime TEXT,
lastUpdated TEXT
);
ssl_schedulesCREATE TABLE ssl_schedules (
id TEXT PRIMARY KEY,
instanceId TEXT,
hostname TEXT,
scheduleMode TEXT,
interval TEXT,
enabled INTEGER DEFAULT 1,
lastCheckTimestamp TEXT
);
redbird_operationsCREATE TABLE redbird_operations (
id TEXT PRIMARY KEY,
userId TEXT,
instanceId TEXT,
operation TEXT,
status TEXT,
timestamp TEXT
);
redbird_statusCREATE TABLE redbird_status (
id TEXT PRIMARY KEY,
instanceId TEXT,
configStatus TEXT,
lastUpdated TEXT
);
backup_schedulesCREATE TABLE backup_schedules (
id TEXT PRIMARY KEY,
userId TEXT,
instanceId TEXT,
database TEXT,
scheduleMode TEXT,
interval TEXT,
retentionMode TEXT,
retentionCount INTEGER,
enabled INTEGER DEFAULT 1,
lastBackupTimestamp TEXT
);
backup_mirror_destinationsCREATE TABLE backup_mirror_destinations (
id TEXT PRIMARY KEY,
userId TEXT,
sourceInstanceId TEXT,
sourceDatabase TEXT,
destinationInstanceId TEXT,
enabled INTEGER DEFAULT 1
);
backup_mirror_historyCREATE TABLE backup_mirror_history (
id TEXT PRIMARY KEY,
mirrorId TEXT,
backupId TEXT,
status TEXT,
timestamp TEXT
);