# VPS & agent

> Requirements, installing and pairing the X-Buddy agent on a Windows VPS, the agent window, updates and uninstalling.

Source: https://x.builera.app/docs/en/vps-and-agent
Last checked: 2026-10-24

The agent is the X-Buddy program on your Windows VPS. It runs Chrome for your X accounts, does the jobs and reports back over outgoing HTTPS only — no open ports, so the VPS can sit behind NAT.

## Requirements {#requirements}

- **Windows** with **PowerShell 5.1 or later**, run **as Administrator**, in a normal signed-in desktop session (the agent shows real Chrome windows, so it can't run as a background Windows service).
- **At least 4 GB of RAM.** Plan about **1.5 GB of free RAM per Chrome window**. The agent opens 3 at once by default and at most 8.
- **Disk:** 10 GB free is recommended; the installer stops below 2 GB.
- The installer needs **Node.js 20** or later: it installs Node.js 20 LTS when Node.js is missing or older, and installs **Google Chrome** when it is missing.

The **VPS & Agent** page shows each machine's open Chrome windows against its limit, RAM and disk use, and a set of checks: **Virtual memory**, **Screen**, **Chrome profiles excluded from virus scans** and **Chrome policy**. A warning there is advice, not a guarantee that the VPS is ready or broken. When memory or CPU is tight, the agent waits before opening another Chrome.

## Install and pair {#install-and-pair}

1. In X-Buddy, open **VPS & Agent → Add VPS**.
2. Enter a **VPS display name** and choose **Generate pairing code**. The code is valid for **10 minutes**; the dialog counts down.
3. Copy the install command. It looks like this:

   ```powershell
   [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; irm '<X-Buddy address>/api/public/agent/install?code=<PAIRING_CODE>&lang=en' | iex
   ```

4. On the VPS, open **PowerShell as Administrator**, paste the command and press Enter.
5. When the dialog shows **Paired**, the VPS has checked in. Paired means the machine is connected — it doesn't mean an X account is added or signed in yet.

What the installer does:

- installs into `C:\XAuto` (the program sits in `C:\XAuto\app`);
- creates a scheduled task **X Auto Agent** that starts the agent when Windows signs in, plus **X Auto Maintenance**;
- offers Windows automatic sign-in, so the agent comes back after a reboot without you opening Remote Desktop;
- puts two shortcuts on the desktop: **X Auto Agent** and **Exit Remote safely**.

> [!NOTE]
> "X Auto Agent" and `C:\XAuto` are the agent's technical names on Windows. They stay the same so that automatic updates keep working.

The `-Lang vi` or `-Lang en` installer option only sets the installer's own wording and the shortcut name. Pairing by hand is also possible: in the agent window choose **Enter the pairing code**, type the 6 characters and choose **Pair**.

## The agent window {#the-agent-window}

On the VPS, the agent window shows the connection to X-Buddy, the machine and workspace, the last check-in, the machine checks, how many Chrome windows are open, free disk, each X account with its session and safety state, the current jobs, a live log and update progress.

- **Language** — **Follow workspace**, **Tiếng Việt** or **English**. "Follow workspace" uses the workspace notification language set in X-Buddy; a choice made here stays on this VPS.
- **Pause taking jobs** / **Resume taking jobs** — stops the agent from taking new jobs. It doesn't force-stop a job that is already running.
- **Open log folder** — opens the agent's log files.

## Leave Remote Desktop safely {#leave-remote-desktop-safely}

When you close a Windows Remote Desktop session, Windows can freeze the screen the Chrome windows draw on. Always leave with **Exit Remote safely** (in the agent window or on the desktop): it hands the session back to the VPS console so your X accounts keep running.

This is about Windows Remote Desktop. It is different from X-Buddy's **Remote view**, which shows one X account's Chrome inside the web app.

A screen that is too small also stops work: if the VPS display is below 1024×720 (often because the Remote Desktop window is small), jobs wait with **VPS display is too small for X**. Enlarge or close Remote Desktop to continue.

## Updates {#updates}

The agent updates itself. Each update is signed; the agent checks the signature and the file's checksum before installing it, and only installs when **no job is running and no Remote view is open**. It never interrupts work to update.

If a VPS runs a version older than X-Buddy requires, it keeps checking in and updating itself but receives no jobs. Its jobs show **VPS needs an update** until it catches up.

## Uninstall {#uninstall}

Run `uninstall.ps1` from `C:\XAuto\app\scripts` in PowerShell as Administrator.

- Without options, it removes the agent and its scheduled tasks but **keeps** the Chrome profiles and settings in `C:\XAuto`, so a reinstall picks up where you left off.
- With `-Purge`, it deletes **everything** in `C:\XAuto`, including the signed-in Chrome profiles of your X accounts. Those X accounts will need to sign in again.

## Related {#related}

- [Add and sign in X accounts](/docs/en/x-accounts)
- [Troubleshooting](/docs/en/troubleshooting) — VPS offline, outdated agent, proxy errors.
