# komrad engine ensure

Create an engine's identity and logins, or reset their password

[komrad engine](https://komrad.dev/latest/cli/engine.md)

```bash
komrad engine ensure NAME
```

An engine is one komrad server and what it owns. Everything it writes belongs to it, and Postgres keeps every other engine's rows out of its reach, because it connects as a login of its own that the database maps to its identity. This creates that identity if no engine has the name yet, a login for it and a read-only login for its MCP query tools, and the schema its job queue lives in, connecting as owner\_database\_url.

Both logins take the password in KOMRAD\_ENGINE\_PASSWORD, or a fresh one when that is unset, and running it again resets them to it. It prints the database\_url the engine connects with. Naming an engine that already exists, such as the default one every row written before engines had logins belongs to, hands it new logins and keeps its rows.

## Inherited flags

| Flag | Type | Description |
| --- | --- | --- |
| [`--config`](https://komrad.dev/latest/cli/engine/ensure.md#inherited-config) | stringArray | path to a config TOML, repeatable, later files win over earlier ones |
| [`--engine`](https://komrad.dev/latest/cli/engine/ensure.md#inherited-engine) | string | engine to reach: local for this machine, or a file in the config's engines directory, layered over the config |
