# Host fxbot on a server

On a server, or a machine that's always on, `setup.sh` installs fxbot as containers: the app, its database, and the local embedder for memory search, with podman or docker, started at boot. It runs on older Linux too, where the app can't, such as Ubuntu 22.04 and RHEL 9. On your own computer, [install the app](/docs/how-to/install-on-your-computer/) instead.

You need a Linux machine with systemd, where you can use `sudo`: Debian 12 or 13, Ubuntu 22.04 or 24.04, Fedora, AlmaLinux 9 or 10, openSUSE Tumbleweed or Leap 16, Arch, or a distro built on one of them. On Windows, WSL 2's Ubuntu works, with systemd on. It needs an x86_64 or arm64 CPU, 3 GB free in `/var/lib`, and 1 GB of memory free, more for each bot's computer.

## Install it

On the machine, run:

```sh
curl -fsSL https://fxbot.sh/setup.sh | sudo bash
```

The script checks the machine first, and stops with what to do if it can't install there ([Fix an install that stopped](/docs/how-to/fix-an-install/)). Then it names each step in bold as it goes: the container engine, Compose, the fxbot user and its key, the release, the images, and the services. It uses the engine that's there, a Docker that's running or podman, and with neither, it installs podman, or Docker's own `docker-ce` where the distro's podman is too old. Downloading the three images can take a few minutes, with their progress shown, and the embedder downloads its model, 310 MB, on its first start. It ends with:

```
fxbot <version> runs on http://127.0.0.1:8787
Open it there, or reach it:
  from your phone: add Web pairing in Plugins (https://fxbot.sh/docs/how-to/reach-it-from-your-phone/)
  from your computer, over SSH:  ssh -N -L 8787:127.0.0.1:8787 <you>@<this machine>
  with Tailscale:  sudo tailscale serve --bg 8787
Settings shows each new release, with an Update button. To uninstall: sudo fxbot uninstall
```

Check that it's up:

```sh
curl http://127.0.0.1:8787/api/health
sudo fxbot status
```

The first answers `{"ok":true,"version":"<version>"}`. The second names the version, the engine, and where the local embedder runs, then lists three containers, `fxbot`, `db`, and `embed`. What `setup.sh` creates is in [What setup.sh creates](/docs/reference/install-layout/), and its options in [Commands](/docs/reference/commands/#setupsh).

## Open it

fxbot listens only on the server's own loopback. From your computer, run this, and keep it running:

```sh
ssh -N -L 8787:127.0.0.1:8787 <you>@<the server>
```

While it runs, open `http://127.0.0.1:8787` on your computer. fxbot shows **Set up fxbot**: carry on from [Set up fxbot](/docs/tutorials/first-fxbot/#set-up-fxbot). After that, [web pairing](/docs/how-to/reach-it-from-your-phone/) reaches it from your phone and your other computers, with no tunnel.

To update it, see [Update to a new release](/docs/how-to/update/), and to keep a copy, [Back up fxbot](/docs/how-to/back-up/).