syncloud

module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2026 License: Apache-2.0

README

SynCloud

Your own cloud on your own servers.
Deploy containers, databases and Git apps across a fleet of Linux machines, from one dashboard.

Release CI


SynCloud turns a handful of Linux servers into a small, self-hosted platform, somewhere between Heroku and AWS. You install one controller, join as many nodes as you like, and get:

  • Apps from an image or a Git repository, with HTTPS addresses, custom domains, rolling deploys, rollbacks and migrations that run before each release.
  • Managed PostgreSQL and Valkey (Redis) with replicas, automatic failover, autoscaling, backups and point-in-time restore.
  • A private network between every node (WireGuard), with security groups between containers and a managed host firewall.
  • Metrics, logs, alerts and traffic insights for every service, built in.
  • Teams and access control with IAM users, groups, roles and policies, audited.
  • One binary per role. The controller keeps its state in SQLite and backs itself up, encrypted, to S3. There is no etcd or Kubernetes to run.

Install

On a fresh Ubuntu 22.04+ or Debian 12+ server with ports 80 and 443 open:

curl -fsSL https://github.com/ridoysheikh/syncloud/releases/latest/download/install.sh | sudo bash

When it finishes, it prints the dashboard URL, a one-time setup token and your recovery key. Open the URL, create the admin account, and you're ready to deploy.

The installation guide covers the options, such as your own domain, a specific version or an air-gapped host.

Deploy something

In the dashboard, open Projects → New project, then New service. Alternatively, use the CLI:

synctl projects create shop
synctl services run web -p shop --image nginx:1.27 --port 80 --replicas 2

A minute later the service answers on its own HTTPS address. Your first app walks through images, Git builds, variables and domains.

How it works

               ┌──────────────────────────── controller ───────────────────────────┐
  browser ───▶ │  dashboard + API · scheduler · SQLite · Traefik · registry ·      │
  synctl  ───▶ │  BuildKit · VictoriaMetrics · VictoriaLogs                        │
               └──────────────┬────────────────────────────────────────────────────┘
                              │ mTLS gRPC (agents dial out)
            ┌─────────────────┼─────────────────┐
         ┌──▼───┐          ┌──▼───┐          ┌──▼───┐
         │agent │──────────│agent │──────────│agent │   WireGuard mesh between nodes,
         │Docker│          │Docker│          │Docker│   host firewall on each node
         └──────┘          └──────┘          └──────┘
  • Controller: holds the desired state, schedules tasks, and serves the dashboard and the API.
  • Agents: run the containers in Docker on each node and report back.
  • Traefik: routes public traffic to healthy tasks over the private network, with certificates from Let's Encrypt.

Architecture explains the design in more depth.

Documentation

Start at the documentation map: it routes you to the page you need, by task.

Get started Requirements · Install · First app · Add nodes · The CLI
Build and run apps Services · Deployments and rollbacks · Release commands and jobs · Git builds · Domains and ports · Scaling
Data PostgreSQL · Valkey · S3 storage
Observe and secure Monitoring and alerts · Access control · Network security
Operate Upgrades · Backup and restore · Nodes and pools · Troubleshooting
Reference synctl · API · Configuration

Status

SynCloud is young: v0.x. It runs real clusters in our tests, from three small VMs up to a 50-node load test, but expect rough edges and breaking changes between minor versions until 1.0. Back up the controller (how), and read the changelog before upgrading.

Contributing

Bug reports, ideas and pull requests are welcome. CONTRIBUTING.md explains how to build it, run the tests and send a change. Please report security issues privately, as described in SECURITY.md.

License

Apache License 2.0.

Directories

Path Synopsis
cmd
agent command
Command syncloud-agent runs on every node (§6).
Command syncloud-agent runs on every node (§6).
controller command
Command syncloud-controller runs the SynCloud control plane.
Command syncloud-controller runs the SynCloud control plane.
synctl command
Command synctl is the SynCloud command line.
Command synctl is the SynCloud command line.
internal
agent
Package agent is syncloud-agent: it joins a node to the controller and keeps one outbound mTLS gRPC stream open for heartbeats and (later) commands (§6).
Package agent is syncloud-agent: it joins a node to the controller and keeps one outbound mTLS gRPC stream open for heartbeats and (later) commands (§6).
agent/dnssrv
Package dnssrv is the agent's DNS server for tasks (§8.1).
Package dnssrv is the agent's DNS server for tasks (§8.1).
agent/docker
Package docker is a minimal Docker Engine API client over the local unix socket: only what the agent needs.
Package docker is a minimal Docker Engine API client over the local unix socket: only what the agent needs.
agent/netcfg
Package netcfg applies the controller's mesh configuration on a node (§8): the WireGuard interface and peers, routes for container subnets, the Docker network "syncloud" with the node's subnet, and the nftables rules that keep container traffic un-NATed inside the mesh and masqueraded to the internet.
Package netcfg applies the controller's mesh configuration on a node (§8): the WireGuard interface and peers, routes for container subnets, the Docker network "syncloud" with the node's subnet, and the nftables rules that keep container traffic un-NATed inside the mesh and masqueraded to the internet.
agent/sysinfo
Package sysinfo reads node facts and metrics for heartbeats (§6.2).
Package sysinfo reads node facts and metrics for heartbeats (§6.2).
agentgw
Package agentgw is the controller's gRPC endpoint for agents (§12).
Package agentgw is the controller's gRPC endpoint for agents (§12).
alerts
Package alerts evaluates alert rules (§9) every 30 seconds and notifies channels when an alert fires and when it resolves.
Package alerts evaluates alert rules (§9) every 30 seconds and notifies channels when an alert fires and when it resolves.
api
Package api is the controller's public HTTP API (§5.1).
Package api is the controller's public HTTP API (§5.1).
auth
Package auth holds credential primitives: password hashing, random tokens and the one-time setup token.
Package auth holds credential primitives: password hashing, random tokens and the one-time setup token.
autoscale
Package autoscale is target tracking for services (§5.5): every 15s it reads each policy's metric from VictoriaMetrics and moves the desired task count towards the number that brings the metric back to its target, quickly out and conservatively in.
Package autoscale is target tracking for services (§5.5): every 15s it reads each policy's metric from VictoriaMetrics and moves the desired task count towards the number that brings the metric back to its target, quickly out and conservatively in.
backup
Package backup makes encrypted backups of the controller (§13) and ships them to S3.
Package backup makes encrypted backups of the controller (§13) and ships them to S3.
builds
Package builds turns Git commits into images and deployments (§5.8): it polls Git sources (and reacts to webhooks), builds each new commit once with BuildKit as a privileged job run, pushes the image to the private registry and, with auto-deploy, rolls it out as a new revision.
Package builds turns Git commits into images and deployments (§5.8): it polls Git sources (and reacts to webhooks), builds each new commit once with BuildKit as a privileged job run, pushes the image to the private registry and, with auto-deploy, rolls it out as a new revision.
certs
Package certs keeps a TLS certificate for every public hostname (§5.0.2).
Package certs keeps a TLS certificate for every public hostname (§5.0.2).
cli
Package cli implements synctl, the SynCloud command line (§7.1).
Package cli implements synctl, the SynCloud command line (§7.1).
client
Package client is the Go client for the SynCloud API, used by synctl (and published as the Go SDK later, §7.1).
Package client is the Go client for the SynCloud API, used by synctl (and published as the Go SDK later, §7.1).
cloud
Package cloud creates and deletes servers through cloud provider APIs for provider-backed node pools (§6.5).
Package cloud creates and deletes servers through cloud provider APIs for provider-backed node pools (§6.5).
config
Package config loads controller settings from flags and SYNCLOUD_* environment variables.
Package config loads controller settings from flags and SYNCLOUD_* environment variables.
dbs
Package dbs runs managed databases (Phase 12): dedicated data members pinned to nodes with node-local volumes, internal and public endpoints, an access list per database, and metrics.
Package dbs runs managed databases (Phase 12): dedicated data members pinned to nodes with node-local volumes, internal and public endpoints, an access list per database, and metrics.
discovery
Package discovery publishes the service directory to every node (§8.1, §8.6): stable service VIPs with their backends, and internal DNS records.
Package discovery publishes the service directory to every node (§8.1, §8.6): stable service VIPs with their backends, and internal DNS records.
domain
Package domain handles the platform's base domain (§5.0.2): public IP detection, sslip.io/nip.io names and the hostnames derived from the base.
Package domain handles the platform's base domain (§5.0.2): public IP detection, sslip.io/nip.io names and the hostnames derived from the base.
edge
Package edge runs Traefik replicas on edge nodes (§8.5): nodes of edge pools serve public traffic with the routes and certificates the controller serves them over the private network, and keep serving with the last configuration when the controller is down.
Package edge runs Traefik replicas on edge nodes (§8.5): nodes of edge pools serve public traffic with the routes and certificates the controller serves them over the private network, and keep serving with the last configuration when the controller is down.
events
Package events is the controller's in-process event bus (replaces Postgres LISTEN/NOTIFY, D5).
Package events is the controller's in-process event bus (replaces Postgres LISTEN/NOTIFY, D5).
execrelay
Package execrelay connects interactive exec clients (dashboard terminal, synctl exec) to sessions on agents, multiplexed on the agent stream.
Package execrelay connects interactive exec clients (dashboard terminal, synctl exec) to sessions on agents, multiplexed on the agent stream.
firewall
Package firewall validates host firewall rules and renders the agent's nftables table (§8.3).
Package firewall validates host firewall rules and renders the agent's nftables table (§8.3).
fwstats
Package fwstats collects firewall visibility from agent heartbeats (§8.3): per-rule hit counters, dropped connection attempts (the drop log) and nodes where security groups cannot be enforced.
Package fwstats collects firewall visibility from agent heartbeats (§8.3): per-rule hit counters, dropped connection attempts (the drop log) and nodes where security groups cannot be enforced.
gc
Package gc removes what the platform no longer needs (Phase 9): history past its retention, and old upgrade directories (binaries and database snapshots of finished upgrades).
Package gc removes what the platform no longer needs (Phase 9): history past its retention, and old upgrade directories (binaries and database snapshots of finished upgrades).
gitconn
Package gitconn keeps the cluster's Git provider connections (§5.8): GitHub Apps created from a manifest in one click, and access tokens for GitHub, GitLab and Gitea/Forgejo.
Package gitconn keeps the cluster's Git provider connections (§5.8): GitHub Apps created from a manifest in one click, and access tokens for GitHub, GitLab and Gitea/Forgejo.
gitprovider
Package gitprovider talks to Git hosting APIs (§5.8): GitHub (as a GitHub App or with a token), GitLab and Gitea/Forgejo.
Package gitprovider talks to Git hosting APIs (§5.8): GitHub (as a GitHub App or with a token), GitLab and Gitea/Forgejo.
gitremote
Package gitremote reads a remote repository's refs over HTTPS (§5.8 polling): the equivalent of `git ls-remote`, without a git binary or a clone.
Package gitremote reads a remote repository's refs over HTTPS (§5.8 polling): the equivalent of `git ls-remote`, without a git binary or a clone.
gitserver
Package gitserver runs the optional built-in Git server (§5.8): Forgejo as a system task on the controller node, served at git.<base-domain>.
Package gitserver runs the optional built-in Git server (§5.8): Forgejo as a system task on the controller node, served at git.<base-domain>.
health
Package health is the controller's central health layer (§5.6): it checks every routed service end to end through Traefik, derives service health from task state and those checks, records uptime, and opens and closes incidents.
Package health is the controller's central health layer (§5.6): it checks every routed service end to end through Traefik, derives service health from task state and those checks, records uptime, and opens and closes incidents.
iam
Package iam evaluates AWS-style JSON policies (§7): statements allow or deny actions ("service:ScaleService") on resources ("srn:syncloud:project/shop/env/production/service/web"), with optional conditions.
Package iam evaluates AWS-style JSON policies (§7): statements allow or deny actions ("service:ScaleService") on resources ("srn:syncloud:project/shop/env/production/service/web"), with optional conditions.
jobs
Package jobs runs tasks to completion (§5.11): one-off runs, scheduled (cron) jobs and pre-/post-deploy hooks.
Package jobs runs tasks to completion (§5.11): one-off runs, scheduled (cron) jobs and pre-/post-deploy hooks.
logs
Package logs collects container output from agents into VictoriaLogs and serves queries and live tails (§9.2).
Package logs collects container output from agents into VictoriaLogs and serves queries and live tails (§9.2).
mesh
Package mesh runs the controller side of private networking (§8): it allocates each node a WireGuard address and a container subnet (IPAM, §8.2) and sends every agent its view of the full mesh.
Package mesh runs the controller side of private networking (§8): it allocates each node a WireGuard address and a container subnet (IPAM, §8.2) and sends every agent its view of the full mesh.
metrics
Package metrics stores task resource samples from the agents in VictoriaMetrics and reads them back for the dashboard (§9.1).
Package metrics stores task resource samples from the agents in VictoriaMetrics and reads them back for the dashboard (§9.1).
nodepool
Package nodepool manages node pools and the cluster autoscaler (§6.5): provider-backed pools create servers that join with cloud-init, grow when tasks cannot be placed or capacity runs low, and shrink by draining and deleting underused nodes.
Package nodepool manages node pools and the cluster autoscaler (§6.5): provider-backed pools create servers that join with cloud-init, grow when tasks cannot be placed or capacity runs low, and shrink by draining and deleting underused nodes.
nodes
Package nodes tracks live node state (§5.6).
Package nodes tracks live node state (§5.6).
pki
Package pki is the controller's internal certificate authority (§6.1, §14).
Package pki is the controller's internal certificate authority (§6.1, §14).
quota
Package quota enforces per-project quotas at admission and meters usage (§7.2).
Package quota enforces per-project quotas at admission and meters usage (§7.2).
registry
Package registry issues tokens for the private Docker registry (§5.9) using the Docker registry token protocol: clients get a short-lived ES256 JWT from the controller, and the registry verifies it against the issuer certificate.
Package registry issues tokens for the private Docker registry (§5.9) using the Docker registry token protocol: clients get a short-lived ES256 JWT from the controller, and the registry verifies it against the issuer certificate.
regmaint
Package regmaint keeps the private registry tidy (§5.10): it applies repository lifecycle policies and then runs registry garbage collection, on a schedule or on demand, and logs every run.
Package regmaint keeps the private registry tidy (§5.10): it applies repository lifecycle policies and then runs registry garbage collection, on a schedule or on demand, and logs every run.
s3
Package s3 manages S3 endpoints, service bindings and the bucket browser (§16).
Package s3 manages S3 endpoints, service bindings and the bucket browser (§16).
secgroup
Package secgroup implements security groups (§8.3): AWS-style allow rules between containers, attached to services.
Package secgroup implements security groups (§8.3): AWS-style allow rules between containers, attached to services.
secrets
Package secrets encrypts values at rest with the controller's master key (AES-256-GCM, §14).
Package secrets encrypts values at rest with the controller's master key (AES-256-GCM, §14).
shell
Package shell runs Cloud Shell (§7.1): a short-lived container per user on the controller node, with synctl authenticated as that user through temporary credentials.
Package shell runs Cloud Shell (§7.1): a short-lived container per user on the controller node, with synctl authenticated as that user through temporary credentials.
sigv
Package sigv implements SynCloud access-key request signing (§7.1), shared by the controller (verify) and synctl/SDKs (sign).
Package sigv implements SynCloud access-key request signing (§7.1), shared by the controller (verify) and synctl/SDKs (sign).
store
Package store owns the controller's SQLite database (D5).
Package store owns the controller's SQLite database (D5).
sysimage
Package sysimage loads the platform images a release carries (the managed PostgreSQL images) into the built-in registry the first time something needs them.
Package sysimage loads the platform images a release carries (the managed PostgreSQL images) into the built-in registry the first time something needs them.
system
Package system runs the platform's own components as system tasks on the controller node (D20, §5.0): Traefik, VictoriaMetrics, VictoriaLogs, and (next) the registry and BuildKit.
Package system runs the platform's own components as system tasks on the controller node (D20, §5.0): Traefik, VictoriaMetrics, VictoriaLogs, and (next) the registry and BuildKit.
traefik
Package traefik generates Traefik's dynamic configuration (§5.7).
Package traefik generates Traefik's dynamic configuration (§5.7).
uninstall
Package uninstall removes SynCloud from a host (§5.0.1): services, managed containers, the WireGuard interface and the nftables tables.
Package uninstall removes SynCloud from a host (§5.0.1): services, managed containers, the WireGuard interface and the nftables tables.
upgrade
Package upgrade replaces the controller and agent binaries in place with automatic rollback (§5.0.1).
Package upgrade replaces the controller and agent binaries in place with automatic rollback (§5.0.1).
upgrade/rollout
Package rollout upgrades agents node by node (§5.0.1 step 6, §6.2): each node gets the agent binary from the controller's downloads over its agent stream, restarts into it, and must reconnect with the new version before the next node starts.
Package rollout upgrades agents node by node (§5.0.1 step 6, §6.2): each node gets the agent binary from the controller's downloads over its agent stream, restarts into it, and must reconnect with the new version before the next node starts.
upstream
Package upstream stores credentials for third-party registries (§5.9).
Package upstream stores credentials for third-party registries (§5.9).
version
Package version holds build metadata, set at link time with -ldflags.
Package version holds build metadata, set at link time with -ldflags.
web
Package web embeds the built dashboard (web/ → internal/web/dist) into the controller binary.
Package web embeds the built dashboard (web/ → internal/web/dist) into the controller binary.
workload
Package workload runs services (§4, §5.2–5.3): it validates task definitions, places tasks on nodes and reconciles desired with observed state.
Package workload runs services (§4, §5.2–5.3): it validates task definitions, places tasks on nodes and reconciles desired with observed state.
sdk
go/syncloud
Package syncloud is the Go SDK for the SynCloud API (§7.1): the same client synctl uses, with access-key request signing, bearer tokens and temporary credentials.
Package syncloud is the Go SDK for the SynCloud API (§7.1): the same client synctl uses, with access-key request signing, bearer tokens and temporary credentials.
test
e2e/cloudsim command
Command cloudsim is a fake cloud for end-to-end tests of provider-backed node pools (§6.5).
Command cloudsim is a fake cloud for end-to-end tests of provider-backed node pools (§6.5).
e2e/gitserver command
Command gitserver serves bare repositories over Git's smart HTTP protocol (git http-backend) for the builds end-to-end test.
Command gitserver serves bare repositories over Git's smart HTTP protocol (git http-backend) for the builds end-to-end test.
e2e/hooksink command
Command hooksink records the requests it receives, one line each ("<path> <body>"), for the alerts end-to-end test.
Command hooksink records the requests it receives, one line each ("<path> <body>"), for the alerts end-to-end test.
load/fakeagent command
Command fakeagent simulates many nodes for load tests (Phase 9): each joins with a real join token and keeps a real mTLS agent stream, sends heartbeats, and reports every task it is given as running, without Docker.
Command fakeagent simulates many nodes for load tests (Phase 9): each joins with a real join token and keeps a real mTLS agent stream, sends heartbeats, and reports every task it is given as running, without Docker.
tools
imagepack command
Command imagepack turns a local Docker image into the archive a release carries: an OCI image layout with gzip-compressed layers, as a tar.gz.
Command imagepack turns a local Docker image into the archive a release carries: an OCI image layout with gzip-compressed layers, as a tar.gz.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL