Running a PDS
A Colibri Space is an AT Protocol account that owns a set of ATproto spaces (see Spaces and Communities). The AppView creates that account on the PDS named in PDS_URL, so that PDS has to run the spaces alpha image, ghcr.io/bluesky-social/atproto:pds-spaces-alpha. com.atproto.space and com.atproto.managedspace exist only in that image.
Which PDS needs the spaces alpha
Section titled “Which PDS needs the spaces alpha”- The PDS at
PDS_URLneeds it.social.colibri.beta.community.createfails withSpacesUnsupportedon a PDS without thecom.atproto.spacepolicy methods. - The PDS of an existing account that hosts a Space needs it.
social.colibri.beta.community.adoptfails with the same error. - A member’s own PDS works without it. The AppView hosts the space repos of members on a stock PDS, and the client moves them to the member’s PDS once it supports spaces.
Hosting covers both cases in detail.
Snowglobe
Section titled “Snowglobe”Snowglobe runs the spaces alpha PDS as part of a private local network with a PLC directory, Jetstream, and test accounts. The development overview covers the snowglobe.yml in the AppView repository and the steps to run the AppView against it.
The compose overlay
Section titled “The compose overlay”docker-compose.pds.yml in the AppView repository adds a spaces-alpha PDS and a private PLC directory. DIDs minted on it stay on your machine.
| Service | Image | Published on |
|---|---|---|
pds |
ghcr.io/bluesky-social/atproto:pds-spaces-alpha |
127.0.0.1:3001 |
plc |
Built from docker/plc |
127.0.0.1:2582 |
plc-db |
postgres:18-alpine |
Start the whole stack, AppView included, in containers:
docker compose -f docker-compose.yml -f docker-compose.pds.yml upOr start the PDS and its PLC directory alone, and run the AppView from source with pnpm dev:
docker compose -f docker-compose.yml -f docker-compose.pds.yml up -d pdsThe integration suite runs against the same PDS and PLC pair from docker-compose.integration.yml, with no volumes.
Differences when using the overlay
Section titled “Differences when using the overlay”The overlay sets these variables on the appview container:
PDS_URL=http://pds:3001PLC_URL=http://plc:2582COMMUNITY_HANDLE_DOMAIN=testCOMMUNITY_EMAIL_DOMAIN=communities.test.invalidJETSTREAM_ENABLED=falseAn AppView run from source reads .env and gets none of them. Set the same variables there, with http://localhost:3001 and http://localhost:2582 as the two URLs.
Environment variables
Section titled “Environment variables”| Variable | Default | Purpose |
|---|---|---|
PDS_PLC_ROTATION_KEY |
none | The PDS’s PLC rotation key, a secp256k1 private key as 64 hex characters |
PDS_JWT_SECRET |
devsecretdevsecretdevsecretdev00 |
The PDS’s JWT secret |
PDS_ADMIN_PASSWORD |
admin |
The PDS admin password. The AppView reads the same variable, so set it to create Spaces. |
Generate the rotation key with the command from .env.example:
openssl ecparam -name secp256k1 -genkey -noout -outform DER \ | tail -c +8 | head -c 32 | xxd -p -c 32PDS configuration
Section titled “PDS configuration”PDS_DEV_MODE=true. In dev mode the PDS calls an AppView whosePUBLIC_URLis plain HTTP on a local address.PDS_HOSTNAME=localhostandPDS_PORT=3001. The PDS advertiseshttp://localhost:3001in the DID documents it writes, and the overlay publishes the same port on the host. A process on the host that resolves a space host from one of those documents reaches the PDS at that address.PDS_INVITE_REQUIRED=false. Accounts are created with no invite code.platform: linux/amd64. The spaces-alpha image is published foramd64only.
The PLC directory
Section titled “The PLC directory”docker/plc builds an image that runs @did-plc/server, installed from npm, on port 2582.
The overlay gives the directory a Postgres database, plc-db, so its operation log survives a restart. With no DATABASE_URL, as in the integration stack, the log lives in memory and starts empty on every run.
A DID minted on this directory exists nowhere else. Services outside your stack cannot resolve it.
Verifying
Section titled “Verifying”curl http://127.0.0.1:3001/xrpc/_healthcurl http://127.0.0.1:2582/_healthBoth answer 200 once the containers are healthy.
See also
Section titled “See also”- Spaces: what a space is and how access to one is decided.
- Communities: the spaces a Space is made of.
- Hosting: member repos on a stock PDS, and Spaces on an account you bring yourself.
- Self-Hosting: running a PDS for real users, with TLS and DNS.