Your repo. Your server. Herald in between.
Herald is a single-binary deployment daemon for one Docker Compose server. It reacts to GitHub webhooks, deploys stacks, wires Caddy TLS, resolves encrypted secrets, and keeps the server reproducible from a git repo.
No database. No control panel. No SSH deploy scripts.
curl -fsSL https://raw.githubusercontent.com/nogo/herald/main/scripts/install.sh | shOr with wget:
wget -qO- https://raw.githubusercontent.com/nogo/herald/main/scripts/install.sh | shThis creates a herald user, downloads the latest binary, and sets up directories. Run as root.
Run the same install command; it replaces the binary and restarts a running daemon. Coming from 3.x, read docs/migration.md first: 4.0 needs service: or port: on some stacks.
git clone https://github.com/nogo/herald.git && cd herald && make# 1. Install the binary, create the herald user, and install the systemd unit (root)
curl -fsSL https://raw.githubusercontent.com/nogo/herald/main/scripts/install.sh | sudo sh
# 2. Bootstrap from your server's IaC repo (handles auth, secrets, webhooks)
sudo -iu herald herald init myorg/my-server
# 3. Start the daemon (wires Caddy + webhooks on first start)
sudo systemctl enable --now herald
# 4. Set secrets and deploy
sudo -iu herald herald secret set myapp/db_password
sudo -iu herald herald deploy myapp# Remove the service and binary. Data, secrets, and deployed stacks are KEPT.
curl -fsSL https://raw.githubusercontent.com/nogo/herald/main/scripts/uninstall.sh | sudo sh
# Full cleanup: also delete the herald user, /etc/herald (age key + secrets),
# and /opt/deploy. Prompts you with exactly what will be deleted before doing it.
curl -fsSL https://raw.githubusercontent.com/nogo/herald/main/scripts/uninstall.sh | sudo sh -s -- --purge| Removed | default | --purge |
|---|---|---|
| systemd unit + binary | ✓ | ✓ |
/etc/herald (age key, secrets, config) |
— | ✓ |
/opt/deploy (deployed stacks) |
— | ✓ |
herald system user |
— | ✓ |
--purge is irreversible — the age key is deleted, so encrypted secrets can't be recovered. It asks for confirmation first; add --yes to skip the prompt in automation. Neither mode touches Docker: running herald-* containers and their volumes are left in place (the script prints how to remove them).
After setup, the intended workflow is git-driven:
push app repo -> Herald deploys matching stack
push server repo -> Herald reloads config and auto-deploys opted-in path stacks
push feature branch -> Herald creates/updates preview, if enabled
Each server has its own repo with a config.yml:
server:
name: srv1
deploy_domain: deploy.example.com
services_dir: /opt/deploy
port: 9483
acme_email: ops@example.com
stacks:
myapp:
repo: myorg/myapp
branch: main
domain: myapp.example.com
tag_pattern: "v[0-9]*" # also deploy on matching tag push
config: stacks/myapp/config.env # non-secret env vars, committed to IaC repo
secrets:
- key: myapp/db_password
target: db_password
type: docker-secret
generate: alphanumeric # auto-generated on first deploy
preview:
enabled: true
domain: "*.preview.myapp.example.com"
myapp-pinned:
repo: myorg/myapp
tag: v2.1.0 # deploy exact tag, no auto-deploy
domain: stable.example.com
nextcloud:
path: stacks/nextcloud
domain: cloud.example.com
auto_deploy: false
update: stacks/nextcloud/update.shEach stack has a domain, secrets, and a source — either a GitHub repo (repo:) or a directory in the IaC repo (path:).
See docs/config.md for the full configuration reference.
GitHub app push → webhook → herald → git pull/build → docker compose up → live
GitHub config push → webhook → herald → reload config → path stacks update
Herald registers webhooks on your app repos and on the server repo via the GitHub API. When you push app code, Herald pulls, builds, and deploys the matching stack. When you push server config, Herald pulls the server repo, reloads config, and auto-deploys path-sourced stacks with auto_deploy: true. Caddy provisions TLS certificates automatically.
Everything Herald manages is a stack: a Docker Compose project with a domain, secrets, and a source.
A config push that would leave a stack without a route (no service: among several services, no declared or explicit port:) is rejected as a whole: the daemon keeps the previous config and deploys nothing. On a GitHub server repo the commit gets a ✗ status naming the stack; herald init without a repo installs a pre-receive hook that rejects such a push before it lands, so git push prints the error.
For a server repo with a local bare repo or non-GitHub origin, a git
post-receive hook can send the daemon a sync signal with:
herald signalRun it as the operator who runs Herald. It signals server.port from
<data-dir>/repo/config.yml (9483 without one); --port <port> overrides
that. A missing or invalid config is no error, and it bypasses HTTP proxies.
It exits non-zero with a diagnostic if the daemon is unreachable or rejects the
signal. Success means maintenance was submitted: the daemon pulls its
<data-dir>/repo clone, reloads config, and redeploys changed auto_deploy path
stacks. After the pass finishes, herald status shows the server-repo commit.
With only path stacks and a non-GitHub server repo, no GitHub token or webhook
secret is needed and webhook reconciliation is skipped.
The daemon must listen on an address reachable at 127.0.0.1. Its POST /sync
route checks the connection peer for loopback; Caddy's Docker bridge connection
and remote hosts are rejected regardless of forwarding headers.
Run herald on its own to see where setup stands and the command to run next.
Daemon
herald serve Start webhook listener (runs as the systemd service)
herald sync Pull IaC repo + reconcile config + sync webhooks
herald signal Ask the local daemon to sync the server repo
herald status Show apps, services, domains, health (with CPU/mem)
herald doctor Diagnose deploy/wiring problems with fix commands
Install and removal are handled by install.sh / uninstall.sh (systemd is a one-time, root-only operation, not a herald subcommand).
Stacks
herald deploy <stack> Deploy a stack
herald deploy --all Deploy all stacks
herald down <stack> Stop and remove a stack's containers
Previews
herald preview list List active preview deployments
herald preview remove <id> Remove a preview deployment
herald preview cleanup Remove previews for deleted branches
Secrets
herald secret set <key> Set a secret (interactive prompt)
herald secret list List secret keys
Infrastructure
herald caddy start|stop Manage reverse proxy
herald webhooks sync Register GitHub webhooks
Auth
herald auth login Authenticate with GitHub
herald auth status Show authentication status
herald version Print version
# Interactive device flow (recommended)
herald auth login --client-id <client-id>
# Personal access token
herald init myorg/srv --github-token ghp_xxxx
# Check status
herald auth statusToken is stored encrypted. All subsequent commands use it automatically.
To create a GitHub OAuth App: github.com/settings/applications/new -- set "Enable Device Flow", callback URL http://localhost.
See SECURITY.md for the full security model. Key points:
- Secrets encrypted at rest with age
- GitHub tokens never in URLs, process args, or logs
- Git hooks disabled on all operations; webhook git refs validated
- Webhook HMAC-SHA256 + per-IP rate limiting
- Preview environments receive no secrets; fork PRs cannot trigger them
- Systemd hardening (NoNewPrivileges, ProtectSystem, kernel/namespace restrictions)
- Per-app Docker network isolation (only the front service joins Caddy)
The web surface is a single public availability page: it shows only the up/degraded/down state of stacks that opted in with availability.public, plus an overall status and last-checked time. No domains, refs, secrets, webhooks, or paths. Operational detail is admin-only and lives in the CLI (herald status, herald doctor).
As of October 2026, ordered from least to most moving parts:
| Database | On the server | Config lives in | Deploys on | TLS | |
|---|---|---|---|---|---|
| Herald | None | One daemon | YAML in a server repo | Webhook, git push | Caddy |
| doco-cd | None | One daemon | YAML in each repo | Webhook, polling | Bring your own |
| Kamal | None | Proxy only | YAML in the app repo | CLI over SSH | kamal-proxy |
| Dokku | None | Git hooks, plugins | CLI commands | git push | Plugin |
| Haloy | SQLite | Daemon + proxy | YAML in the app repo | CLI | Built in |
| Disco | SQL, via migrations | Daemon | Dashboard, CLI | Webhook | Built in |
| Uncloud | Distributed SQLite | Daemon per machine | Compose + CLI | CLI over SSH | Caddy |
| Komodo | MongoDB or FerretDB | Core + agent | Web UI, TOML sync | Webhook, polling | Bring your own |
| Dokploy | PostgreSQL + Redis | Platform | Web UI | Webhook | Traefik |
| Coolify | PostgreSQL + Redis | Platform | Web UI | Webhook | Traefik or Caddy |
Of the others, Coolify, Dokploy (apps only, not compose) and Disco also run preview environments.
doco-cd is the closest neighbour: also one daemon, also no database, also compose files from git. It has more features, and that is fine. Herald is built for what its author needs, not to match a feature list.
doco-cd does more: GitLab, Gitea and other forges, Docker Swarm, several hosts, polling and sync windows, notifications, Prometheus metrics, a REST API, and secrets from external providers or SOPS.
Herald covers the whole path from push to a live HTTPS URL, from one config.yml:
- Routing and TLS. A domain is one line; Caddy gets the certificate. doco-cd leaves the reverse proxy to you.
- Generated secrets.
generate:creates a password on first deploy and keeps it age-encrypted on the server. Nobody types or sees it. - Preview environments. Each branch gets a subdomain, with no secrets and no previews from forks.
- Webhooks registered for you. Herald creates and prunes them through the GitHub API.
- Guidance. A bare
heraldsays where setup stands and what to run next;herald doctorprints the fix.
If you already run your own proxy and certificates and want more forges or hosts, doco-cd is the better fit.
Why Herald? GitHub-native deploy automation for one server. One server repo drives wiring. One app repo can deploy N times. No PostgreSQL/Redis tax.
Trade-offs: GitHub or a bare repo on the server, no other forge. One server only. No web UI for config. No app marketplace. New project.
/etc/herald/ herald data
age.key encryption key (BACK THIS UP)
secrets.age encrypted secrets
repo/ cloned server IaC repo
config.yml
stacks/<name>/ compose files, config, update scripts
/opt/deploy/ deployments
<name>/ per-stack runtime state
repo/ cloned stack repo or symlink to IaC path
.env generated: config base + env secrets
deployed_ref last deployed ref (path stacks: IaC commit)
secrets/<name> docker secret files
compose.override.yml generated by herald
previews/<stack>-<branch>/ ephemeral preview environments
repo/
.env
compose.override.yml
caddy/ caddy-docker-proxy
Herald: H≈9 E≈4 R≈8 A≈3 → 9483
Derived from letter shapes. Unregistered, above 1024.
BSD-3-Clause