FerryDocs

Set up the webhook

Give ferryd a secret, create the service, add the webhook in GitHub, then push.

Edit on GitHub

Secret. ferryd gets a webhook secret.

1 / 4

Make a secret

Terminal
openssl rand -hex 32

The command prints a random .

Give the secret to ferryd

Start with the flag --github-webhook-secret, or with the variable FERRY_GITHUB_WEBHOOK_SECRET.

Terminal
ferryd --base-domain apps.example.com \
  --proxy-addr 0.0.0.0:80 --https-addr 0.0.0.0:443 --acme-email you@example.com \
  --dashboard-host ferry.apps.example.com \
  --github-webhook-secret <the secret>

ferry info then shows GitHub webhook: enabled. Without a secret, /hooks/github answers 404.

Create a service from the repository

Terminal
ferry create api --repo https://github.com/you/api --branch main --follow

is on by default. The default branch is main. For a private repository, see Private repositories.

Add the webhook in GitHub

In the repository, open Settings → Webhooks → Add webhook. Enter these values:

FieldValue
Payload URLhttps://ferry.apps.example.com/hooks/github
Content typeapplication/json (application/x-www-form-urlencoded works too)
Secretthe secret that you gave to ferryd
EventsJust the push event

GitHub sends a ping first. Ferry answers 200 with {"ok":true}. The webhook shows a green check.

Push

Push a commit to main. Then list the deploys:

Terminal
ferry deploys api
Output
ID                         STATUS      TRIGGER   COMMIT                   CREATED    DURATION
dep-c2225fad527c4b919c1b   deploying   webhook   fe41834 Add a comment    just now   1s
dep-a53de39943a841aca2c3   live        create    d258434 Initial commit   just now   2s

The new deploy has the webhook. It builds the exact of the push.

On this page