Skip to Content
Payload Bay

Get started

Payload Bay receives webhooks for you, keeps a durable copy of every request, and delivers it to your application, retrying until it arrives or you stop it.

What Payload Bay is

Many services notify your application by sending it a webhook: an HTTP request that says something happened. If your application is offline or slow when that request arrives, the message can be lost. Payload Bay sits in front of your application. It accepts each request, stores it, answers the sender, and then delivers it to your application in the background. You can look at every request, see whether it was delivered, and replay it.

Delivery is at least once. In rare cases your application can receive the same request twice, so it should ignore duplicates. Each delivery carries an x-payloadbay-delivery-id header you can use for that.

Payload Bay is open source and runs on your own server. Your data stays with you.

Run it with Docker

You need Docker with Compose, a PostgreSQL password and a few secrets. The single-container setup is the quickest way to try Payload Bay.

  1. Copy .env.example from the repository to a private file outside Git and fill it in. Generate each secret with openssl rand -hex 24.

  2. Start it:

    docker compose --env-file /secure/payloadbay.env -f deploy/compose.single.yml up -d --build
  3. Put a reverse proxy with HTTPS in front of port 3000, and set PUBLIC_URL to the address people will use.

  4. Create the first owner account, as described below.

Create the first owner

The first owner proves they control the server with PAYLOADBAY_BOOTSTRAP_SECRET from your env file, and signs in with an emailed code. The server must be able to send email, so configure SMTP first. This is available only until setup completes.

In the dashboard, open /setup and follow the four steps: your name, the setup secret, your email address, then the six-digit code (valid for five minutes). The last button creates the owner and signs you in.

Through the API, send the same three requests. Browser-style requests need an Origin header equal to PUBLIC_URL and x-payloadbay-csrf: 1; GET /api/v1/bootstrap returns {"configured": false} while setup is pending.

  1. Request a code:

    curl -c cookies.txt -X POST "$PUBLIC_URL/api/v1/bootstrap" \
      -H "origin: $PUBLIC_URL" -H "x-payloadbay-csrf: 1" -H "content-type: application/json" \
      -d '{"action":"request-code","secret":"<setup secret>","email":"you@example.com","name":"Your Name"}'
  2. Sign in with the emailed code, keeping the session cookie:

    curl -b cookies.txt -c cookies.txt -X POST "$PUBLIC_URL/api/auth/sign-in/email-otp" \
      -H "origin: $PUBLIC_URL" -H "content-type: application/json" \
      -d '{"email":"you@example.com","otp":"123456"}'
  3. Complete setup with the same secret:

    curl -b cookies.txt -X POST "$PUBLIC_URL/api/v1/bootstrap" \
      -H "origin: $PUBLIC_URL" -H "x-payloadbay-csrf: 1" -H "content-type: application/json" \
      -d '{"action":"complete","secret":"<setup secret>"}'

For all settings, upgrades and backups, see Single-container deployment. For the full installation with scripted routes, see Operator installation.

Send your first webhook

  1. Sign in and create a project.

  2. Create a destination, which is the address of your application, and a forwarding route that sends to it. The route shows its receiving URL.

  3. Send a test request to that URL:

    curl -X POST "https://your-payloadbay.example/ingress/<route-key>" \
      -H "content-type: application/json" \
      -d '{"hello":"world"}'
  4. Open the route's event history. You will see the request you sent and whether it was delivered. If your application was unavailable, the event waits and is delivered when it returns. You can also replay it by hand.

  5. Give the route's receiving URL to the service that sends you webhooks.

Next steps

Edit this page

On this page