On this pageThree layers, three kinds of server
Take one chore. On the first of every month, someone signs in to a supplier portal, exports last month's invoices as CSV and drops the file in a shared folder. You can automate it three ways: call the portal's API if it has one, drive a headless browser that fills the login form and clicks Export, or run a desktop bot that clicks through the supplier's Windows app the way a person would. Robotic process automation (RPA) tools cover the last two, and the layer you choose decides what kind of server the bot needs, how often it breaks and how much attention it asks for.
Three layers, three kinds of server
| Layer | Open-source options | Runs on | Usually breaks when |
|---|---|---|---|
| API or workflow | Python or shell scripts, a workflow engine | Any Linux server, no display | A token expires or the API changes version |
| Browser | Playwright, Robot Framework with the Browser library | Headless Linux | The page layout or the login flow changes |
| Desktop GUI | OpenRPA, PyAutoGUI, RPA Framework's desktop libraries | A Windows session that is logged in and drawing | The screen locks, a dialog pops up, the resolution changes |
Move down this table only when the layer above is closed to you. An API call survives a website redesign; a CSS selector often does not, and a click on screen coordinates fails as soon as a button moves. When the data arrives by email or webhook instead of through a screen, a workflow engine fits better than a bot. Our comparison of self-hosted workflow automation tools covers n8n, Activepieces and the others.
The tools worth a shortlist
Robot Framework and its libraries
Robot Framework is a generic automation framework for acceptance testing and RPA, written in Python and licensed under Apache 2.0. Version 7.5.1 shipped in November 2026. Tasks are written in a plain-text, keyword-driven syntax, under a *** Tasks *** section instead of *** Test Cases ***, and every run produces log.html, report.html and output.xml, which double as an audit trail. Two libraries do most of the RPA work:
- Browser (Apache-2.0, version 21) puts Robot Framework keywords on top of Playwright. It needs Python 3.11 or newer and Node.js 22, 24 or 26 LTS, unless you install the
robotframework-browser[bb]extra, which bundles the Node side. When a keyword fails, it takes a screenshot by default. - RPA Framework (Apache-2.0, sponsored by Robocorp) adds libraries such as
RPA.Excel.Files,RPA.PDF,RPA.Email.ImapSmtp,RPA.WindowsandRPA.SAP. It is still released regularly, and its November 2026 releases need Python 3.11 or newer.
Playwright
Playwright (Apache-2.0) drives Chromium, Firefox and WebKit from Python, Node.js, Java or .NET. It runs headless by default, using a separate Chromium headless shell, and playwright install --with-deps chromium fetches the browser together with the system libraries it needs on Linux. If your team writes Python, this is the shortest path to a browser bot.
OpenRPA
OpenRPA, from the OpenIAP project, is a Windows desktop RPA tool under the MPL-2.0 license, installed from an .msi. It records workflows and can automate by image recognition and OCR, and its companion OpenFlow is the backend for managing several robots. Choose it when the people building bots prefer a designer to a code editor.
PyAutoGUI
PyAutoGUI (BSD-3-Clause) moves the mouse, types keys and finds images on screen from Python. On Linux it talks to X11 through python3-xlib, so a server without a desktop needs a virtual display such as Xvfb (xvfb-run -a python3 bot.py). It knows nothing about buttons or fields, only pixels and coordinates, so keep it for applications that offer no other handle.
Check maintenance before you commit
Two names that still appear on older lists need a second look. TagUI no longer gets maintenance or support from AI Singapore, though community contributors keep working on it, and SikuliX1's repository has been archived in a read-only state. Whatever you pick, check the date of the last release and whether issues get answers before a bot depends on it.
Browser bots on headless Linux
Give the bot its own system account and a virtual environment. Installing the browser's system libraries needs root; the browser itself goes into the bot's home directory:
sudo apt install -y python3-venv
sudo useradd --system --create-home --home-dir /srv/bot --shell /usr/sbin/nologin bot
sudo -u bot python3 -m venv /srv/bot/.venv
sudo -u bot /srv/bot/.venv/bin/pip install playwright
sudo /srv/bot/.venv/bin/playwright install-deps chromium
sudo -u bot /srv/bot/.venv/bin/playwright install chromium
The script reads credentials from the environment, saves the download, and keeps a screenshot and a trace only when something fails:
import os
from pathlib import Path
from playwright.sync_api import sync_playwright
OUT = Path("/srv/bot/reports")
OUT.mkdir(exist_ok=True)
with sync_playwright() as p:
browser = p.chromium.launch() # headless by default
context = browser.new_context(accept_downloads=True)
context.tracing.start(screenshots=True, snapshots=True)
page = context.new_page()
try:
page.goto("https://portal.example.com/login")
page.locator("#username").fill(os.environ["PORTAL_USER"])
page.locator("#password").fill(os.environ["PORTAL_PASS"])
page.locator("button[type=submit]").click()
page.goto("https://portal.example.com/reports")
with page.expect_download() as info:
page.get_by_text("Export CSV").click()
download = info.value
download.save_as(OUT / download.suggested_filename)
context.tracing.stop()
except Exception:
page.screenshot(path=OUT / "failure.png", full_page=True)
context.tracing.stop(path=OUT / "failure-trace.zip")
raise
finally:
browser.close()
Open a saved trace with playwright show-trace failure-trace.zip to replay each step with its DOM snapshot. The same job in Robot Framework reads like a checklist, and Fill Secret resolves %PORTAL_PASS from the environment without writing it to the log:
*** Settings ***
Library Browser
*** Tasks ***
Download monthly invoice report
New Browser chromium headless=True
New Context acceptDownloads=True
New Page https://portal.example.com/login
Fill Text id=username %{PORTAL_USER}
Fill Secret id=password %PORTAL_PASS
Click button[type="submit"]
Go To https://portal.example.com/reports
${download}= Promise To Wait For Download /srv/bot/reports/invoices.csv
Click text=Export CSV
Wait For ${download}
Schedule it with a systemd timer rather than cron, so runs land in the journal and a missed run catches up after a reboot:
# /etc/systemd/system/invoice-bot.service
[Unit]
Description=Download the monthly invoice report
[Service]
Type=oneshot
User=bot
WorkingDirectory=/srv/bot
EnvironmentFile=/etc/invoice-bot.env
ExecStart=/srv/bot/.venv/bin/python /srv/bot/invoice_bot.py
# /etc/systemd/system/invoice-bot.timer
[Unit]
Description=Run the invoice bot on the first of each month
[Timer]
OnCalendar=*-*-01 06:00:00
Persistent=true
[Install]
WantedBy=timers.target
sudo chmod 600 /etc/invoice-bot.env
sudo systemctl daemon-reload
sudo systemctl enable --now invoice-bot.timer
systemctl list-timers invoice-bot.timer
journalctl -u invoice-bot.service
systemd reads EnvironmentFile as root before it switches to the bot user, so the file can stay readable by root only.
Desktop bots on Windows: keep a real session alive
A GUI bot needs an interactive desktop that is logged in and drawing. That rules out the usual ways of running background jobs: the System account has no interactive logon rights, and a task that runs "whether the user is logged on or not" gets no visible desktop. Four settings make a Windows server behave:
- Run as a dedicated account, interactively. Create a standard user for the bot and schedule its job with
/it, which runs the task only while that user is logged on. - Log that account in at boot. Sysinternals Autologon stores the password encrypted as an LSA secret, but any administrator can read it back, so the bot account should have access to nothing else.
- Never leave the session locked. Closing the Remote Desktop window locks the session and Windows stops drawing it, so GUI steps fail. Run the script below as administrator inside the bot's session; it hands the session to the console and ends your connection without locking.
- Minimize without blanking. A minimized Remote Desktop window also stops rendering. Set
RemoteDesktop_SuppressWhenMinimizedto2on the computer you connect from, with every session closed.
:: keep-alive.cmd, run as administrator inside the bot's RDP session
@echo off
for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (
%windir%\System32\tscon.exe %%s /dest:console
)
:: on the Windows server: run the bot at 06:00 on the 1st, only while botuser is logged on
schtasks /create /tn "Invoice bot" /tr "C:\bots\invoice\run.cmd" /sc monthly /d 1 /st 06:00 /ru botuser /it
:: on the PC you connect from
reg add "HKCU\Software\Microsoft\Terminal Server Client" /v RemoteDesktop_SuppressWhenMinimized /t REG_DWORD /d 2 /f
Fix the screen resolution and display scaling the bot was built at. Image matching and coordinate clicks drift as soon as either changes.
Secrets, evidence and alerts
- Secrets stay out of the script. On Linux, use the root-only environment file above; on Windows, Python's
keyringpackage can read from the Windows Credential Locker. Robot Framework 7.4 also added a Secret variable type that the Browser library understands. - Bots get their own accounts with the fewest rights the job needs. When a portal offers a read-only user or an API token, use it.
- Evidence expires. Screenshots, traces and
log.htmlfiles show whatever was on screen, including personal data. Keep them for a few weeks, not forever. - Silence is the real failure. A monthly bot that dies quietly is noticed at the end of the quarter. End each successful run with a ping to a dead man's switch such as Healthchecks, which alerts you when the ping does not arrive.
Where to run each layer
Browser bots run happily on a small Linux server, and several can share one if their schedules do not overlap. Desktop bots need Windows, a license and a session you never touch by hand. On CloudSat, Automation RDP is a Windows server set up for scheduled and unattended jobs from $2.78/mo, while headless Linux bots fit a Cloud VPS.
FAQ
Is RPA just test automation under another name?
The techniques overlap almost completely. Robot Framework, Playwright and image-based tools serve both jobs. The difference is the goal: a test checks that software works, while an RPA task does business work through software that offers no better interface.
Can a desktop bot run while nobody is logged in?
Not reliably. GUI automation needs an interactive session that is logged in, not locked and drawing. Autologon plus an interactive scheduled task gives you that after every reboot without a person present.
Will a website mind if I automate it?
Read its terms first. Automate only accounts and data you are authorized to use, keep the request rate close to what a person would generate, and ask the provider for an API or a scheduled export, which is more stable than any bot.
Which tool should a Python team start with?
Playwright for browser work and Robot Framework when non-developers need to read or edit the tasks. Add RPA Framework's libraries for Excel, PDF and email steps, and keep desktop automation as the last resort.
Run it on CloudSat. Cloud VPS on AMD EPYC and NVMe from $1.98/mo in 13 regions, delivered in under 5 minutes and paid in crypto. See plans or deploy a server.




