# Install fxbot on your computer

One line installs fxbot as an app on your own computer: on a Mac, on Linux, or on Windows in WSL 2. It runs as you, from `~/.fxbot`, with no containers to learn. One download holds what it runs: Node, fxbot, Postgres with pgvector, and llama.cpp's embedder for memory search. You use it in your browser, at `http://127.0.0.1:8787`, and can install it from there as an app.

For an fxbot that's always on, on a server you reach from your other devices, [host it with containers](/docs/how-to/host-on-a-server/) instead.

## On a Mac

You need macOS 15 (Sequoia) or newer, on Apple silicon or an Intel Mac.

In Terminal, run:

```sh
curl -fsSL https://fxbot.sh/install.sh | sh
```

It asks for no password. It downloads fxbot for your Mac, about 100 to 140 MB, checks it against the release's checksums, and unpacks it into `~/.fxbot`. It puts `fxbot` on your PATH, starts fxbot, and opens it in your browser. On its first start, fxbot downloads the embedder's model, 310 MB, in the background. macOS may tell you a background item was added: that's fxbot, which starts again each time you log in.

**The computer** runs in a Linux VM on your Mac, which fxbot makes with Lima, on Apple's own Virtualization framework, with no password. It comes when you add the computer, from **Essentials** or **Plugins**: fxbot downloads Debian 13's image, about 340 MB, and sets up the computer's engine inside it, which takes about two minutes. A bot's first call then makes the computers' image, about 1.2 GB, in about two minutes more. The VM shares no folder of your Mac's. It stops after 30 minutes with nothing running in it, a computer or its image's build, since macOS doesn't get its memory back while it runs, and starts again with the next computer. The VM's details are in [The computer](/docs/reference/computer/#on-a-mac-a-vm).

- On an Intel Mac, the computer needs macOS 15.5 or newer.
- On a Mac that can't run a VM, such as one that is itself a VM, fxbot runs without the computer, and **Settings** › **Computer** says why.

**Install it as an app** from Safari, with **File** › **Add to Dock**, or from Chrome or Edge: see [Install it as an app](/docs/how-to/reach-it-from-your-computer/#install-it-as-an-app).

**While your Mac sleeps,** fxbot sleeps too: routines wait until it wakes, and your phone can't reach it. A Mac that stays on, such as a Mac mini, keeps fxbot on time.

## On Linux

You need Linux with glibc 2.36 or newer, on x86_64 or arm64, such as Debian 12 or 13, Ubuntu 24.04 or newer, Fedora 37 or newer, or a distro built on one of them. On an older one, such as Ubuntu 22.04 or RHEL 9, [host fxbot with containers](/docs/how-to/host-on-a-server/).

In a terminal, run:

```sh
curl -fsSL https://fxbot.sh/install.sh | sh
```

Run it as yourself, without `sudo`. It downloads fxbot, about 100 to 140 MB, checks it against the release's checksums, unpacks it into `~/.fxbot`, and puts `fxbot` on your PATH. Then it asks once about the computer:

```
fxbot's computer, where bots run commands and a browser, needs root once: it installs podman,
adds a user for the computers, and a firewall that keeps them off this machine and your network.
Set it up now? It asks for your password. [Y/n]
```

Press Enter, and type your password when `sudo` asks. It runs the computer's setup, which installs podman from your distro. Answer **n** to leave it for later, and run `fxbot computer on` when you want it. In a container, such as an LXC container, it doesn't ask: fxbot runs there, and the computer needs a machine or a VM of its own.

Then it starts fxbot, and opens it in your browser when there's a desktop. On a machine with no screen, it prints the address: reach it [from your phone](/docs/how-to/reach-it-from-your-phone/), or [over SSH](/docs/how-to/reach-it/#over-ssh).

fxbot runs as your own systemd service, `fxbot.service`. `fxbot` also turns on linger for you, so fxbot keeps running when you log out, and starts at boot. Where your system doesn't let it, `fxbot` says so, with the command that does: `sudo loginctl enable-linger <you>`.

**Install it as an app** from Chrome or Edge: see [Install it as an app](/docs/how-to/reach-it-from-your-computer/#install-it-as-an-app).

## On Windows

You need Windows 10 version 2004 or newer, or Windows 11. fxbot runs in WSL 2, Windows' own Linux, and you use it in Edge or Chrome on Windows.

1. **Turn WSL on,** if it isn't: open PowerShell as administrator, run this, and restart Windows when it's done.

   ```powershell
   wsl --install
   ```

   Ubuntu opens, and asks for a username and a password. They're Ubuntu's own, not Windows'.
2. **In Ubuntu,** run:

   ```sh
   curl -fsSL https://fxbot.sh/install.sh | sh
   ```

   It installs fxbot as on Linux, and asks about the computer the same way, with Ubuntu's password.
3. **Keep WSL running.** Windows stops WSL soon after its last window closes, and fxbot with it, so it asks:

   ```
   Windows stops WSL soon after its last window closes, and fxbot with it.
   Keeping it running adds two settings to .wslconfig that apply to every WSL distro.
   Keep WSL running and start it when you sign in to Windows? [Y/n]
   ```

   Press Enter. It adds `instanceIdleTimeout=-1` and `vmIdleTimeout=-1` to `.wslconfig` in your Windows user folder, each after a line that marks it as fxbot's, and a shortcut to your Startup folder that starts Ubuntu when you sign in. A setting your `.wslconfig` has already stays as it is. WSL reads them at its next start: restart Windows, or run `wsl --shutdown` in PowerShell, then open Ubuntu again. Answer **n**, and fxbot runs while an Ubuntu window is open.

fxbot opens in your Windows browser at `http://127.0.0.1:8787`. **Install it as an app** from Edge or Chrome: see [Install it as an app](/docs/how-to/reach-it-from-your-computer/#install-it-as-an-app).

WSL 2 needs your computer's virtualization. On a Windows that is itself a VM, that's nested virtualization, which its host must allow.

## Start, stop, and check it

`fxbot` starts fxbot in the background, if it isn't running, and opens it in your browser. It starts again when you log in, and on Linux at boot too, with linger.

```sh
fxbot status
fxbot stop
fxbot logs
```

`fxbot status` names the version, whether fxbot runs and answers, and the computer's state. `fxbot stop` stops it, and keeps it from starting at login until you run `fxbot` again. `fxbot logs` follows fxbot's log. Every command is in [Commands](/docs/reference/commands/#fxbot-in-the-app).

If `fxbot` isn't found, open a new terminal: the line put it on your PATH for new ones.

## Update

**Settings** shows each new release, with an **Update** button. Or run:

```sh
fxbot update
```

It downloads the new release for your computer, checks it, and starts it on your database, which it backs up and migrates as it starts. Once it answers, fxbot runs on it. If it doesn't answer within 10 minutes, fxbot goes back to the release you had, with the backup from before its migrations, and **Settings** says why. Running the line again updates to the newest release too.

## Back up and restore

```sh
fxbot backup
```

It writes the database, the plugins' files, and the key into `~/fxbot-backups/<date>`: `database.dump`, `data.tar.gz`, and `secret.key`. Name a folder to put it elsewhere, such as `fxbot backup ~/Desktop/fxbot-backup`. The database's keys and tokens open only with that `secret.key`. Keep the key apart from the rest when the folder goes anywhere else.

To put a backup back, in place of the database and the plugins' files:

```sh
fxbot restore ~/fxbot-backups/<date>
```

It stops fxbot, restores the folder, and starts fxbot again if it was running. When the folder's `secret.key` differs from fxbot's, it becomes fxbot's key, and the one before stays as `~/.fxbot/secret.key.old`. For a key kept apart, add `--key <file>`.

## Move from the container release

A backup from the container release restores into the app: both run Postgres 17.

1. **On the server,** back up, and put the key in the backup's folder:

   ```sh
   sudo fxbot backup ~/fxbot-move
   sudo install -m 400 -o "$USER" /etc/fxbot/secret.key ~/fxbot-move/
   ```

2. **Stop it,** with `sudo fxbot down`, or [uninstall it](/docs/how-to/uninstall/). Devices paired at web.fxbot.sh find fxbot by its keys, so two fxbots on the same keys take them from each other.
3. **Copy `~/fxbot-move`** to your computer, and install the app there with the line.
4. **Restore it:**

   ```sh
   fxbot restore ~/fxbot-move
   ```

Settings you added to `/etc/fxbot/fxbot.env` go in `~/.fxbot/fxbot.env`, one `NAME=value` a line, and take hold at fxbot's next start. To move the other way, back up with `fxbot backup`, then restore that folder on the server as in [Move to a new machine](/docs/how-to/back-up/#move-to-a-new-machine), from step 3.

## Uninstall

```sh
fxbot uninstall
```

It asks once, `[y/N]`. With **y**, it backs up into `~/fxbot-backups/<date>-uninstall`, stops fxbot, and removes its service, the line on your PATH, and `~/.fxbot`.

- **On a Mac,** it deletes the computer's VM too. Lima keeps the image it downloaded, and a copy it converted for the VM, in `~/Library/Caches/lima`, about 1.5 GB: remove that folder if you don't use Lima for anything else.
- **On Linux,** it asks whether to take the computer's setup away too, as root, or prints the command that does. podman stays.
- **Under WSL,** it removes fxbot's shortcut from your Startup folder, and fxbot's lines from `.wslconfig`, leaving yours.

`--purge` takes no backup. `--yes` asks nothing, and with no terminal and no `--yes`, it stops. To install again, run the line, then `fxbot restore` the backup.

## When the line stops

When it can't install on your computer, it stops before it unpacks anything, with a line that starts `fxbot install stopped:`. [Fix an install that stopped](/docs/how-to/fix-an-install/#the-apps-line) has each one and its fix. Run the line again once it's fixed: it picks up where it stopped.