> ## Documentation Index
> Fetch the complete documentation index at: https://opencomputer.manicule.dev/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://opencomputer.manicule.dev/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://opencomputer.manicule.dev/api/mcp.
> Every agent surface: https://opencomputer.manicule.dev/.well-known/llms-manifest.json

# Deployments and environments (/agents/deployments)

<!-- agent-signals: reading_time_min: 2 · est_tokens: 858 · updated: 2026-10-20 -->
Related: [Serverless Agents](/agents/overview.md), [How it works](/agents/mental-model.md), [Quickstart](/agents/quickstart.md), [Projects and agents](/agents/projects.md), [Reactive agents](/agents/reactive-agents.md), [Sessions and turns](/agents/sessions.md)

> Understand development, production, immutable deployments, and aliases

A deployment is an immutable build of one agent. An alias gives a stable name
to the deployment clients should run.

New projects have one environment, `default`. Every deploy creates an immutable
deployment and makes it the current one; sessions keep the deployment they
were admitted with. Use separate projects when you need distinct development
and production targets.

Projects created before single-environment mode are legacy projects with two
working environments:

| Environment | Alias         | How it changes                                       |
| ----------- | ------------- | ---------------------------------------------------- |
| Development | `development` | `npm run deploy -- --watch` publishes source changes |
| Production  | `production`  | An explicit deploy advances it                       |

Sessions keep the deployment they started with. Publishing another version
does not change the code underneath an existing session.

## Deploy to production (legacy projects)

From the project directory:

```bash
npm run deploy -- --alias production
```

Every deploy first runs `opencomputer doctor`, a local static scan for invalid
connection origins, misplaced tools, and missing secret declarations, and then
prints the project it resolved and the cloud id each local agent deploys as.
Run `opencomputer doctor --json` directly to get structured diagnostics, with
the same resolution under `resolution`, before invoking a deployment agent.

The CLI builds the current source, creates an immutable deployment, and moves
the `production` alias to it. Development remains available for further work.

## Choose a region

By default, an agent's sandbox runs wherever capacity is available, usually in
the United States. To run it elsewhere, set `region` in the agent's
`opencomputer.toml` and deploy again. See [Regions](/agents/regions) for the
allowed values and what a region covers.

## Restrict outbound network

By default, an agent's sandbox can reach any address on the internet. To allow
only the hosts it needs, add an `[egress]` table with an `allow` list to the
agent's `opencomputer.toml` and deploy again. See
[Outbound network](/agents/egress) for what each entry allows and the rules.

To have its traffic leave from fixed IP addresses that others can allowlist,
set `fixed_ips` in the same table. See
[Fixed IP addresses](/agents/egress#fixed-ip-addresses).

## Select an agent and environment

Clients identify an agent with `agent-id@alias`:

```text
support@development
support@production
```

Single-environment projects use bare `agent-id` (or `agent-id@default`); older
clients sending `agent-id@development` resolve to the same deployment, while
`agent-id@production` is rejected with `single_environment_project`. Explicit
`--environment` and `--alias` flags are rejected for these projects; `link`
persists the project and `--project` overrides it for one command.

Legacy project dashboards keep the environment selector to change which
deployment you are inspecting. The playground has a separate agent selector when a project
contains more than one agent.

## Review history

Open the project's **Deployments** page to inspect immutable versions, their
aliases, and creation times. Use the deployment ID when correlating a session
with [logs](/agents/logs) or the [debug inspector](/agents/playground).
