Create the first account
An invite code, the Bluesky app, the first post, and when the rest of the network sees it.
Use with AI
Take the context you need.
Sign-up needs an invite code, so that strangers cannot fill the server. The admin password creates codes.
Create an invite code
Section titled “Create an invite code”On the host, with PDS_ADMIN_PASSWORD from your runtime secret file in the environment:
curl -s -u "admin:$PDS_ADMIN_PASSWORD" -H 'content-type: application/json' -d '{"useCount": 1}' https://pds.example.com/xrpc/com.atproto.server.createInviteCodeIt answers {"code":"pds-example-com-xxxxx-xxxxx"}. A code with a
useCount of 5 admits five accounts.
Sign up from the Bluesky app
Section titled “Sign up from the Bluesky app”- Open the app and choose Create account.
- Under Hosting provider, choose Custom and enter
https://pds.example.com. - Enter the invite code, an email address, a password and a handle. The
handle becomes
alice.pds.example.com. - Post something.
With the supplied Caddy configuration, the first request for
alice.pds.example.com triggers certificate issuance. It can take a few seconds.
Or sign up from the terminal
Section titled “Or sign up from the terminal”curl -s -H 'content-type: application/json' -d '{"email":"alice@example.com","handle":"alice.pds.example.com","password":"…","inviteCode":"pds-example-com-xxxxx-xxxxx"}' https://pds.example.com/xrpc/com.atproto.server.createAccountThe answer holds the account’s did, its handle and a session. Sign in
with the handle and the password from any app.
Check the handle
Section titled “Check the handle”curl -s https://alice.pds.example.com/.well-known/atproto-didIt prints the account’s DID, did:plc:…. Apps resolve handles this way.
When posts reach other people
Section titled “When posts reach other people”A post appears in other people’s timelines once the relay at
bsky.network crawls the host. The server asks it to with the first write
after a start, and then at most once in twenty minutes. The relay’s own
status shows the connection:
curl -s "https://bsky.network/xrpc/com.atproto.sync.getHostStatus?hostname=pds.example.com"The answer has "status":"active" and a seq that moves with each
write.
Next: set up email so that confirmation and password-reset mail arrives, and back up the data directory and all configuration and secrets.
