> ## Documentation Index
> Fetch the complete documentation index at: https://docs.2501.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# infra

> Deploy and operate 2501 on Docker Swarm or Kubernetes

`2501 infra` manages the on-premise deployment: the stack itself, plus tenants, organizations, users, webhooks, and feature toggles. Most subcommands have short aliases (`t`, `o`, `u`, `ft`).

For deployment fundamentals (env files, configuration, troubleshooting), see [Deploy](/0.8/deployment/overview).

## Lifecycle

```bash theme={null}
# Workspace
2501 infra init             # create /etc/2501 with env templates (run by the installer)
2501 infra config           # show the effective configuration (defaults + overlay)
2501 infra config --defaults # show only the embedded defaults

# Deploy / upgrade / inspect
2501 infra deploy           # interactive: pick a version and deploy
2501 infra deploy --yes     # CI mode: fail on missing values, no prompts
2501 infra deploy --target kubernetes --image-tag <tag>
2501 infra deploy --remove  # tear the stack down
2501 infra deploy --restart [engine|command-center]
2501 infra deploy --history # last few deploys

2501 infra logs             # tail engine + command-center
2501 infra status           # alias: ps  — service health
```

## Tenant / org / user

```bash theme={null}
2501 infra tenant create --name "My Company" --llm-model "..." --multimodal-model "..."
2501 infra tenant list
2501 infra t create ...     # `t` alias

2501 infra org create --name "Engineering" --tenant-id ten_xxx
2501 infra org list
2501 infra o ...

2501 infra user create --email you@company.com --role ADMIN --tenant-id ten_xxx --org-id org_xxx
2501 infra user list
2501 infra u ...
```

## Webhooks (ServiceNow)

```bash theme={null}
2501 infra webhook create \
  --name prod-incidents \
  --source-type servicenow \
  --event-type incident \
  --gateway-id gtw_xxx
2501 infra webhook delete --id whk_xxx
2501 infra webhook ls
```

After creation, the CLI prints both the URL/secret and the **ready-to-paste ServiceNow Business Rule script**. See [Webhooks](/0.8/configure/webhooks).

## Feature toggles

```bash theme={null}
2501 infra feature list                 # show all toggles + state
2501 infra feature enable <key>         # alias: e
2501 infra feature disable <key>        # alias: d
2501 infra feature enable               # interactive multi-select picker
```

Full list of toggle keys: [Feature Toggles Reference](/0.8/deployment/troubleshooting#feature-toggles-reference).

## Where the rest lives

* **First-time install** — your account team's installer chains `init` automatically. See [Deploy → Overview](/0.8/deployment/overview).
* **Docker Swarm setup** — [Docker Swarm](/0.8/deployment/docker-swarm).
* **Kubernetes** — [Kubernetes](/0.8/deployment/kubernetes).
* **LLM provider seeding** — [LLM Providers](/0.8/deployment/llm-providers).
* **Troubleshooting** — [Troubleshooting](/0.8/deployment/troubleshooting).
