Keep the local agent running in the background

The Requestarium web app runs in your browser, so it can't open a connection to localhost:8080 or a host on your VPN by itself. The local agent does that for it. You can start it in a terminal with requestarium agent, but then it stops when you close the terminal. agent install makes it start at login and stay out of the way.

Install

The agent needs a CLI that stays put, so install it globally (not with npx, whose cache npm may clean):

Terminal
npm install -g @requestarium/cli
requestarium agent install

What it does, per system:

SystemWhat gets installedLogs
macOSa LaunchAgent, ~/Library/LaunchAgents/com.requestarium.agent.plist~/Library/Logs/requestarium-agent.log
Linuxa systemd user unit, requestarium-agent.servicejournalctl --user -u requestarium-agent.service
Windowsa hidden script in the Startup folder, requestarium-agent.vbs

It starts right away, and again at every login. On macOS and Linux it also comes back after a crash. Nothing needs admin rights: it's a per-user login item.

To see exactly what would be written first:

Terminal
requestarium agent install --dry-run

Point the web app at it

In the web app, open Settings ▸ Requests ▸ Send requests from:

  • Auto sends localhost, private IPs and .local/.internal names through the agent, and the rest through the server. Right for most people.
  • Desktop Agent sends everything through the agent: pick it for VPN-only hostnames, or to send cookies and headers a browser would block.

Approve the web app

The first time the web app talks to the agent, it shows a 4-digit code. In the background there's no terminal to ask you, so approve it from any terminal:

Terminal
requestarium agent status          # lists sites waiting, with their codes
requestarium agent approve 4821    # the code the web app shows

Only approve a code you see in the Requestarium web app at that moment. The pairing is remembered, so this happens once per site.

Terminal
requestarium agent sites                               # allowed sites
requestarium agent revoke https://app.requestarium.com # forget one

Self-hosted Requestarium? Add your web app's address once, so it may ask:

Terminal
requestarium agent origins add https://requestarium.example.com

Stop, restart, remove

Terminal
requestarium agent stop       # stop now; the login item starts it again next login
requestarium agent            # run it in the foreground instead, to watch requests
requestarium agent uninstall  # remove the login item and stop it

Only one agent runs at a time: Requestarium Desktop and the CLI agent share the same local ports. If you use the desktop app every day, you don't need the CLI agent too.

Proxies

If your shell has HTTPS_PROXY, HTTP_PROXY or NO_PROXY set when you run agent install, the login item keeps them, so requests from the agent go through the same proxy. Change the proxy later? Run agent install again.

Troubleshooting

  • The web app says no agent is running. Run requestarium agent status. On Linux without a systemd user session (some WSL and container setups), the unit can't start: run requestarium agent in a terminal instead.
  • Requests to a VPN host fail. Switch Send requests from to Desktop Agent; Auto only routes local and private addresses through the agent.
  • You upgraded Node.js and it stopped. The login item points at the Node.js it was installed with. Run requestarium agent install again.