How tonioot/cloudbase works
Cloudbase is a self-hosted deployment and operations panel for running Docker applications and managed databases across a primary server and remote nodes. The main workflow is: an operator configures an app in the panel, the API coordinates repository builds and instance placement, node agents reconcile desired state, and NGINX routes visitors to healthy instances. Separate branches cover databases and backups, scheduled jobs, node networking, and operations such as metrics and notifications. The README supports the high-level workflow; source excerpts and the index support only selected internal calls, so unsampled relationships are omitted.
Main entry points: runtime.py Instance runtime · applications Application routes · deployments.py Deploy and rollout · databases Database routes
Components 24
Panel and API
- Web panel
frontend/js/app.js - HTTP API
backend/main.py - Auth and permissions
backend/core/auth.py - Application routes
backend/routers/applications
Application runtime
- App configuration
backend/core/models.py - Repository builds
backend/apps/git.py - Deploy and rollout
backend/apps/deployments.py - Instance runtime
backend/apps/runtime.py - Docker containers
backend/containers/client.py - Cron scheduler
backend/cron/scheduler.py
Nodes and networking
- Traffic routing
backend/nginx/files.py - Node registry
backend/nodes/registry.py - Desired workloads
backend/nodes/desired.py - Node agent
backend/agent/loop.py - Private node mesh
backend/mesh/hub.py
Databases and backups
- Database routes
backend/routers/databases - Database engines
backend/dbs/engines.py - Database containers
backend/dbs/docker.py - Database backups
backend/dbs/backups.py
Operations
- Metrics and logs
backend/workers/stats.py - Notifications
backend/notify/dispatch.py - Export and import
backend/transfer/full.py
Other components
- Operator
- App visitor
Connections 28
- Operator → Web panel: manages
- Web panel → HTTP API: calls API
- HTTP API → Application routes: registers routes
backend/main.py - Application routes → Auth and permissions: checks permissions
backend/routers/applications/webhook.py - Application routes → App configuration: configures apps
- Application routes → Deploy and rollout: requests deploy
- Deploy and rollout → Repository builds: builds source
- Repository builds → Docker containers: builds image
backend/apps/git.py - Deploy and rollout → Instance runtime: coordinates instances
- Instance runtime → Node registry: uses node registry
backend/apps/runtime.py - Instance runtime → Repository builds: ensures source
backend/apps/runtime.py - Instance runtime → Traffic routing: syncs routing
backend/apps/runtime.py - Instance runtime → Desired workloads: sets workloads
backend/apps/runtime.py - Node agent → Desired workloads: reconciles desired state
- Node agent → Docker containers: matches Docker state
- App visitor → Traffic routing: requests app
- Traffic routing → Instance runtime: routes to healthy instances
- Node registry → Private node mesh: joins private network
- Operator → Database routes: manages databases
- Database routes → Database engines: selects engine
- Database routes → Database containers: manages database
- Database containers → Database engines: uses engine configuration
backend/dbs/docker.py - Operator → Database backups: backs up data
- Operator → Cron scheduler: configures schedules
- Cron scheduler → Docker containers: runs job containers
backend/cron/scheduler.py - Operator → Metrics and logs: observes fleet
- Operator → Notifications: configures alerts
- Operator → Export and import: exports or imports