Running a Workflow Automation Tool on a VPS
A setup where you host your own tool for chaining tasks into automations. This article covers what it means for credentials to be concentrated in one place, the specs you need, and how to design against runaway behavior.

Ren

Procura
Credentials get concentrated
The more convenient an automation tool is, the more services' keys it holds. If it's breached in one place, everything you connected is within reach. The weight flips: protecting this one server becomes more important than protecting each individual service. Narrow what you expose to the bare minimum.

Wilson
- Prefer a setup that isn't exposed outside and is used only through a VPN
- If you do expose it, always require authentication (don't leave the default settings)
- Narrow the permissions of connected services to only what's needed
- Disconnect integrations as soon as you stop using them

Procura
Specs you need
- It's light while it waits. It uses resources only when a job runs
- The memory you need changes with the amount of data you handle
- If you keep execution history, disk use grows
- Starting with a smaller plan and judging from actual measurements is realistic
Preparing for runaway behavior
Automation also repeats mistaken behavior automatically. A single failure turns into thousands of notifications sent, or an API being called over and over so that charges swell. Before you start running it, prepare a cap on the number of runs and a procedure for stopping it.
- Set a limit on the number of runs
- Put a limit on the number of retries after a failure
- Be especially careful with steps that send emails or notifications (they also bother the recipients)
- Steps that call pay-as-you-go APIs can make costs jump

Procura
Check that it's running
- Keep execution history and set up notifications for failures
- Stay quiet on success (if a notification arrives every time, you stop reading them)
- Regularly check from the results that it's working as expected
- Avoid a state where you can't notice that it has stopped
Dividing the work with external services

Procura
- Reasons to host it yourself: the data you handle can't leave your server, or you don't want limits on the number of runs
- Reasons to use a ready-made service: you can leave updates and backups to it
- For workflows that would hurt if they stopped, a ready-made service tends to be more stable
- If it doubles as learning or experimentation, hosting it yourself has value

Procura

Ren
This article is translated from the Japanese original. If the two differ, the Japanese version is the one we keep up to date.