-
Notifications
You must be signed in to change notification settings - Fork 0
deployment webhook dev
buildsbypat edited this page May 24, 2026
·
1 revision
For a first-time bootstrap on a fresh Debian or Ubuntu host, run:
sudo DEPLOY_USER=deployuser bash deploy/scripts/install-webhook-dev.shThat installer:
- installs system packages
- clones the configured branch into
/opt/rob-webhook/app - creates the virtual environment
- installs the systemd unit
- creates
/opt/rob-webhook/deploy-webhook-dev.sh - installs the deploy sudoers entry
- writes a webhook-only
.envtemplate if one does not already exist
- App path:
/opt/rob-webhook/app - Service:
rob-webhook-dev.service - Public URL:
https://rob-dev.barecoding.com - Local bind:
127.0.0.1:8080
Use these steps if you are doing the install manually instead of the bootstrap script above.
- Create a runtime user such as
rob. - Clone the repo into
/opt/rob-webhook/app. - Copy
.env.exampleto/opt/rob-webhook/app/.envand fill the webhook values only. Do not setDISCORD_TOKENon the webhook server. - Create
.venvand installrequirements.txt. - Copy
deploy/systemd/rob-webhook-dev.serviceto/etc/systemd/system/rob-webhook-dev.service. - Copy or symlink
deploy/scripts/deploy-webhook-dev.shto/opt/rob-webhook/deploy-webhook-dev.sh. - Enable the service with
sudo systemctl enable --now rob-webhook-dev.service. - Verify
curl http://127.0.0.1:8080/healthreturnsOK.
- Set
THRONE_WEBHOOK_REQUIRE_SIGNATURE=falsefor early dev if you do not yet have the real Throne public key or confirmed signed-message format. - In that mode, the webhook still validates the URL secret and still writes accepted sends to PostgreSQL.
- Set
THRONE_WEBHOOK_REQUIRE_SIGNATURE=trueonceTHRONE_PUBLIC_KEY_PEMand the signature header format are confirmed for the dev tunnel. - When
true, invalid timestamps, missing public key configuration, or invalid signatures are rejected with401.
deploy-webhook-dev.sh restarts the systemd unit with sudo systemctl restart rob-webhook-dev.service, so the SSH deploy user should be allowed to run that command without an interactive password prompt.
Example /etc/sudoers.d/rob-webhook-deploy entry:
Cmnd_Alias ROB_WEBHOOK_DEPLOY = /bin/systemctl restart rob-webhook-dev.service, /usr/bin/systemctl restart rob-webhook-dev.service
deployuser ALL=(root) NOPASSWD: ROB_WEBHOOK_DEPLOY
Add these secrets:
WEBHOOK_DEV_HOSTWEBHOOK_DEV_USERWEBHOOK_DEV_SSH_KEYWEBHOOK_DEV_PORT
Then run the manual workflow Deploy Webhook Dev.