PDSharp#
A Personal Data Server (PDS) for the AT Protocol, written in F# with Giraffe.
Goal#
Build and deploy a single-user PDS that can host your AT Protocol repository, serve blobs, and federate with Bluesky.
Requirements#
- .NET 9.0 SDK
- Just (optional, for potential future task running)
Getting Started#
Restore & Build the project#
dotnet restore
dotnet build
Run the tests#
dotnet test
Run the Server#
dotnet run --project PDSharp/PDSharp.fsproj
The server will start at http://localhost:5000.
Verify#
Check the describeServer endpoint:
curl http://localhost:5000/xrpc/com.atproto.server.describeServer
Configuration#
The application uses appsettings.json and supports Environment Variable overrides.
| Key | Env Var | Default | Description |
|---|---|---|---|
DidHost |
PDSHARP_DidHost |
did:web:localhost |
The DID of the PDS itself |
PublicUrl |
PDSHARP_PublicUrl |
http://localhost:5000 |
Publicly reachable URL |
Example appsettings.json:
{
"PublicUrl": "http://localhost:5000",
"DidHost": "did:web:localhost"
}
Architecture#
App (Giraffe)#
XrpcRouter:/xrpc/<NSID>routingAuth: Session management (JWTs)RepoApi: Write/Read records (putRecord,getRecord)ServerApi: Server meta (describeServer)
Core (Pure F#)#
DidResolver: Identity resolutionRepoEngine: MST, DAG-CBOR, CIDs, BlocksModels: Data types for XRPC/Database
Infra#
- SQLite/Postgres for persistence
- S3/Disk for blob storage