Skip to main content

AI Labs Setup Guide

Install and set up AI Labs (Computer) step by step: on your own machine, as a Docker server, or as one isolated Computer per Hrida AI Studio user.

AI Labs, also called Computer (cptr), runs a whole machine in the browser: files, terminal, editor, Git, a browser and an AI agent. This guide takes you from nothing to a working setup, in one of three ways.

Choose How to Run It​

SetupWho it's forYou getTime
1. On your machineOne person, on a laptop or workstationAI Labs at http://localhost:80005 minutes
2. On a Docker serverOne person or a small trusted team, on a VPS or serverAI Labs behind your own domain and TLS20 minutes
3. One Computer per Studio userAn organization using Hrida AI StudioEvery Studio user gets their own isolated Computer, used from chat1 hour
Options 1 and 2 are single-tenant

Anyone signed in to AI Labs has full access to its filesystem and shell, like an SSH session. Share an instance only with people you would give SSH access to. For many users, use option 3, which isolates each user in their own container. See the Security Model.

Before You Start​

Option 1Option 2Option 3
HostWindows, macOS or LinuxA Linux server with Docker Engine and the Compose pluginA Linux Docker host, on the same Docker network as Studio
SoftwarePython 3.10 or later, or uvdocker compose version worksDocker, plus access to ghcr.io/hrida-ai images
Resources—4 GB RAM or more2 GB RAM per running Computer by default, plus the controller
A modelAn API key for a provider (OpenAI, Anthropic, …) or a local model serverSameA Studio model with function calling
StudioNot neededNot neededHrida AI Studio with the Computer integration (the next Studio release; see Studio Release Notes)

If the images are private, sign in to the registry first, with a token that has read:packages:

bash
echo "$GHCR_TOKEN" | docker login ghcr.io -u <github-username> --password-stdin

Option 1: On Your Machine​

Step 1: Install and Start​

bash
pip install cptr
cptr run

Or, with uv, without installing anything permanently:

bash
uvx cptr@latest run

For MCP tool servers, install the extra: pip install 'cptr[mcp]', or 'cptr[all]' for every optional feature.

Step 2: Create the Admin Account​

cptr run prints a link with a one-time startup token, http://localhost:8000/?token=…, and opens it in your browser. Use it to create the first admin account. After that, you sign in normally.

Step 3: Connect a Model​

As the admin, open Settings › Admin › Connections and add a provider: an API key for OpenAI, Anthropic or another provider, or the URL of a local server such as vLLM or Ollama. Verify it, then pick a model in Settings › Admin › Models. See AI Agent and Administration.

Step 4: Check It Works​

Open a new chat and ask: "Create hello.py that prints today's date, and run it." The agent writes the file, runs it in the terminal, and shows the output. The file appears in the file browser.

Your data is in ~/.cptr (database, settings, logs and memory). Set CPTR_DATA_DIR to keep it elsewhere. Every command-line option is in Installation.


Option 2: On a Docker Server​

This uses the published image and the production Compose file from hrida-helm-charts/docker/computer/.

Step 1: Get the Compose File​

bash
mkdir -p ~/computer && cd ~/computer
# copy docker-compose-computer-prod.yaml from hrida-helm-charts/docker/computer/ into this folder
mkdir -p backups

The folder you run it from becomes the agent's /workspace, so start it where the agent should see your files.

Step 2: Review the Settings​

Settings are written directly in docker-compose-computer-prod.yaml; there is no .env file. Check these before the first start:

SettingDefaultChange it when
ports127.0.0.1:8010:8000Port 8010 is taken on the host, or your HTTPS proxy isn't on this host (the app listens on 127.0.0.1 only, so the internet can't reach it over plain HTTP)
mem_limit / pids_limit4g / 2048The agent runs heavy builds
CPTR_BACKUP"0"You want continuous database backup to ./backups (set "1")

Every other setting is in Configuration.

Step 3: Start It​

bash
docker compose -f docker-compose-computer-prod.yaml up -d
docker compose -f docker-compose-computer-prod.yaml logs -f computer

The log prints the first-run link, http://localhost:8010/?token=…. On a remote server, open it through an SSH tunnel (ssh -L 8010:localhost:8010 <server>) and create the admin account.

Step 4: Add HTTPS​

Put a reverse proxy with TLS in front of port 8010. It must pass WebSocket upgrades, because terminals and chat streaming use them. With Nginx:

nginx
location / {
    proxy_pass http://127.0.0.1:8010;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_read_timeout 3600s;
}

Then point your domain at the server, get a certificate (for example with Certbot), and set CPTR_CORS_ALLOWED_ORIGINS to your domain. More options: HTTPS & Reverse Proxies.

Step 5: Connect a Model and Check It Works​

As in option 1: add a provider under Settings › Admin › Connections, then ask the agent to create and run a small script.

The browser image. For the agent's browser tools, run computer-browser (image tag latest-browser, host port 8011) instead of computer, and point the proxy at port 8011:

bash
docker compose -f docker-compose-computer-prod.yaml stop computer
docker compose -f docker-compose-computer-prod.yaml --profile browser up -d computer-browser
Run one server per data volume

computer and computer-browser share the cptr-data volume. Running both made every messaging bot run twice (Slack split the messages between them; Telegram refuses a second listener) and let a restart of one stop the other's answers with "interrupted by server restart". Current images run the bots, timers and restart clean-up in only one server, but run just one.

For air-gapped servers, see Docker & Air-Gapped.


Option 3: One Computer per Studio User​

Each Studio user who is granted access picks the Computer model in chat, and their own isolated Computer carries out the task and returns its reports to the chat. How it works and what is isolated: Computer in Hrida AI Studio.

You deploy two services. The controller creates the users' Computers itself.

ServiceImageRole
computer-controllerghcr.io/hrida-ai/computer-controllerStarts, stops and routes each user's Computer. The only service with the Docker socket.
computer-egressghcr.io/hrida-ai/computer-egressThe Computers' only way to the web. Blocks internal addresses and logs every request.

Step 1: Give Docker Address Space​

Every user's Computer gets its own Docker network. On the Docker host, add this to /etc/docker/daemon.json (room for 4096 networks), then restart Docker:

json
{ "default-address-pools": [{ "base": "10.200.0.0/16", "size": 28 }] }
bash
sudo systemctl restart docker

Restarting Docker restarts its containers. Do it in a maintenance window if Studio runs on the same host.

Step 2: Create the Controller Key​

In the folder where you'll run the controller, next to docker-compose-computer-controller-prod.yaml from hrida-helm-charts/docker/computer/:

bash
mkdir -p secrets
openssl rand -hex 32 > secrets/controller_api_key
chmod 600 secrets/controller_api_key

You'll paste this key into Studio in step 5. Keep it secret: it controls every user's Computer.

Step 3: Connect the Controller to Studio's Network​

Studio must reach the controller, but nothing else should. Pick the case that matches your Studio:

Studio runs as a Docker Swarm stack

The controller joins Studio's overlay network, hrida-studio-overlay (the default). It must be attachable:

bash
docker network inspect hrida-studio-overlay -f '{{.Attachable}}'   # must print true

Run the controller on the Swarm node where the Computers should run.

Studio runs with plain Docker Compose

Create a shared network and attach both sides to it:

bash
docker network create computer-mgmt
echo "COMPUTER_MGMT_NETWORK=computer-mgmt" >> .env

Then add computer-mgmt as an external network to the Studio service in Studio's Compose file, and recreate Studio.

Never publish the controller's port on a public address.

Step 4: Start the Controller​

bash
docker compose -f docker-compose-computer-controller-prod.yaml up -d
docker compose -f docker-compose-computer-controller-prod.yaml ps    # both services "running"

Check that Studio can reach it, from inside the Studio container:

bash
docker exec <studio-container> curl -s http://computer-controller:8080/health

The first start also pulls the Computer image (ghcr.io/hrida-ai/computer:latest), which takes a few minutes.

Step 5: Configure Studio​

In Studio, open Admin › Settings › Integrations › Computer:

FieldValue
Controller URLhttp://computer-controller:8080
Controller keyThe contents of secrets/controller_api_key. Stored encrypted and never shown again.
Studio URL for ComputersHow a Computer reaches Studio, for example https://studio.example.com. If that address is private, allow its host name in the egress proxy with EGRESS_ALLOW_INTERNAL_HOSTS.
Model for the Computer's agentA Studio model with function calling, such as a strong vLLM- or API-hosted model
CPUs / MemoryPer Computer, for example 1 and 2g (capped by the controller's COMPUTER_MAX_CPUS)
Who may use ComputerThe users and groups to grant. Admins always can.

Click Test connection, then Save Computer settings, and turn Computer on.

Step 6: Give Users the Agent's Model​

Every user granted Computer must also have access to the agent's model, because the Computer calls it as that user. Check the model's access in Workspace › Models.

Step 7: Check It Works​

Sign in as a granted user, choose the Computer model in a new chat, and ask: "Research the three largest cloud providers' GPU prices and write a short report."

  • The chat shows Starting your Computer… for a few seconds the first time.
  • The agent's steps stream into the chat.
  • The report files appear under the answer as Reports from your Computer.

As an admin, Show users' Computers (in the Computer settings) now lists that user's Computer, its status and disk use.

Step 8: Let People Open Their Own Computer (Optional)​

With this step, each user can open their own Computer in a browser tab, from Open my Computer under Work Hub in Studio's user menu. They see all its files, not only the reports under an answer, and can use its terminal. See Open Your Computer.

  1. Choose a host name for it, for example desk.computer.example.com, and point it at the server running the controller. It must not be Studio's host name.

  2. Tell the controller its address. In the .env next to docker-compose-computer-controller-prod.yaml, set COMPUTER_UI_PUBLIC_URL=https://desk.computer.example.com, then run docker compose -f docker-compose-computer-controller-prod.yaml up -d again. The controller serves this address on 127.0.0.1:8090 only.

  3. Add HTTPS with a reverse proxy in front of 127.0.0.1:8090. It must pass WebSocket upgrades (the terminal uses them) and the original host name. With Nginx:

    nginx
    server {
        server_name desk.computer.example.com;
        location / {
            proxy_pass http://127.0.0.1:8090;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $host;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_read_timeout 3600s;
            client_max_body_size 200m;
        }
    }

    Then get a certificate, for example with Certbot.

  4. Configure Studio. In Admin › Settings › Integrations › Computer:

    FieldValue
    Address for usersThe same address, for example https://desk.computer.example.com
    Terminal in Open my ComputerOn (the default) to give people the terminal too; off for files only
    Admins may open users' ComputersOff (the default). On adds an Open button for each user in Show users' Computers, for support.

    Click Save Computer settings. Nothing else changes: the controller URL and key stay as they are.

  5. Check it. Sign in as the user from step 7 and, in the user menu, choose Work Hub › Open my Computer. A new tab opens their Computer, signed in. Its file browser shows the report from step 7 under workspace/reports/. As an admin, Admin › Trust › Audit log, filtered by the action OPEN, shows the opening.

Setup Checklist​

  • Docker address pools set and Docker restarted
  • secrets/controller_api_key created, chmod 600
  • Controller on Studio's network, port not published publicly
  • computer-controller and computer-egress running, /health answers from Studio
  • Studio: controller URL and key, Studio URL, agent model, limits, users and groups, turned on
  • Granted users can use the agent's model
  • A test task returned a report
  • Optional: Open my Computer on its own host name with HTTPS, COMPUTER_UI_PUBLIC_URL and Address for users set to it, and a test user opened their Computer

Tuning (idle timeout, disk quota, how many Computers run at once, how long an opened Computer stays signed in) and the controller's API are in Computer Controller.


Upgrading​

SetupHow
On your machinepip install -U cptr, then restart cptr run. With uv, uvx cptr@latest run always runs the latest version.
Docker serverdocker compose -f docker-compose-computer-prod.yaml pull, then up -d. Data in the cptr-data volume is kept.
Per Studio userPull a new ghcr.io/hrida-ai/computer image, or set COMPUTER_IMAGE to a new tag. Each Computer switches at its next start, so no running task is cut off. Upgrade the controller with docker compose … pull and up -d.

Check the AI Labs Release Notes before upgrading.

Uninstalling​

SetupHow
On your machinepip uninstall cptr. Delete ~/.cptr to remove its data.
Docker serverdocker compose -f docker-compose-computer-prod.yaml down. Add -v to also delete the cptr-data volume and every file in it.
Per Studio userTurn Computer off in Studio, delete the Computers from Show users' Computers (with their files), then docker compose -f docker-compose-computer-controller-prod.yaml down.

Troubleshooting​

ProblemWhat to do
Lost the first-run linkRead it again from the log: docker compose … logs computer, or the terminal where cptr run started.
Container can't write to /dataA bind-mounted folder must be writable by the container user. Use the named volume, or fix the folder's owner.
Terminal or chat stops streaming behind a proxyThe proxy isn't passing WebSocket upgrades, or times out idle connections. Use the Nginx settings above.
VCRUNTIME140.dll missing (Windows)Install Microsoft's Visual C++ Redistributable and restart cptr.
Studio: This is a Hrida Computer server, not a terminalComputer was added under Manage Terminal. Remove it there and use Integrations › Computer (option 3).
Studio: All Computer workspaces are busyCOMPUTER_MAX_RUNNING Computers are running. Raise it, or wait for idle ones to stop.
Studio: The Computer did not become ready in timeCheck docker logs computer-controller and the user's Computer, docker logs cptr-u-<hash>.
Studio: You don't have access to the model the Computer's agent usesThe user can't use the agent's model. Share it with them in Workspace › Models › Access (step 6).
Studio: The model for the Computer's agent is not available or has no modelPick an available model with function calling in Admin › Settings › Integrations › Computer.
Chat: Client error '400 Bad Request' for url '…/api/chat/completions'Studio refused the Computer's model call. The usual reason is that the user has no access to the agent's model (see above). Current Computer images show Studio's reason after the status. Older ones show only the status, so update the image.

More: Computer in Hrida AI Studio › Troubleshooting.

Hrida.ai is proprietary software of Zlabs Innovation. See the license for terms. © 2026 Zlabs Innovation.