Docs cipi.yml Web panel API MCP Guides Compare GitHub Telegram channel
  1. Docs
  2. Deploy
  3. Auto-deploy on push

Auto-deploy on push

The signed webhook that deploys when you push.

Deploy

Push to your branch and the app is live a minute later. The Git provider calls a signed webhook on your app; the deploy itself runs on the server as the app user. CI needs no SSH key and the server opens no extra port.

A push deploys
$ git commit -am "checkout: round tax per line" && git push
$ ssh cipi@203.0.113.10 sudo cipi deploy shop --history --limit=1

How it works#

Step 1 of 5git push

You push commits to the app's deploy branch (main by default). Pushes to other branches are acknowledged and ignored.

The webhook only drops a trigger file; it never runs the deploy itself. That keeps the HTTP answer instant (providers time out after ~10 s) and the deploy in the same safe context as cipi deploy.

ReceiverUsed byVerifies
Cipi Agent (cipi/agent)Laravel appsGitHub/Bitbucket HMAC, GitLab/Azure token, Gitea/Forgejo signature
Built-in receiverNode appsGitHub/Bitbucket HMAC, GitLab/Azure token

Set it up#

bash
# in your Laravel project
composer require cipi/agent && git commit -am "Add Cipi Agent" && git push
# on the server: one manual deploy, so the route exists
cipi deploy myapp
cipi git status                 # webhook already created?
cipi deploy myapp --webhook     # if not: URL and secret to add by hand
ProviderPayload URLSecretEvents
GitHubhttps://myapp.com/cipi/webhookthe token from --webhookpush
GitLabsameSecret token: same valuePush events

Only pushes to CIPI_DEPLOY_BRANCH deploy; others get skipped. Cipi keeps it in step with cipi app edit --branch. Use HTTPS (cipi ssl install) so the secret never travels in clear text.

Verify with a small commit:

bash
cipi deploy myapp --status
cipi app logs myapp --type=deploy

Every webhook deploy lands in the audit ledger with pusher, commit, delivery ID and source IP.

Troubleshooting#

SymptomCauseFix
404Agent not deployed yetcipi deploy myapp after adding cipi/agent
403, invalid signatureSecret mismatchCopy the token from cipi deploy myapp --webhook again
200 but no deployAnother branch was pushedCheck CIPI_DEPLOY_BRANCH
Lock errorAn interrupted deploycipi deploy myapp --unlock
Two deploys per pushWebhook and pipeline both activeKeep one trigger

Common problems#

ProblemFix
Push doesn't deployPushed to another branch, or the webhook was removed: cipi deploy myapp --webhook

Questions#

QuestionAnswer
Webhook or CI?Webhook for most apps; CI when tests must pass first. Guide.