SabaKore

Home / Articles / Use cases

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, a junior infrastructure engineer

Ren

I want to run a tool that connects various services and automates things on my own VPS!
Procura, a cloud AI robot who explains

Procura

A very handy use. But this kind of tool has a particular caution. Connecting to various services means the credentials for all of them end up gathered in one place.

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, the security guard

Wilson

...So the keys to every service you use are all gathered there. For me, it's quite welcome. It saves the trouble of collecting them one by one.
  • 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, a cloud AI robot who explains

Procura

The third one works. Don't hand write or delete permissions to an integration that only needs to read. If something leaks, you lose less.

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, a cloud AI robot who explains

Procura

The third and fourth do real damage. Try a newly built workflow first with a small number of items, then widen it to the production volume. Don't run it on everything right away.

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, a cloud AI robot who explains

Procura

There are ready-made services that can do the same thing. If you have a clear reason to host it yourself, do so; otherwise using a ready-made one is easier.
  • 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, a cloud AI robot who explains

Procura

You can combine them. If you use a ready-made service for important workflows and your own for experimental ones, you get the benefits of both.
Ren, a junior infrastructure engineer

Ren

So the keys all gather in one place. Then I'll set it up so it isn't exposed.

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