pds.js
An AT Protocol Personal Data Server written in JavaScript. It hosts one account, and it runs on Node.js, Deno, or Cloudflare Workers.
Work in progress. This is experimental. You probably should not use it yet.
Why pds.js
The official atproto PDS is the reference server, and it is the right choice for most people. Pick pds.js when one of these matters to you.
- It runs on the edge. The Cloudflare Workers build keeps repos in Durable Objects and blobs in R2.
- It serves one account. The server answers
RepoNotFoundfor every other DID. Nothing in it models tenants, invite codes, or moderation of other people. - It includes an account interface. Sign in at
/accountto see what each app stored, manage passkeys and app passwords, take backups, and change the handle. - It implements permissioned data. Private per-user repos, shared through spaces.
- It hosts git repositories. Push into records and chunked bundle blobs. Anyone clones with stock git over read-only smart HTTP.
pds.js federates with the live network. It signs commits with a did:plc identity, serves the firehose over subscribeRepos, and proxies app.bsky.* to an AppView with service auth.
Try it
git clone https://tangled.org/chadtmiller.com/pds.js
cd pds.js && pnpm install
just dev
The workspace uses the workspace:* protocol, so install with pnpm. just dev starts a local PLC, relay, and Caddy, runs the PDS, and registers a mock account with a few records. Open localhost:2471/account and sign in with the printed credentials.
Deploy
| Docker | deploy-docker.md |
| Node.js | deploy-node.md |
| Cloudflare Workers | deploy-cloudflare.md |
| Deno | deploy-deno.md |
Every deployment needs TLS in front of it, a public hostname, and one run of npm run setup to register the DID with the PLC directory.
Documentation
| Configuration | Every environment variable |
| Building an app | Sites, manifests, installs, and how to update one |
| Architecture | Ports, adapters, packages, library usage |
| Permissioned data | Proposal 0016, spaces, the run club example |
| Endpoints | Coverage against the official atproto PDS |
| Scopes | OAuth scopes against the reference implementation |
Source at tangled.org/chadtmiller.com/pds.js. Packages are on npm under @pdsjs. MIT licensed.