Files
computer-playbook/roles/web-app-bluesky/Administration.md
kevinveenbirkenbachandClaude Opus 5.5 a59eb5d347 docs(web-app-bluesky): escape the PDS admin password for curl's config
curl reads backslash escapes inside a quoted config value, so a password
with `"` or `\` reached the PDS altered (`a"b` as `admin:a`, `a\b` as
`admin:ab`). The sed step now escapes both characters before it builds
the `user` line.

Addresses the CodeRabbit review on #961.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 22:56:20 +02:00

40 lines
1.5 KiB
Markdown

# Administration
## Create a user via POST
```bash
compose exec -T pds printenv PDS_ADMIN_PASSWORD \
| sed 's/[\\"]/\\&/g; s/.*/user = "admin:&"/' \
| curl --config - -X POST https://your-pds-domain/xrpc/com.atproto.server.createAccount \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"handle": "username",
"password": "securepassword123",
"inviteCode": "optional-invite-code"
}'
```
## Use pdsadmin
```bash
compose exec -it pds pdsadmin
compose exec -it pds pdsadmin account create-invite-code
```
## Roll back the PDS image
The PDS migrates its account database forward when it starts. An older image refuses a database that a newer image has migrated and stops with `corrupted migrations: previously executed migration ... is missing`.
- You MUST NOT lower `services.pds.version` on its own.
- To roll back, you MUST restore the `bluesky_pds_data` volume from the backup generation taken before the update and pin the old version in the same step. Follow [A single volume](../svc-bkp-volume-2-local/README.md#a-single-volume) for the restore.
- That backup generation exists only when `svc-bkp-volume-2-local` is deployed and `MODE_BACKUP` is enabled.
- The restore discards everything the PDS stored after the update.
## Debugging
- Websocket: [piehost.com](https://piehost.com/websocket-tester)
- Instance: [bsky-debug.app](https://bsky-debug.app)
Initial setup: no top-level domain.