[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [local‑first/Owner](https://evolu.dev/docs/api-reference/common/local-first/Owner) › AppOwner

Defined in: [packages/common/src/local-first/Owner.ts:211](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/local-first/Owner.ts#L211)

The AppOwner represents the application owner. It's created using a
cryptographically secure random generator or derived from an external source,
e.g., mnemonic stored securely in a hardware device.

While it's possible to store all application data in AppOwner, the better
approach is to use it only for sync coordination. Storing all app data in
AppOwner means that data will be stored/synced forever. And that's a problem
if we want to provide real data deletion or in-app data migration without
data duplication. In local-first apps/distributed systems, we can't delete
individual changes, we only mark them as deleted, otherwise sync could not
work.

If we really want to delete data or at least avoid syncing it, we must store
it using a different owner than AppOwner, e.g. [ShardOwner](https://evolu.dev/docs/api-reference/common/local-first/Owner/interfaces/ShardOwner) or
[SharedOwner](https://evolu.dev/docs/api-reference/common/local-first/Owner/interfaces/SharedOwner), and delete that owner. The AppOwner itself must be
preserved because it coordinates deletion information across devices. Other
devices need to sync the information that an owner was deleted so they can
delete their local data as well.

## Privacy Considerations

AppOwner must never be shared with anyone.

AppOwner's [OwnerId](https://evolu.dev/docs/api-reference/common/local-first/Owner/variables/OwnerId) is used for authorization with
[createOwnerWebSocketTransport](https://evolu.dev/docs/api-reference/common/local-first/Owner/functions/createOwnerWebSocketTransport). Share it only with trusted relay
parties that must verify access, and do not share it with anyone else.

For data sharing scenarios, use [SharedOwner](https://evolu.dev/docs/api-reference/common/local-first/Owner/interfaces/SharedOwner) and
[SharedReadonlyOwner](https://evolu.dev/docs/api-reference/common/local-first/Owner/interfaces/SharedReadonlyOwner) to make intent explicit and distinguish
collaborative usage from [AppOwner](https://evolu.dev/docs/api-reference/common/local-first/Owner/interfaces/AppOwner) coordination.

## Extends

- [`Owner`](https://evolu.dev/docs/api-reference/common/local-first/Owner/interfaces/Owner).[`Typed`](https://evolu.dev/docs/api-reference/common/Type/interfaces/Typed)\<`"AppOwner"`\>

## Extended by

- [`DeviceAppOwner`](https://evolu.dev/docs/api-reference/common/local-first/Owner/interfaces/DeviceAppOwner)

## Properties

<a id="encryptionkey"></a>

### encryptionKey

```ts
readonly encryptionKey: Uint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length32"> & Brand<"EncryptionKey"> & Brand<"OwnerEncryptionKey">;
```

Defined in: [packages/common/src/local-first/Owner.ts:41](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/local-first/Owner.ts#L41)

TODO: Wrap with `Redacted` in the next major version.

#### Inherited from

[`Owner`](https://evolu.dev/docs/api-reference/common/local-first/Owner/interfaces/Owner).[`encryptionKey`](https://evolu.dev/docs/api-reference/common/local-first/Owner/interfaces/Owner#encryptionkey)

---

<a id="id"></a>

### id

```ts
readonly id: string & Brand<"Id"> & Brand<"OwnerId">;
```

Defined in: [packages/common/src/local-first/Owner.ts:39](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/local-first/Owner.ts#L39)

#### Inherited from

[`Owner`](https://evolu.dev/docs/api-reference/common/local-first/Owner/interfaces/Owner).[`id`](https://evolu.dev/docs/api-reference/common/local-first/Owner/interfaces/Owner#id)

---

<a id="mnemonic"></a>

### mnemonic

```ts
readonly mnemonic: string & Brand<"Trimmed"> & Brand<"MinLength1"> & Brand<"Mnemonic">;
```

Defined in: [packages/common/src/local-first/Owner.ts:219](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/local-first/Owner.ts#L219)

The mnemonic that was used to derive the AppOwner keys. Optional when the
AppOwner is created from external keys to avoid sharing the mnemonic with
the Evolu app.

TODO: Wrap with `Redacted` in the next major version.

---

<a id="type"></a>

### type

```ts
readonly type: "AppOwner";
```

Defined in: [packages/common/src/Type.ts:3492](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/Type.ts#L3492)

#### Inherited from

[`Typed`](https://evolu.dev/docs/api-reference/common/Type/interfaces/Typed).[`type`](https://evolu.dev/docs/api-reference/common/Type/interfaces/Typed#type)

---

<a id="writekey"></a>

### writeKey

```ts
readonly writeKey: Uint8Array<ArrayBufferLike> & Brand<"Entropy"> & Brand<"Length16"> & Brand<"OwnerWriteKey">;
```

Defined in: [packages/common/src/local-first/Owner.ts:77](https://github.com/evoluhq/evolu/blob/e7144e2bbe9069362b62dec1b64a8aa922b8f1b0/packages/common/src/local-first/Owner.ts#L77)

TODO: Wrap with `Redacted` in the next major version.

#### Inherited from

[`Owner`](https://evolu.dev/docs/api-reference/common/local-first/Owner/interfaces/Owner).[`writeKey`](https://evolu.dev/docs/api-reference/common/local-first/Owner/interfaces/Owner#writekey)