Episode 8: n8n as the automation hub, with the editor kept off the public internet
Three workflows that connect the services from episodes 1 to 7: a Forgejo push becomes a phone notification, an Uptime Kuma outage writes and closes its own incident page in Outline, and a nightly schedule writes one ops digest. The point of the episode is the split between webhooks and the editor. Caddy publishes only the webhook path prefixes under the n8n host and answers an empty 404 for everything else, so the editor stays reachable over the mesh from episode 5 and never gets a login page on the open internet. Also in here: - n8n pinned to a version instead of :latest, after episode 7 showed that every restore is otherwise an upgrade - the 2.x environment that actually matters, including the file access restriction pointed at one directory rather than the root - the Forgejo allowed host list, without which a webhook to a private address is silently dropped - fixed subnets for both docker networks, after a restore handed them out in the other order and quietly broke the mesh route - a note on the encryption key: it decrypts every stored credential, it lives in the n8n volume, and a backup without it restores a hub that cannot log in Claude-Session: https://claude.ai/code/session_01Md8yhBKp5e7xMmCyxoEgdm
This commit is contained in:
parent
cf374770c4
commit
bb2b5b5e22
10 changed files with 1097 additions and 4 deletions
18
.env.example
18
.env.example
|
|
@ -52,3 +52,21 @@ RUNNER_UUID=
|
|||
# docker compose exec -e NTFY_PASSWORD=<pw> ntfy ntfy user add --role=user kuma
|
||||
# docker compose exec ntfy ntfy access kuma alerts write-only
|
||||
# See monitoring/README.md for the full walkthrough.
|
||||
|
||||
# --- n8n automation (episode 8) ---
|
||||
# No variables needed here either: the workflows keep their credentials inside
|
||||
# n8n, encrypted with the key in /home/node/.n8n/config. That file is inside the
|
||||
# n8n_data volume and therefore inside the nightly backup from episode 7.
|
||||
#
|
||||
# If you would rather pin the key yourself (recommended once more than one
|
||||
# person can restore this box), uncomment the line below and put the same value
|
||||
# in your password manager. It wins over the file, and the file is then never
|
||||
# written. Changing it later makes every existing credential undecryptable.
|
||||
# openssl rand -base64 24
|
||||
# N8N_ENCRYPTION_KEY=
|
||||
#
|
||||
# The ntfy user the workflows publish as:
|
||||
# docker compose exec -e NTFY_PASSWORD=<pw> ntfy ntfy user add --role=user n8n
|
||||
# docker compose exec ntfy ntfy access n8n alerts write-only
|
||||
# docker compose exec ntfy ntfy access n8n deploys write-only
|
||||
# See automation/README.md for the rest.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue