UneloraDocs
Computers

Local VM

Run desktop work inside an isolated Docker or Podman environment.

The Local VM gives each bot a containerized Linux desktop on the same machine as Unelora. It is useful for browser work, downloads, and repeatable automation that should not run directly on your host desktop.

To put the desktop container on your own Linux server instead of this host, follow Your own VPS (BYO). Hosting the whole Unelora server is covered separately in Deploy on a VPS.

Requirements

  • Docker Desktop, Docker Engine, or a supported Podman setup
  • Enough local memory and disk for the desktop image
  • A healthy container runtime available to the Unelora process

The runtime must be reachable from the Unelora server itself. The published server image (the Docker install from Deploy on a VPS) has no Docker or Podman inside its container, so private desktops stay at Install the app that runs private desktops there even when the host has Docker. On that kind of install, use Cloud desktops instead. Your own VPS (BYO) does not help there either: it also needs the Docker client on the computer that runs Unelora.

On Windows, Podman is the preferred Local VM runtime. Unelora checks Podman before Docker and validates the exact Windows-to-VM workspace mount before reusing a container.

Before starting two desktops on Windows, confirm the Podman machine is running and has enough shared CPU, memory, and disk for both. Podman Desktop exposes that machine under Settings → Resources; both Unelora desktops consume the same machine budget.

Run two bot desktops

  1. Open Settings → Desktops & browser, choose Set up next to Private desktops (it reads Manage once they are ready), then Details. Prepare the managed desktop image and, under Isolation, choose Per bot.
  2. Set Maximum per-bot desktops to 2.
  3. Give two bots Private desktop as their computer and create each desktop from that bot's Screen panel.
  4. Choose Open two desktops from either bot to watch both in one workspace.

Both desktops may keep running, but only one pane can hold interactive control at a time. Switching control releases the previous pane first; opening the two-up workspace never creates or starts a VM.

The equivalent source configuration is:

{
  "localVm": {
    "mode": "per-bot",
    "maxInstances": 2
  }
}

Local VMs always run on the same physical host as the Unelora desktop process. maxInstances: 2 does not pool one VM from a Mac and another from a Windows PC. To use Windows capacity today, run Unelora on Windows with its supported Podman lane and create both per-bot desktops there. The BYO-VPS backend is limited to an x86_64 Linux Docker host; do not point it at Windows as a substitute remote Local VM. Cross-host Mac and Windows pooling is tracked in issue #508.

Memory and CPU

Each desktop gets 4 GiB of memory, with no swap beyond it, and 2 CPUs. To change that, set memoryGb and cpus in config.json. Both are whole numbers: memoryGb from 2 to 128, and cpus from 1 to 64 but no more than your container runtime has (on Docker Desktop, its VM's CPU setting). A value outside those rules makes Unelora ignore the whole file, so check the server log after editing.

{
  "localVm": {
    "memoryGb": 8,
    "cpus": 4
  }
}

A new desktop is created with these limits. On Docker and Podman, Unelora also applies them to a stopped desktop when it next starts; if the runtime refuses the change, the desktop starts with its old limits. On Apple container, remove and recreate the desktop to apply them. Every running desktop counts against the machine's memory, so leave room for Unelora itself.

Installing packages

A bot can install system packages in its desktop with sudo apt-get install. Packages installed this way live in the desktop's own filesystem, not the durable workspace, so recreating the desktop (or an update that recreates it) removes them. User-level installs such as pip install --user or anything under ~/.local are stored in the workspace and survive recreation.

On Linux with Docker Engine, or with Podman when Unelora runs as root, a desktop's root account is the host's root account. Those desktops therefore run with no-new-privileges: sudo is off and system packages cannot be installed. User-level installs still work. Use rootless Podman, with Unelora running as a regular user, when a bot needs sudo in its desktop.

Desktops made before this change keep their old capabilities until they are recreated. Where the desktop's root is the host's root (as above), Unelora recreates them once automatically. Elsewhere, remove and recreate a desktop from App Settings to let it install packages. Recreating keeps the durable workspace and browser sign-ins, but files elsewhere in the desktop, such as ~/Downloads, are lost.

Linux accounts

On Linux with Docker Engine, the desktop's cua account takes the user ID and group ID of the account running Unelora, so files the bot writes in its workspace belong to you on the host. The first start of a new desktop takes longer while it does this. If Unelora runs as root, the workspace is handed to user ID 1000 instead, which is the desktop's own cua account. Rootless Podman maps the IDs itself. Rootless Docker is not covered: its user IDs inside containers do not match the host's.

Reach a service on the Linux Docker host

New Local VMs on Linux with Docker Engine 20.10 or later can use host.docker.internal to reach a service on the Docker host. Docker resolves the name to its host gateway. To find the default bridge's gateway and subnet, run docker network inspect bridge on the host and look under IPAM → Config. For a desktop created before the alias was added, use that gateway address directly.

Bind the service, or a dedicated listener for it, to the bridge gateway address. Inside the Local VM, 127.0.0.1 is the desktop container's own loopback. If you use UFW, allow inbound traffic on the bridge interface to the service's specific address and port. For example, for a service that listens on 172.17.0.1:8080 and a Local VM at 172.17.0.2 on docker0, the rule is:

sudo ufw allow in on docker0 proto tcp from 172.17.0.2 to 172.17.0.1 port 8080

Use your actual interface, addresses and port. If the Local VM's address changes when it is recreated, update the rule. From the VM, check an endpoint the service provides, such as curl --fail --max-time 5 http://host.docker.internal:8080/health.

The environment map on an engine instance in config.json applies to the engine process. Commands run through the Local VM's shell have the desktop container's environment. Use the service's VM address in the bot's instructions or in an integration configured inside the VM.

Persistence

The bot's workspace and browser profile live in a durable mounted directory. Recreating the desktop can repair stale runtime state without deleting the durable workspace.

Ownership and reuse

Local VM ownership uses a renewable lease. Unelora validates the resolved image and container safety contract before reuse instead of trusting only a mutable image tag.

On this page