create-pds 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -2521,8 +2521,9 @@ const BANNER = `
|
|
|
2521
2521
|
██║ ██║██╔══██╗██╔══██╗██║ ██║╚════██║
|
|
2522
2522
|
╚██████╗██║██║ ██║██║ ██║╚██████╔╝███████║
|
|
2523
2523
|
╚═════╝╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝
|
|
2524
|
-
|
|
2525
|
-
|
|
2524
|
+
☁️ ☁️ ☁️ ☁️ ☁️ ☁️ ☁️ ☁️
|
|
2525
|
+
☁️ ☁️ Your personal data server ☁️ ☁️
|
|
2526
|
+
☁️ ☁️ ☁️ ☁️ ☁️ ☁️ ☁️
|
|
2526
2527
|
`;
|
|
2527
2528
|
function detectPackageManager() {
|
|
2528
2529
|
const userAgent = process.env.npm_config_user_agent || "";
|
package/package.json
CHANGED
|
@@ -2,9 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
A single-user AT Protocol Personal Data Server running on Cloudflare Workers.
|
|
4
4
|
|
|
5
|
-
> **⚠️ Beta Software**
|
|
5
|
+
> **⚠️ Experimental Beta Software**
|
|
6
6
|
>
|
|
7
|
-
> This is under active development.
|
|
7
|
+
> This is experimental software under active development. While account migration has been tested and works, this PDS implementation is still being refined. Breaking changes may occur, and not all edge cases have been discovered. **Strongly consider backing up important data before migrating a primary account.**
|
|
8
|
+
|
|
9
|
+
## Before You Get Started
|
|
10
|
+
|
|
11
|
+
Before setting up your PDS, make sure you have:
|
|
12
|
+
|
|
13
|
+
1. **A Cloudflare account** – Sign up at [cloudflare.com](https://cloudflare.com) if you don't have one
|
|
14
|
+
2. **Your domain added to Cloudflare** – Add the domain you plan to use for your PDS to your Cloudflare account:
|
|
15
|
+
- Log into the Cloudflare dashboard
|
|
16
|
+
- Click "Add a site" and enter your domain
|
|
17
|
+
- Follow the instructions to update your domain's nameservers to point to Cloudflare
|
|
18
|
+
- Wait for DNS propagation (usually a few minutes, can take up to 24 hours)
|
|
19
|
+
|
|
20
|
+
Once your domain is active in Cloudflare, you're ready to proceed with the setup below.
|
|
8
21
|
|
|
9
22
|
## Getting Started
|
|
10
23
|
|
|
@@ -24,6 +37,7 @@ pnpm pds init
|
|
|
24
37
|
```
|
|
25
38
|
|
|
26
39
|
This prompts for:
|
|
40
|
+
|
|
27
41
|
- **PDS hostname** – The deployment domain (e.g., `pds.example.com`)
|
|
28
42
|
- **Handle** – The Bluesky username (e.g., `alice.example.com`)
|
|
29
43
|
- **Password** – For logging in from Bluesky apps
|
|
@@ -39,7 +53,7 @@ pnpm dev
|
|
|
39
53
|
The PDS is now running at http://localhost:5173. Test it with:
|
|
40
54
|
|
|
41
55
|
```bash
|
|
42
|
-
curl http://localhost:5173/
|
|
56
|
+
curl http://localhost:5173/xrpc/_health
|
|
43
57
|
curl http://localhost:5173/.well-known/did.json
|
|
44
58
|
```
|
|
45
59
|
|
|
@@ -84,6 +98,7 @@ pnpm pds identity
|
|
|
84
98
|
```
|
|
85
99
|
|
|
86
100
|
This updates your DID document to point to your new PDS. You'll need to:
|
|
101
|
+
|
|
87
102
|
1. Enter your password for the source PDS
|
|
88
103
|
2. Enter the confirmation token sent to your email
|
|
89
104
|
|
|
@@ -116,19 +131,19 @@ pnpm pds status # Verify everything is working
|
|
|
116
131
|
|
|
117
132
|
## CLI Commands
|
|
118
133
|
|
|
119
|
-
| Command
|
|
120
|
-
|
|
121
|
-
| `pnpm pds init`
|
|
122
|
-
| `pnpm pds migrate`
|
|
123
|
-
| `pnpm pds migrate --clean` | Reset and re-import data
|
|
124
|
-
| `pnpm pds identity`
|
|
125
|
-
| `pnpm pds activate`
|
|
126
|
-
| `pnpm pds deactivate`
|
|
127
|
-
| `pnpm pds status`
|
|
128
|
-
| `pnpm pds passkey add`
|
|
129
|
-
| `pnpm pds secret key`
|
|
130
|
-
| `pnpm pds secret jwt`
|
|
131
|
-
| `pnpm pds secret password` | Set account password
|
|
134
|
+
| Command | Description |
|
|
135
|
+
| -------------------------- | -------------------------------------------------------- |
|
|
136
|
+
| `pnpm pds init` | Interactive setup wizard (prompts for Cloudflare deploy) |
|
|
137
|
+
| `pnpm pds migrate` | Transfer account from source PDS |
|
|
138
|
+
| `pnpm pds migrate --clean` | Reset and re-import data |
|
|
139
|
+
| `pnpm pds identity` | Update DID document to point to new PDS |
|
|
140
|
+
| `pnpm pds activate` | Enable writes (go live) |
|
|
141
|
+
| `pnpm pds deactivate` | Disable writes (for re-import) |
|
|
142
|
+
| `pnpm pds status` | Check account and repository status |
|
|
143
|
+
| `pnpm pds passkey add` | Register a passkey for passwordless login |
|
|
144
|
+
| `pnpm pds secret key` | Generate new signing keypair |
|
|
145
|
+
| `pnpm pds secret jwt` | Generate new JWT secret |
|
|
146
|
+
| `pnpm pds secret password` | Set account password |
|
|
132
147
|
|
|
133
148
|
Add `--dev` to target your local development server instead of production.
|
|
134
149
|
|
|
@@ -136,27 +151,28 @@ Add `--dev` to target your local development server instead of production.
|
|
|
136
151
|
|
|
137
152
|
### Public Variables (wrangler.jsonc)
|
|
138
153
|
|
|
139
|
-
| Variable
|
|
140
|
-
|
|
141
|
-
| `PDS_HOSTNAME`
|
|
142
|
-
| `DID`
|
|
143
|
-
| `HANDLE`
|
|
144
|
-
| `SIGNING_KEY_PUBLIC` | Public key for DID document
|
|
154
|
+
| Variable | Description |
|
|
155
|
+
| -------------------- | --------------------------------------- |
|
|
156
|
+
| `PDS_HOSTNAME` | Public hostname (e.g., pds.example.com) |
|
|
157
|
+
| `DID` | Account DID |
|
|
158
|
+
| `HANDLE` | Account handle |
|
|
159
|
+
| `SIGNING_KEY_PUBLIC` | Public key for DID document |
|
|
145
160
|
|
|
146
161
|
### Secrets (.dev.vars or Cloudflare)
|
|
147
162
|
|
|
148
|
-
| Variable
|
|
149
|
-
|
|
150
|
-
| `AUTH_TOKEN`
|
|
151
|
-
| `SIGNING_KEY`
|
|
152
|
-
| `JWT_SECRET`
|
|
153
|
-
| `PASSWORD_HASH` | Bcrypt hash of the account password
|
|
163
|
+
| Variable | Description |
|
|
164
|
+
| --------------- | ------------------------------------- |
|
|
165
|
+
| `AUTH_TOKEN` | Bearer token for API write operations |
|
|
166
|
+
| `SIGNING_KEY` | Private signing key |
|
|
167
|
+
| `JWT_SECRET` | Secret for session tokens |
|
|
168
|
+
| `PASSWORD_HASH` | Bcrypt hash of the account password |
|
|
154
169
|
|
|
155
170
|
## Handle Verification
|
|
156
171
|
|
|
157
172
|
Bluesky verifies control of the handle domain.
|
|
158
173
|
|
|
159
174
|
**If the handle matches the PDS hostname** (for example, both are `pds.example.com`):
|
|
175
|
+
|
|
160
176
|
- No extra setup needed. The PDS handles verification automatically.
|
|
161
177
|
|
|
162
178
|
**If the handle is on a different domain** (for example, handle `alice.example.com`, PDS at `pds.example.com`):
|
|
@@ -192,12 +208,14 @@ Ensure the worker is deployed (`pnpm run deploy`) or the dev server is running (
|
|
|
192
208
|
### "Failed to resolve handle"
|
|
193
209
|
|
|
194
210
|
Check the handle configuration:
|
|
211
|
+
|
|
195
212
|
- For DNS verification: ensure the TXT record has propagated (`dig TXT _atproto.yourhandle.com`)
|
|
196
213
|
- For same-domain handles: ensure the PDS is accessible at `https://yourdomain.com/.well-known/atproto-did`
|
|
197
214
|
|
|
198
215
|
### Migration issues
|
|
199
216
|
|
|
200
217
|
If migration fails partway through:
|
|
218
|
+
|
|
201
219
|
- Run `pnpm pds migrate` again to resume from where you left off
|
|
202
220
|
- Use `pnpm pds migrate --clean` to start fresh (only on deactivated accounts)
|
|
203
221
|
|
|
@@ -40,7 +40,11 @@
|
|
|
40
40
|
// Account DID - usually did:web:<hostname>
|
|
41
41
|
"DID": "",
|
|
42
42
|
// Account handle (e.g., "alice.example.com")
|
|
43
|
-
"HANDLE": ""
|
|
43
|
+
"HANDLE": "",
|
|
44
|
+
// ⚠️ DATA_LOCATION: Controls where your Durable Objects are created.
|
|
45
|
+
// ⚠️ WARNING: This CANNOT be changed after deployment!
|
|
46
|
+
// ⚠️ Changing this value after your PDS is live will break your installation.
|
|
47
|
+
"DATA_LOCATION": ""
|
|
44
48
|
},
|
|
45
49
|
// Secrets (set via `pds init` or `pds secret <name>`):
|
|
46
50
|
// - AUTH_TOKEN: Bearer token for API write operations
|