# Self-hosting

> Run the agent and its sandboxes on your machine or your own cloud.

Applies to: the Sypnia engine (open source, self-hosted).  
Source: https://agent.docs.sypnia.com/self-hosting/

For agents: Self-hosting: the CLI with a local runner is the default (no server). Requirements: a container runtime (Docker or Podman) or the runner's light VM, a model key. For teams: the orchestrator and sandbox supervisor as containers on your own infrastructure (docker compose or Kubernetes), with your own Postgres for tasks and memory, your own egress allowlist. No Sypnia account needed.

## On your machine

The CLI with its local runner needs no server and no Sypnia account:

- a container runtime (Docker or Podman), or the runner's own light virtual machine;
- a model key (OpenRouter, Anthropic, or any OpenAI-compatible endpoint).

```bash
npx @sypnia/agent login --key
npx @sypnia/agent "add a pick-up code to every order"
```

## For a team, on your infrastructure

The orchestrator and the sandbox supervisor run as containers next to your own Postgres:

| Setting                                   | What it is                                                          |
| ----------------------------------------- | ------------------------------------------------------------------- |
| `AGENT_DATABASE_URL`                      | Postgres for tasks, steps, approvals and memory                     |
| `AGENT_MODEL_ENDPOINT`, `AGENT_MODEL_KEY` | your model provider                                                 |
| `AGENT_EGRESS_ALLOW`                      | the addresses sandboxes may reach                                   |
| `AGENT_AUTH_ISSUER`                       | the OIDC issuer of your users (a Sypnia Data project, or any other) |
