AI Labs Setup Guide
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
| Setup | Who it's for | You get | Time |
|---|---|---|---|
| 1. On your machine | One person, on a laptop or workstation | AI Labs at http://localhost:8000 | 5 minutes |
| 2. On a Docker server | One person or a small trusted team, on a VPS or server | AI Labs behind your own domain and TLS | 20 minutes |
| 3. One Computer per Studio user | An organization using Hrida AI Studio | Every Studio user gets their own isolated Computer, used from chat | 1 hour |
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 1 | Option 2 | Option 3 | |
|---|---|---|---|
| Host | Windows, macOS or Linux | A Linux server with Docker Engine and the Compose plugin | A Linux Docker host, on the same Docker network as Studio |
| Software | Python 3.10 or later, or uv | docker compose version works | Docker, plus access to ghcr.io/hrida-ai images |
| Resources | — | 4 GB RAM or more | 2 GB RAM per running Computer by default, plus the controller |
| A model | An API key for a provider (OpenAI, Anthropic, …) or a local model server | Same | A Studio model with function calling |
| Studio | Not needed | Not needed | Hrida 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:
echo "$GHCR_TOKEN" | docker login ghcr.io -u <github-username> --password-stdinOption 1: On Your Machine
Step 1: Install and Start
pip install cptr
cptr runOr, with uv, without installing anything permanently:
uvx cptr@latest runFor 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
mkdir -p ~/computer && cd ~/computer
# copy docker-compose-computer-prod.yaml from hrida-helm-charts/docker/computer/ into this folder
mkdir -p backupsThe 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:
| Setting | Default | Change it when |
|---|---|---|
ports | 127.0.0.1:8010:8000 | Port 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_limit | 4g / 2048 | The 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
docker compose -f docker-compose-computer-prod.yaml up -d
docker compose -f docker-compose-computer-prod.yaml logs -f computerThe 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:
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:
docker compose -f docker-compose-computer-prod.yaml stop computer
docker compose -f docker-compose-computer-prod.yaml --profile browser up -d computer-browsercomputer 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.
| Service | Image | Role |
|---|---|---|
computer-controller | ghcr.io/hrida-ai/computer-controller | Starts, stops and routes each user's Computer. The only service with the Docker socket. |
computer-egress | ghcr.io/hrida-ai/computer-egress | The 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:
{ "default-address-pools": [{ "base": "10.200.0.0/16", "size": 28 }] }sudo systemctl restart dockerRestarting 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/:
mkdir -p secrets
openssl rand -hex 32 > secrets/controller_api_key
chmod 600 secrets/controller_api_keyYou'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:
docker network inspect hrida-studio-overlay -f '{{.Attachable}}' # must print trueRun 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:
docker network create computer-mgmt
echo "COMPUTER_MGMT_NETWORK=computer-mgmt" >> .envThen 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
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:
docker exec <studio-container> curl -s http://computer-controller:8080/healthThe 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:
| Field | Value |
|---|---|
| Controller URL | http://computer-controller:8080 |
| Controller key | The contents of secrets/controller_api_key. Stored encrypted and never shown again. |
| Studio URL for Computers | How 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 agent | A Studio model with function calling, such as a strong vLLM- or API-hosted model |
| CPUs / Memory | Per Computer, for example 1 and 2g (capped by the controller's COMPUTER_MAX_CPUS) |
| Who may use Computer | The 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.
-
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. -
Tell the controller its address. In the
.envnext todocker-compose-computer-controller-prod.yaml, setCOMPUTER_UI_PUBLIC_URL=https://desk.computer.example.com, then rundocker compose -f docker-compose-computer-controller-prod.yaml up -dagain. The controller serves this address on127.0.0.1:8090only. -
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:nginxserver { 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.
-
Configure Studio. In Admin › Settings › Integrations › Computer:
Field Value Address for users The same address, for example https://desk.computer.example.comTerminal in Open my Computer On (the default) to give people the terminal too; off for files only Admins may open users' Computers Off (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.
-
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_keycreated,chmod 600 - Controller on Studio's network, port not published publicly
-
computer-controllerandcomputer-egressrunning,/healthanswers 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_URLand 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
| Setup | How |
|---|---|
| On your machine | pip install -U cptr, then restart cptr run. With uv, uvx cptr@latest run always runs the latest version. |
| Docker server | docker compose -f docker-compose-computer-prod.yaml pull, then up -d. Data in the cptr-data volume is kept. |
| Per Studio user | Pull 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
| Setup | How |
|---|---|
| On your machine | pip uninstall cptr. Delete ~/.cptr to remove its data. |
| Docker server | docker compose -f docker-compose-computer-prod.yaml down. Add -v to also delete the cptr-data volume and every file in it. |
| Per Studio user | Turn 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
| Problem | What to do |
|---|---|
| Lost the first-run link | Read it again from the log: docker compose … logs computer, or the terminal where cptr run started. |
Container can't write to /data | A 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 proxy | The 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 terminal | Computer was added under Manage Terminal. Remove it there and use Integrations › Computer (option 3). |
| Studio: All Computer workspaces are busy | COMPUTER_MAX_RUNNING Computers are running. Raise it, or wait for idle ones to stop. |
| Studio: The Computer did not become ready in time | Check 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 uses | The 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 model | Pick 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. |