# Understanding computers **Page:** getting-started/computers [Download Raw Markdown](./getting-started/computers.md) --- # Understanding computers A Hoody computer is a full Linux computer, running Debian 13 by default. It runs systemd and has its own filesystem and its own network. Every Kit service has its own URL. Your own HTTP server listening on a port is reachable through the `http-{port}` service label ([serve your own app](/foundation/proxy/#serve-your-own-app)); files and databases are reached through `files-1` and `sqlite-1`. It is closer to a machine than to a Docker image: you can install Docker, Podman or LXC inside it to run your own containers, or, on a dedicated server, run a virtual machine inside it. The primary interface is HTTP rather than SSH or a deploy pipeline, so you `fetch` a computer instead of shelling into it. Every service URL is HTTPS over HTTP/1.1 and HTTP/2, and HTTP/3 on servers where it is turned on. The proxy issues and renews the certificates; there is nothing to configure. Deploying to a computer the conventional way still works too. By the end of this page you have a computer, its service URLs and a snapshot to return to. Set `HOODY_TOKEN` to your auth token ([create one](/foundation/hoody-api/authentication/#create-an-auth-token)), `PROJECT_ID` to a project ID (`hoody projects list` shows yours) and `SERVER_ID` to a server ID ([where it comes from](/foundation/computers/create-edit-delete/)). In the SDK example, define both as strings. After creation, set `COMPUTER_ID` to the new computer's ID for the lifecycle examples. ## Step 1: Create a computer 1. In the Hub, open **Computers** and choose **Get a computer**. 2. Under **Start from**, keep **A new computer**. Enter a **Name** and pick a **Server** and **Project**. 3. Choose **Get computer**. ```bash # Create a computer in your project hoody computers create --project "$PROJECT_ID" --name "backend" --server-id "$SERVER_ID" # List your computers hoody computers list ``` ```typescript import { HoodyClient } from 'hoody-sdk'; const client = new HoodyClient({ baseURL: 'https://api.hoody.com', token: process.env.HOODY_TOKEN }); const computer = await client.api.computers.create(PROJECT_ID, { server_id: SERVER_ID, name: 'backend' }); // running, or still creating: its services start once it is running console.log(computer.data.id); ``` ```bash curl -X POST "https://api.hoody.com/api/v1/projects/$PROJECT_ID/computers" \ -H "Authorization: Bearer $HOODY_TOKEN" \ -H "Content-Type: application/json" \ -d '{"server_id": "'"$SERVER_ID"'", "name": "backend"}' ``` The same call as a single GET URL. It runs through the `curl-1` service of a computer you already have, so the first computer comes from one of the other tabs. Every computer after that can come from a link. The response is the computer, `running` or still `creating`. Its [Hoody Kit](/kit/) services start once it is `running`, so give them a short wait. For this walkthrough, your auth token must have `computers.features.hoody_kit` and `computers.features.ai`. With an auth token, an omitted `hoody_kit` or `ai` is turned on only when the token has the matching permission; without it, the computer is created with that feature off. Sending `hoody_kit: true` or `ai: true` without the permission gets `403` ([what a computer includes](/foundation/computers/create-edit-delete/#choose-what-the-computer-includes)). ## Step 2: Open its service URLs Every service in every computer answers on the same hostname shape, and only the service label changes between them: ``` https://{projectId}-{computerId}-{service}[-{instance}].{server}.computers.hoody.com ``` Substituting a real project, computer and server gives the shell for that computer. Both IDs are 24 hexadecimal characters: ``` https://67e89abc123def456789abcd-890abcdef12345678901cdef-terminal-1.node-us.computers.hoody.com ``` Swap `terminal-1` for another label: `files-1`, `sqlite-1`, `display-1`, `browser-1`, `exec-1`, `agent-1`, `code-1`, `curl-1`, `daemon-1`, `cron-1`, `n-1`, `pipe-1`, `notes-1`, `watch-1`, `run-1`, `tunnel-1`, `logs-1`, `egress` or `vm-1`. What each one does: [Kit services](/getting-started/computers/reference/#kit-services). `hoody computers urls list` prints every Kit URL of a computer. In the Hub, open **Computers**, select the computer and open its **Connect** tab: **Program links** lists each service's URL with buttons to open or copy it. The URL is the interface: it tells you exactly which service you are talking to, with no port to memorize and no configuration file or network setup. The URLs open from any device with a browser, and the Hoody CLI drives them from any terminal. `ssh hoody.com` opens the hosted Hoody CLI. After you sign in, an account with a computer opens the [Hub](/foundation/cli/#open-the-hub-in-your-terminal); an account without one first offers a free computer. Before you share a URL, read who can open it: [open by default](/foundation/proxy/permissions/#open-by-default). A computer can run several instances of the same service. Three terminals, two SQLite URLs, and a browser: ``` https://PROJECT_ID-COMPUTER_ID-terminal-1.node-us.computers.hoody.com https://PROJECT_ID-COMPUTER_ID-terminal-2.node-us.computers.hoody.com https://PROJECT_ID-COMPUTER_ID-terminal-3.node-us.computers.hoody.com https://PROJECT_ID-COMPUTER_ID-sqlite-1.node-us.computers.hoody.com https://PROJECT_ID-COMPUTER_ID-sqlite-2.node-us.computers.hoody.com https://PROJECT_ID-COMPUTER_ID-browser-1.node-us.computers.hoody.com ``` All six run in the same computer. Each terminal instance has its own URL, its own process and its own state. The two SQLite URLs reach the same SQLite service; use `?db=app` and `?db=scratch` to select different databases. ## Step 3: Start, stop and snapshot it Snapshot before you make changes, and restore if something breaks. A restore discards the current filesystem and puts the snapshot's in its place, so the computer's current state is lost; a running computer restarts. Restore takes the snapshot's canonical `name`, not its alias ([naming](/foundation/computers/snapshots/reference/#naming)). Here the name is `before-experiment`: set `SNAPSHOT_NAME` to it before restoring (in the SDK, define it as a string). To look names up later, run `hoody snapshots list -c "$COMPUTER_ID"`; the HTTP and SDK create responses carry it at `data.snapshot.name`. Before your first restore, read [Restore a snapshot](/foundation/computers/snapshots/#restore-a-snapshot). 1. In the Hub, open **Computers** and select the computer. Choose **Start** or **Stop** in its menu. 2. To snapshot it, open **Backups** and choose **Take snapshot**. Enter `before-experiment` as the **Name**, then choose **Take snapshot**. 3. To restore, choose **Restore** on the snapshot's row, then **Restore computer**. ```bash # Start a stopped computer hoody computers start "$COMPUTER_ID" # Stop a running computer hoody computers stop "$COMPUTER_ID" # Snapshot before making changes hoody snapshots create -c "$COMPUTER_ID" --alias "before-experiment" # Restore if something breaks (the CLI asks you to confirm; add -y to skip the prompt) hoody snapshots restore "$SNAPSHOT_NAME" -c "$COMPUTER_ID" ``` ```typescript // Start await client.api.computers.start(COMPUTER_ID); // Stop await client.api.computers.stop(COMPUTER_ID); // Snapshot const snapshot = await client.api.snapshots.create(COMPUTER_ID, { alias: 'before-experiment' }); // Restore await client.api.snapshots.restore(COMPUTER_ID, SNAPSHOT_NAME); ``` ```bash # Start curl -X POST "https://api.hoody.com/api/v1/computers/$COMPUTER_ID/start" \ -H "Authorization: Bearer $HOODY_TOKEN" # Stop curl -X POST "https://api.hoody.com/api/v1/computers/$COMPUTER_ID/stop" \ -H "Authorization: Bearer $HOODY_TOKEN" # Snapshot curl -X POST "https://api.hoody.com/api/v1/computers/$COMPUTER_ID/snapshots" \ -H "Authorization: Bearer $HOODY_TOKEN" \ -H "Content-Type: application/json" \ -d '{"alias": "before-experiment"}' # Restore curl -X PUT "https://api.hoody.com/api/v1/computers/$COMPUTER_ID/snapshots/$SNAPSHOT_NAME" \ -H "Authorization: Bearer $HOODY_TOKEN" ``` Each action as a single GET URL. Route them through a **different** running computer's `curl-1` (`OTHER_COMPUTER_ID` below): a stopped computer cannot serve the request that starts it. ## How does a computer differ from a Docker container? | Feature | Docker | Hoody computers | | :--- | :--- | :--- | | Base system | Minimal layers | Debian 13 with systemd ([images](/foundation/computers/images/)) | | Networking | Internal bridge, port mapping | Every service has a public URL | | Access method | `docker exec` / SSH | HTTP from anywhere | | Built-in services | None; you bring everything | The [Hoody Kit](/kit/) HTTP services | | Collaboration | Not designed for it | Multiplayer by default | | Snapshots | Images by `docker commit`, without volume data | Full filesystem snapshots and restore | | Multiple instances | Separate containers | `terminal-1`, `terminal-2`... in the same computer | Docker containers are build artifacts; Hoody computers are full computers. ## What does a computer cost? Pricing is per server, not per computer: each plan is one server, and the computers on it are not charged ([Pricing](/foundation/pricing/)). Computers have no per-unit cost. Once a server exists, you can create as many as its capacity and [limits](/foundation/computers/create-edit-delete/reference/#limits) allow, including your project's computer limit (`max_computers`). Under per-VPS pricing, three environments at $40 a month each cost $120 a month. On Hoody, one server carries all of them. That removes the usual reason to ration environments: a dev computer, a staging copy, an experiment and an AI playground can each get their own computer. ## Advanced - **Restart, pause and force-stop:** the other lifecycle operations, and starting computers when their server boots, are on [Managing computers](/foundation/computers/managing/). - **Change or delete a computer:** an update changes its name, environment variables or SSH key, and a delete removes it ([Create, Edit, Delete](/foundation/computers/create-edit-delete/)). - **Copy a computer:** duplicate one into another project or onto another server, for staging or an isolated experiment ([Copy and Sync](/foundation/computers/copy-sync/)). - **A plain computer without the Kit:** `hoody_kit: false` gives Linux without the Kit's HTTP services: you manage it over SSH with a key, and your own HTTP servers are still reachable through `http-{port}` ([what a computer includes](/foundation/computers/create-edit-delete/#choose-what-the-computer-includes)). - **Virtual machines inside a computer:** `vm-1` runs QEMU virtual machines and needs `/dev/kvm`, which KVM passthrough gives a computer on a dedicated server only ([Virtual Machines](/foundation/servers/virtual-machines/)). ## Reference Every Kit service a computer includes, with its URL label and what it does: [Understanding computers reference](/getting-started/computers/reference/). ## What's next - [The Hoody Proxy](/getting-started/proxy/): who can open these URLs - [Managing computers](/foundation/computers/managing/): every lifecycle operation - [Computers](/concepts/computers/): what each lifecycle state means - [The Hoody Kit](/kit/): each service in depth