# Local Tenants (/docs/run/tenants)



```sh
npx nylorun start
```

In a project, the first `start` creates the Tenant, writes the project link,
seeds the model from `.env`, starts the containers, and opens Studio signed in.
Later starts reuse that Tenant.

| Command                             | What it does                                                    |
| ----------------------------------- | --------------------------------------------------------------- |
| `start` (alias `up`)                | Create on first run, start containers, open Studio.             |
| `stop` (alias `down`)               | Stop containers. Volumes stay. `--all` stops every Tenant.      |
| `status [--json]`                   | Tenant, services, endpoints, and Runtime health.                |
| `logs [service] [-f] [--tail n]`    | Container logs.                                                 |
| `ls [--json]`                       | Tenants on this machine.                                        |
| `studio [--no-open]`                | Mint a Studio login.                                            |
| `reset [--yes]`                     | Delete this Tenant's data. The next start creates a new Tenant. |
| `delete <tenant> --yes`             | Remove containers, volumes, files, and the vault key.           |
| `doctor [--json]`                   | Node, Docker, Compose v2, and Tenant health.                    |
| `telemetry status\|enable\|disable` | Studio page-view analytics.                                     |

`start` flags: `--tenant <name>`, `--no-link`, `--no-studio`, `--no-open`,
`--allow-downgrade`, `--restate-ui`, `--studio-embed-origin`.

## Names [#names]

A command acts on one Tenant, chosen in this order:

1. `--tenant <name>`
2. `NYLORUN_TENANT`
3. The project link
4. For `start` in a project: the directory name
5. Otherwise: `default`

Several Tenants run side by side. Each has its own containers, network,
volumes, and ports. `nylorun ls` lists them.

## Ports and data [#ports-and-data]

| Listener  | Default          |
| --------- | ---------------- |
| Runtime   | `127.0.0.1:8787` |
| Admin API | `127.0.0.1:8788` |
| Studio    | `127.0.0.1:4161` |

Free ports are chosen when those are taken, and kept in the Tenant's `.env`.
Restate's UI is published only with `--restate-ui`.

Containers: `runtime`, `gateway`, `harness` (all the Runtime image), `studio`,
`postgres` 17, `restate`, `s2-lite`, `rustfs`, and `sandboxes` only after
`nylorun sandbox enable`.

State lives in `~/.nylorun/tenants/<name>/` (or `NYLORUN_HOME`): Tenant files,
Docker compose, plugins, and `keys/vault-kek`. Session data lives in Docker
volumes.

## Upgrades [#upgrades]

Each `nylorun` release pins its images. `start` refuses to run an older
Runtime than the Tenant last ran. Pass `--allow-downgrade` only when both
versions share a database schema.

`reset` deletes this Tenant's data so the next start creates a new Tenant.
`delete <name> --yes` removes the Tenant entirely, vault key included.

## Next step [#next-step]

<Cards>
  <Card title="Action endpoints" description="Serve tools so the Runtime can call them." href="/docs/run/action-endpoints" />

  <Card title="CLI" description="Every command and flag." href="/docs/run/cli" />
</Cards>
