> From *AT Protocol Spaces: A Field Guide* on atproto.how, revised 2026-11-23.
> Web page: https://atproto.how/atproto-spaces-field-guide/10-operations
> Index for agents: https://atproto.how/llms.txt · Text CC BY-SA 4.0, code samples MIT.

# Chapter 10 · Operations

Running spaces is ongoing work, the normal operational work of any distributed system. Providers, applications, and data all have to stay healthy. Moving accounts and content should be worked through often enough to feel routine, and people should have the tooling and a plan for recovering from data loss before an incident happens. This chapter covers what happens to a space after it exists: deletion, migration, moderation, account status, and deciding what each user may see. Each reuses the mechanisms of earlier chapters, with a few space-specific rules.

**Outgrowing a provider.** The family space grows past what Marcus’s PDS can comfortably host, so he moves his account, and with it the space’s authority, to a new PDS. He exports the space’s metadata and his space repo, imports them on the new host, and points his DID document’s `#atproto_pds` service at it. Syncers see the change and reauthorize with the new host. The members' own repos don’t move at all. Migrating an account, below, walks through the steps.

**An emergency move.** Marcus’s PDS goes offline without warning. If he kept recent exports, he restores them on a new host and updates his DID document with a rotation key he holds himself, with no help from the old provider. Without backups, the policy, the member list, and his own records go with the old host. The members' records stay safe in their own repos.

**Reaching the end.** A space made for a family reunion has served its purpose. Marcus tells the family it’s closing, then deletes it. The host stops issuing credentials, deletes his records in the space, and notifies every registered syncer, which drops its copy. The members' records stay in their own repos. Deleting a space, below, has the details.

> **If you’re building an app**
>
> These are the things that happen after launch. Spaces get deleted, users move to other servers, content gets moderated, and accounts change status. Most of them reach your app as a notification or a firehose event, and each comes with a rule your app follows, such as deleting its copy of a deleted space or hiding an inactive author’s records. This chapter is also where your app decides what each of its users may see, since a credential gives your app the whole space.

Think through the scenarios above and build them into your integration tests. At the very least, your app should handle a space that migrates to a new host and a space that is deleted. A space that moves to a new authority is harder, since its URI changes and records that point into it may need rewriting, but it happens rarely, if at all.

<a id="deleting-a-space"></a>

## 10.1 Deleting a space

The authority calls `deleteSpace` (`manage=delete`), and the deletion then runs in this order.

1. The host stops issuing credentials for the space and deletes the authority’s own records in it \[spec\].
2. The host sends `notifySpaceUpdate` with `#spaceDeleted` to every registered syncer, including lapsed registrations. It delivers this notice as reliably as an expiry notice.
3. Each syncer that receives the notice reauthorizes. `authorizeSpaceSync` answers a deleted space with `SpaceDeleted` whatever the request’s authorization, and only that answer confirms the deletion.

   The notice does carry the syncer’s notify token, but that token is a shared secret the syncer chose, not a signature from the host. Anyone who learns it can send a convincing notice, and a deletion can’t be undone, so the syncer checks with the host before it drops anything.
   . The syncer deletes every copy of the space’s data it holds, including derived state.

A syncer that missed the notice learns of the deletion the next time it reauthorizes. Any other failure says nothing about the space, so the syncer keeps its copy \[spec\]. The authority should keep a record of the deletion until every syncer registered at the time has been notified or has had its registration dropped.

Members' repos are not touched. Members fully own and control their own data, and an authority has no power to alter their records. After a deletion, each member still holds a copy of their records on their own PDS, readable only by them. An authority may recreate a deleted space with the same type and `skey`, and surviving member records become readable again under the new policy \[spec\]. Deleting the authority’s account deletes all its spaces, and syncers learn of it through the account events on the firehose.

<a id="migrating-an-account"></a>

## 10.2 Migrating an account

> *In the family space.* Marcus wants to move his account to another PDS. The reunion event and his other records travel in his space repo. The space’s policy, member list, and writer set are kept by his PDS as the space host, so they have to be moved separately.

Migration follows the public-repo pattern, repeated per space, plus host-side state for spaces the account is the authority of \[spec\]. It runs in four phases: list what has to move, export and copy it, import it on the new host, and verify the copy before anything points at the new host.

<a id="1-list-spaces"></a>

### 10.2.1 1. List spaces

Start on the old host with `listSpaces`, which lists every space the account holds a repo in or is the authority of. That is exactly what needs to move. It takes optional `spaceDid` (authority) and `spaceType` filters, a `limit` from 1 to 100 (default 50), and a `cursor`. Each `spaceView` in the response describes the caller’s repo in one space, and `spaceRev` appears only when the caller is the authority \[spec\]. Keep the response, since phase 4 checks the new host against it.

**Reference: `listSpaces`** \[spec\]

Marcus asks his old PDS what he has to move.

```http
GET /xrpc/com.atproto.space.listSpaces?limit=50
Host: pds-a.example.com
Authorization: DPoP eyJ0eXAiOiJhdCtqd3QiLCJhbGciOi...
DPoP: eyJhbGciOiJFUzI1NiIsInR5cCI6Im...
```

```json
{
  "spaces": [
    {
      "space": "at:space/did:plc:ejjl2znzqp3ci25dqaslpkk2/com.example.familyUpdates/our-family",
      "repoRev": "3n2gudu45c22e",
      "data": {
        "$bytes": "5LoRPo+bR01M+qgTxu/8rCMKh65p+UbeiihTtnbQNKM"
      },
      "spaceRev": "3n2gudu45c32e"
    }
  ]
}
```

<a id="2-export-and-copy"></a>

### 10.2.2 2. Export and copy

Phase 2 downloads everything the new host will need. For each space the account is the authority of, `exportSpaceMeta` returns a **space meta archive** holding the policy, member list, and writer set. For each space it keeps a repo in, `getRepo` returns the repo as a STAR archive, and `listBlobs` names the blobs its records reference, which `getBlob` downloads one at a time. A taken-down account can still make every one of these calls \[spec\], and `atproto-pds` also allows them for suspended and deactivated accounts \[crates\].

**Reference: `exportSpaceMeta`** \[spec\]

Marcus exports the family space’s state.

```http
GET /xrpc/com.atproto.space.exportSpaceMeta
  ?space=at:space/did:plc:ejjl2znzqp3ci25dqaslpkk2/com.example.familyUpdates/our-family
Host: pds-a.example.com
Authorization: DPoP eyJ0eXAiOiJhdCtqd3QiLCJhbGciOi...
DPoP: eyJhbGciOiJFUzI1NiIsInR5cCI6Im...
```

```http
HTTP/1.1 200 OK
Content-Type: application/vnd.dasl.star
Content-Length: 1195

(1,195-byte STAR archive)
```

The space meta archive is STAR with metadata `{$type: "atproto-space-meta", ver: 1, space}`, then three sections in order, each in strict key order \[spec\].

**Reference: Marcus’s space meta archive** \[spec\]

The body of the 1,195-byte archive his PDS exports for the family space, after Jake’s removal.

```text
policy
  -> { "$type": "com.atproto.memberspace.policy",
       "publicRead": false, "publicWrite": false,
       "publishPolicy": true, "publishMembers": true }
com.atproto.memberspace.member/did:plc:53ni6w7okqrxvjxezmopejoo
  -> { "$type": "com.atproto.memberspace.member",
       "read": true, "write": true }
com.atproto.memberspace.member/did:plc:ashwgt3d5ntfxmlcfyizpu2g
  -> { "$type": "com.atproto.memberspace.member",
       "read": true, "write": true }
com.atproto.memberspace.member/did:plc:p4256dosynj6j6tkypz2q2l3
  -> { "$type": "com.atproto.memberspace.member",
       "read": true, "write": true }
com.atproto.memberspace.member/did:web:erin.example
  -> { "$type": "com.atproto.memberspace.member",
       "read": true, "write": false }
writer/did:plc:53ni6w7okqrxvjxezmopejoo
  -> { "repoRev": "3n2gsittdk32e",
       "data": { "$bytes": "LQ8ty3iUor9cbpB7YIHwOzjr7V9P+yOiOatCVXE2rdY" },
       "spaceRev": "3n2gsittdk42e" }
writer/did:plc:ashwgt3d5ntfxmlcfyizpu2g
  -> { "repoRev": "3n2gtdo55s32p",
       "data": { "$bytes": "INjMYdWaUBlDhmPVrmtaDralYgQLu+GffB4QmvGD2SE" },
       "spaceRev": "3n2gtdo55s22e" }
writer/did:plc:ejjl2znzqp3ci25dqaslpkk2
  -> { "repoRev": "3n2gudu45c22e",
       "data": { "$bytes": "5LoRPo+bR01M+qgTxu/8rCMKh65p+UbeiihTtnbQNKM" },
       "spaceRev": "3n2gudu45c32e" }
writer/did:plc:p4256dosynj6j6tkypz2q2l3
  -> { "repoRev": "3n2gtxdkr232p",
       "data": { "$bytes": "eVD7vKgDQrLKfOvN3VZJHYX0HGz158ocKa5oRd3kaYw" },
       "spaceRev": "3n2gtxdkr222e" }
```

Each writer value holds `repoRev`, `data`, and `spaceRev`. The importing host must reject a parse error, a missing, duplicate, or out-of-order key, a policy it doesn’t implement (`UnsupportedPolicy`), and any policy state key it doesn’t recognize, rather than silently dropping access state \[spec\].

**Reference: `getRepo`** \[spec\]

Marcus downloads his own repo in the family space.

```http
GET /xrpc/com.atproto.space.getRepo
  ?space=at:space/did:plc:ejjl2znzqp3ci25dqaslpkk2/com.example.familyUpdates/our-family
  &repo=did:plc:ejjl2znzqp3ci25dqaslpkk2
Host: pds-a.example.com
Authorization: DPoP eyJ0eXAiOiJhdCtqd3QiLCJhbGciOi...
DPoP: eyJhbGciOiJFUzI1NiIsInR5cCI6Im...
```

```http
HTTP/1.1 200 OK
Content-Type: application/vnd.dasl.star

(STAR archive, laid out as in Chapter 7)
```

**Reference: `listBlobs`** \[spec\]

Marcus checks which blobs his records reference.

<a id="try-list-blobs-marcus"></a>

**Try it 10.1** · List Marcus’s blobs. This example is interactive on the web: https://atproto.how/atproto-spaces-field-guide/10-operations#try-list-blobs-marcus

Request:

```http
GET /xrpc/com.atproto.space.listBlobs
  ?space=at:space/did:plc:ejjl2znzqp3ci25dqaslpkk2/com.example.familyUpdates/our-family
  &repo=did:plc:ejjl2znzqp3ci25dqaslpkk2
Host: pds-a.example.com
Authorization: DPoP <access token>
DPoP: <proof JWT>
```

Headers:

- `Authorization`: The session’s access token, bound to a key only the client holds. [Appendix G, OAuth requests](https://atproto.how/atproto-spaces-field-guide/g-worked-values.md#oauth-requests)
- `DPoP`: A proof signed with that key for this method and URL, so a copied token can’t be replayed. [Appendix G, OAuth requests](https://atproto.how/atproto-spaces-field-guide/g-worked-values.md#oauth-requests)

Sample response:

```json
{
  "cids": []
}
```

Marcus’s records in the family space reference no blobs, so there is nothing more to copy. An account with photos, like Elena’s, fetches each CID with `getBlob` and uploads it to the new host with [`com.atproto.repo.uploadBlob`](https://lexicon.garden/nsid/com.atproto.repo.uploadBlob).

<a id="3-import"></a>

### 10.2.3 3. Import

Imports run on the new host, against the account created there by the standard account migration. Order matters. `importSpaceMeta` comes first for each space the account is the authority of, because `importRepo` refuses the authority’s repo in a space the host doesn’t know yet. Neither call takes a `space` parameter, since the archive itself says which space and repo it holds \[spec\].

**Reference: `importSpaceMeta`** \[spec\]

Marcus loads the family space’s state onto his new PDS.

```http
POST /xrpc/com.atproto.space.importSpaceMeta
Host: pds-c.example.com
Authorization: DPoP eyJ0eXAiOiJhdCtqd3QiLCJhbGciOi...
DPoP: eyJhbGciOiJFUzI1NiIsInR5cCI6Im...
Content-Type: application/vnd.dasl.star
Content-Length: 1195

(the space meta archive from phase 2)
```

```http
HTTP/1.1 200 OK
Content-Length: 0
```

**Reference: `importRepo`** \[spec\]

Then his own repo in the space.

```http
POST /xrpc/com.atproto.space.importRepo
Host: pds-c.example.com
Authorization: DPoP eyJ0eXAiOiJhdCtqd3QiLCJhbGciOi...
DPoP: eyJhbGciOiJFUzI1NiIsInR5cCI6Im...
Content-Type: application/vnd.dasl.star

(the repo archive from phase 2)
```

```http
HTTP/1.1 200 OK
Content-Length: 0
```

`importSpaceMeta` answers `NotAuthorized`, `UnsupportedPolicy`, or `InvalidSpaceMeta`. `importRepo` answers `InvalidRepoFile` for a malformed archive, `RepoMismatch` for another account’s repo, and `SpaceNotFound` when the caller is the authority and the space hasn’t been imported yet \[spec\].

Each import needs a `space:` scope covering every write it makes, and an archive with any uncovered record is rejected whole \[spec\]. In practice that means `create` on every collection in each repo archive, plus `manage=create` and `manage=update` for each space the account is the authority of \[spec\]. The breadth is intentional. Migration is a deliberately destructive operation that also changes the DID document, which for a did:plc identity means signing a PLC operation. A migration tool should tell its user this plainly before asking for either.

<a id="4-verify"></a>

### 10.2.4 4. Verify

Before anything points at the new host, check that it holds exactly what the old one did. Run `listSpaces` on the new host and compare each entry with phase 1. `data` is the LtHash digest of the repo’s records, so it must match byte for byte, while `repoRev` may differ because the new host can assign its own \[spec\]. For each space the account is the authority of, export the space meta from the new host and compare its policy, members, and writer entries with the phase 2 archive. For each repo, compare the `listBlobs` CIDs on both hosts.

**Reference: `listSpaces` on the new host** \[spec\]

The digest matches phase 1, and the new host has assigned its own `repoRev`.

```http
GET /xrpc/com.atproto.space.listSpaces?limit=50
Host: pds-c.example.com
Authorization: DPoP eyJ0eXAiOiJhdCtqd3QiLCJhbGciOi...
DPoP: eyJhbGciOiJFUzI1NiIsInR5cCI6Im...
```

```json
{
  "spaces": [
    {
      "space": "at:space/did:plc:ejjl2znzqp3ci25dqaslpkk2/com.example.familyUpdates/our-family",
      "repoRev": "3n2gx4mfrk22e",
      "data": {
        "$bytes": "5LoRPo+bR01M+qgTxu/8rCMKh65p+UbeiihTtnbQNKM"
      },
      "spaceRev": "3n2gudu45c32e"
    }
  ]
}
```

With every digest and blob list matching, Marcus finishes the standard account migration. He points `#atproto_pds` in his DID document at the new host and deactivates the old account.

<a id="after-the-move"></a>

### 10.2.5 After the move

The new host generates its own `#atproto_kem` key and publishes it in the DID document. Its op log starts empty, which leaves every syncer where it would be after falling behind a compacted op log: it has to resync everything. A syncer that sees an authority’s `#atproto_pds` change reauthorizes with the new host, which registers it again \[spec\].

Notification registrations, credential revocations, and deleted-space tombstones don’t carry over \[spec\]. Lost revocations matter only briefly, since a credential lives at most 60 minutes and a repo host only has to keep a revocation for 60 minutes \[spec\]. Until then, the new host can accept a revoked credential for the migrated account’s repos. If the migration also changed the authority’s `#atproto` key, which signs its credentials \[spec\], a host that has refreshed the authority’s DID document rejects credentials signed with the old key, while one still holding a cached copy may accept them.

**For app developers.** Build a way for your app to notice that a host has changed. When an authority’s or a writer’s `#atproto_pds` moves, clear the sessions and cached credentials tied to the old host, drop cached endpoints and `#atproto_kem` keys, reauthorize with the new host, and resync from scratch once, since the new host’s op log starts empty.

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

## 10.3 Moderation

Every service moderates what it hosts and serves. A moderation service is just another reader: it needs a credential, so the authority must admit it. That is a feature. Moderation needs access to the data and often its own data patterns, so a moderator, and the applications and tools they use, are admitted to the space the same way everyone else is. The protocol defines no universal reporting interface \[spec\].

> *In the family space.* Marcus has made Jake read-only, and Jake’s bookmark is still in the space. Marcus can’t delete it, because it sits in Jake’s space repo on Jake’s PDS. He labels it instead.

Labels on space data are [`com.atproto.label.record`](https://lexicon.garden/nsid/com.atproto.label.record) records, written by the labeler into its own repo *in the same space* as the subject \[spec\].

Labels that reference a record in another space must be ignored \[spec\], but an application can make a deliberate exception for spaces it knows are in syzygy. An application can put a community space in syzygy with a space for its moderators ([Chapter 3](https://atproto.how/atproto-spaces-field-guide/3-addressing.md)). The community space is the primary space and holds members' content. Its syzygy space, readable only by moderators and their tools, holds moderator notes, case records, and [`com.atproto.label.record`](https://lexicon.garden/nsid/com.atproto.label.record) labels pointing at content in the community space. Because the application knows the two spaces are in syzygy, it honors labels from the moderation space while still ignoring cross-space labels from anywhere else. A service that doesn’t know about the syzygy follows the spec and ignores them, so this is a deliberate, app-level departure from the default.

**Reference: A label record** \[spec\]

Marcus’s `!takedown` label on Jake’s bookmark, written to `com.atproto.label.record/3n2gu2vyuk22e` in his own space repo.

```json
{
  "$type": "com.atproto.label.record",
  "uri": "at:space/did:plc:ejjl2znzqp3ci25dqaslpkk2/com.example.familyUpdates/our-family/did:plc:brthxhhoomvrib2avauses35/community.lexicon.bookmarks.bookmark/3n2gtrxvls22p",
  "val": "!takedown",
  "cts": "2026-11-16T15:34:00.000Z"
}
```

**Reference: `com.atproto.label.record` fields** \[spec\]

| Field | Type | Required | Meaning |
| --- | --- | --- | --- |
| `uri` | `uri` | yes | Subject: a record, a repo (account) or another resource |
| `cid` | `cid` | no | Version of the subject |
| `val` | string, at most 128 characters | yes | Label value |
| `cts` | `datetime` | yes | Created-at |
| `exp` | `datetime` | no | Expires-at |

Label records are keyed by TID and appear only in space repos. Public data uses signed [`com.atproto.label.defs`](https://lexicon.garden/nsid/com.atproto.label.defs)`#label` objects, served through [`com.atproto.label.subscribeLabels`](https://lexicon.garden/nsid/com.atproto.label.subscribeLabels) and `queryLabels` \[spec\].

Per the spec, labels referencing records in another space are ignored. The other label rules keep labels cheap to index and private to the space \[spec\]:

- When one repo holds several labels with the same `(uri, cid, val)`, the one with the latest `cts` wins, so a labeler revises a label by writing a new one.
- A labeler’s labels sync only if it is in the writer set. The authority is always in it, so it can always label.
- Labels on records in non-public spaces stay off the public `subscribeLabels` stream, where they would leak metadata about the data.
- Each space type decides what labels about whole accounts mean, since the spec leaves that open.

The authority can publish `!takedown` labels to remove content from its space, and syncers and apps are expected to respect them \[spec\]. Nothing enforces this. Applications honor takedowns by convention, and no protocol mechanism makes an application hide a labeled record. The authority’s recourse is reactive. In a memberspace, it can drop an application that ignores its labels from `allowedApps`, and it stops minting credentials for that application \[spec\]. That cuts off the application’s reads, but not the writes its users make through it, because `allowedApps` doesn’t apply to writes.

Infrastructure takedowns work at each layer \[spec\]. A PDS can take down an account (all its spaces and space repos) or a blob. A space host can take down an authority (all its spaces). An AppView can take down an account, a whole space, or individual records. Repo hosts use the public sync error names, such as `RepoTakendown` and `RepoDeactivated`.

`atproto-pds` answers `getBlob` for a taken-down space blob with `400 BlobNotFound` \[crates\].

<a id="account-status-and-identity-events"></a>

## 10.4 Account status and identity events

Deactivation and deletion apply to space data the same way they apply to public data. When a space authority is taken down or deactivated, its spaces are suspended. `authorizeSpaceSync` and `listWriters` answer `RepoTakendown` or `RepoDeactivated`, and existing credentials run out. Member repos stay as they are, and the spaces resume once the authority is reinstated \[spec\]. Registrations lapse but are kept, so syncers get `#registrationExpired` on the first update after the space resumes. Syncers keep their data through a suspension, since only deletion tells them to drop it.

Account status, handle changes, and key rotations (including `#atproto_kem`) arrive as `#account` and `#identity` events on the public firehose, so a syncer that follows only spaces still subscribes to them \[spec\]. That holds for every atproto application, space-specific or not. An active Jetstream consumer for account and identity events is the cheapest and most effective way to know when an account your application cares about needs its cached handle, service endpoints, or verification keys refreshed.

<a id="access-control-in-applications"></a>

## 10.5 Access control in applications

A space credential lets an app sync a space. The app decides which of its users may see the space \[spec\]. It bases that decision on the space type, its policy, its records, any supporting data the type depends on, and the other spaces in its hyperspace. For example, a `memberspace` may publish its member records, while a follower-gated `managedspace` needs the app to know the follow graph. The app also decides whether a space is fully public, and it watches for changes to access.

Some rules apply to all space data, and apps must respect them \[spec\]:

- an inactive author’s space data is not displayed or distributed;
- an inactive space authority’s account affects all data in all its spaces;
- deleted records are deleted, as in public repos;
- space deletion is honored when a syncer is told of it.

Space sync does not carry account status changes. Apps sync those separately, for example from the firehose.

<a id="common-questions"></a>

## 10.6 Common questions

**If a space is deleted, are my posts gone?**

Your records stay in your space repo on your own PDS, readable only by you. The apps that kept copies delete them. If the authority recreates the space with the same type and key, your records become readable again under the new policy.

**What happens to my spaces when I move my account?**

They move with you, one space at a time. Each space repo is exported and imported, and spaces you’re the authority of bring their policy and member list along in a space meta archive.

**Who moderates a space?**

Every service moderates what it hosts and serves. Inside the space, the authority publishes `!takedown` labels, and syncers and apps respect them. A moderation service that wants to see the space needs a credential like any other reader.
